Skip to content

Commit b8727a1

Browse files
authored
Merge pull request #7 from Arcadia-Science/ek/full-codebase-review
Full codebase review
2 parents 41b73b8 + 582ed52 commit b8727a1

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+11648
-0
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This workflow is taken from
2+
# https://quarto.org/docs/publishing/github-pages.html#github-action, which
3+
# contains other useful information.
4+
on:
5+
workflow_dispatch:
6+
push:
7+
branches: publish
8+
9+
name: Quarto Publish
10+
11+
jobs:
12+
build-deploy:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
steps:
17+
- name: Check out repository
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Quarto
21+
uses: quarto-dev/quarto-actions/setup@v2
22+
23+
- name: Render and Publish
24+
uses: quarto-dev/quarto-actions/publish@v2
25+
with:
26+
target: gh-pages
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 178 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,178 @@
1+
# Claude Code
2+
CLAUDE.md
3+
4+
# Byte-compiled / optimized / DLL files
5+
__pycache__/
6+
*.py[cod]
7+
*$py.class
8+
9+
# C extensions
10+
*.so
11+
12+
# Distribution / packaging
13+
.Python
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
share/python-wheels/
27+
*.egg-info/
28+
.installed.cfg
29+
*.egg
30+
MANIFEST
31+
32+
# PyInstaller
33+
# Usually these files are written by a python script from a template
34+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
35+
*.manifest
36+
*.spec
37+
38+
# Installer logs
39+
pip-log.txt
40+
pip-delete-this-directory.txt
41+
42+
# Unit test / coverage reports
43+
htmlcov/
44+
.tox/
45+
.nox/
46+
.coverage
47+
.coverage.*
48+
.cache
49+
nosetests.xml
50+
coverage.xml
51+
*.cover
52+
*.py,cover
53+
.hypothesis/
54+
.pytest_cache/
55+
cover/
56+
57+
# Translations
58+
*.mo
59+
*.pot
60+
61+
# Django stuff:
62+
*.log
63+
local_settings.py
64+
db.sqlite3
65+
db.sqlite3-journal
66+
67+
# Flask stuff:
68+
instance/
69+
.webassets-cache
70+
71+
# Scrapy stuff:
72+
.scrapy
73+
74+
# Sphinx documentation
75+
docs/_build/
76+
77+
# PyBuilder
78+
.pybuilder/
79+
target/
80+
81+
# Jupyter Notebook
82+
.ipynb_checkpoints
83+
84+
# IPython
85+
profile_default/
86+
ipython_config.py
87+
88+
# pyenv
89+
# For a library or package, you might want to ignore these files since the code is
90+
# intended to run in multiple environments; otherwise, check them in:
91+
# .python-version
92+
93+
# pipenv
94+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
95+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
96+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
97+
# install all needed dependencies.
98+
#Pipfile.lock
99+
100+
# UV
101+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
102+
# This is especially recommended for binary packages to ensure reproducibility, and is more
103+
# commonly ignored for libraries.
104+
#uv.lock
105+
106+
# poetry
107+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
108+
# This is especially recommended for binary packages to ensure reproducibility, and is more
109+
# commonly ignored for libraries.
110+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
111+
#poetry.lock
112+
113+
# pdm
114+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
115+
#pdm.lock
116+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
117+
# in version control.
118+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
119+
.pdm.toml
120+
.pdm-python
121+
.pdm-build/
122+
123+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
124+
__pypackages__/
125+
126+
# Celery stuff
127+
celerybeat-schedule
128+
celerybeat.pid
129+
130+
# SageMath parsed files
131+
*.sage.py
132+
133+
# Environments
134+
.env
135+
.venv
136+
env/
137+
venv/
138+
ENV/
139+
env.bak/
140+
venv.bak/
141+
142+
# Spyder project settings
143+
.spyderproject
144+
.spyproject
145+
146+
# Rope project settings
147+
.ropeproject
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
169+
170+
# PyPI configuration file
171+
.pypirc
172+
173+
.DS_Store
174+
175+
# Quarto
176+
/.quarto/
177+
/_site/
178+
/*_files/

.pre-commit-config.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
exclude: (_extensions/|_freeze/|input/|output/)
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.1.0
5+
hooks:
6+
- id: check-yaml
7+
- id: check-toml
8+
- id: check-json
9+
- id: check-case-conflict
10+
- id: check-merge-conflict
11+
- id: check-symlinks
12+
- id: debug-statements
13+
- id: trailing-whitespace
14+
- id: mixed-line-ending
15+
- id: end-of-file-fixer
16+
- repo: local
17+
hooks:
18+
- id: format
19+
name: Format
20+
entry: make format
21+
language: system
22+
pass_filenames: false
23+
- id: lint
24+
name: Lint
25+
entry: make lint
26+
language: system
27+
pass_filenames: false

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Arcadia Science
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Makefile

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
.PHONY: lint
2+
lint:
3+
ruff check --exit-zero .
4+
ruff format --check .
5+
6+
.PHONY: format
7+
format:
8+
ruff check --fix .
9+
ruff format .
10+
11+
.PHONY: pre-commit
12+
pre-commit:
13+
pre-commit run --all-files
14+
15+
.PHONY: test
16+
test:
17+
pytest -v .
18+
19+
.PHONY: execute
20+
execute:
21+
# Project-wide render without executing code cells. Instead, rely on
22+
# pre-computed results present in _freeze/
23+
quarto render
24+
25+
# Now, render `index.ipynb`, with code execution. This will populate
26+
# _freeze/index/ with pre-computed results.
27+
quarto render index.ipynb --execute
28+
29+
.PHONY: preview
30+
preview:
31+
quarto preview
32+
33+
.PHONY: bump-version
34+
bump-version:
35+
python _bump_version.py

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Notebook Publication Template
2+
3+
This repo is a template for Jupyter notebook publications. The template produces a publication rendered and hosted by Quarto, which can be viewed at [this demo URL](https://arcadia-science.github.io/notebook-pub-template/).
4+
5+
## Template Documentation
6+
7+
All the learning resources for this template can be found in `developer-docs/`.
8+
9+
- [Quickstart Guide](developer-docs/QUICKSTART.md) - **The most efficient way to get started** is to follow this guide (the rest can wait)
10+
- [Environment Setup Guide](developer-docs/ENVIRONMENT_SETUP.md) - How to set up your development environment
11+
- [Publishing Guide](developer-docs/PUBLISHING_GUIDE.md) - How to publish your notebook publication
12+
- [Template Architecture](developer-docs/TEMPLATE_ARCHITECTURE.md) - Understanding the template's structure
13+
14+
---
15+
16+
**NOTE: When ready to publish, fill in the information below, then delete this line and everything above it.**
17+
18+
# [PUB-TITLE]
19+
20+
This code repository contains or points to all materials required for creating and hosting the publication entitled, *"[PUB-TITLE]"*.
21+
22+
The publication is hosted at [this URL]([PUB-URL]).
23+
24+
## Data Description
25+
26+
[DESCRIPTION OF THE DATA]
27+
28+
## Reproduce
29+
30+
Please see [SETUP.qmd](SETUP.qmd).
31+
32+
## Contribute
33+
34+
Please see [CONTRIBUTING.qmd](CONTRIBUTING.qmd).

0 commit comments

Comments
 (0)