Skip to content

Commit fb2993d

Browse files
authored
Initial commit
0 parents  commit fb2993d

32 files changed

+3525
-0
lines changed

.github/dependabot.yml

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
# - package-ecosystem: pip
4+
# directory: "/"
5+
# schedule:
6+
# interval: daily
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
# Check for updates once a week
11+
interval: "weekly"

.github/workflows/nightly-build.yaml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: nightly-build
2+
3+
on:
4+
workflow_dispatch:
5+
schedule:
6+
- cron: "0 0 * * *" # Daily “At 00:00”
7+
8+
jobs:
9+
build:
10+
if: ${{ github.repository_owner == 'ProjectPythia' }}
11+
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
12+
with:
13+
environment_name: cookbook-dev
14+
15+
link-check:
16+
if: ${{ github.repository_owner == 'ProjectPythia' }}
17+
uses: ProjectPythia/cookbook-actions/.github/workflows/link-checker.yaml@main

.github/workflows/publish-book.yaml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: publish-book
2+
3+
on:
4+
# Trigger the workflow on push to main branch
5+
push:
6+
branches:
7+
- main
8+
workflow_dispatch:
9+
10+
jobs:
11+
build:
12+
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
13+
with:
14+
environment_name: cookbook-dev
15+
16+
deploy:
17+
needs: build
18+
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
name: trigger-book-build
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
build:
7+
uses: ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml@main
8+
with:
9+
environment_name: cookbook-dev
10+
artifact_name: book-zip-${{ github.event.number }}
11+
# Other input options are possible, see ProjectPythia/cookbook-actions/.github/workflows/build-book.yaml
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
name: trigger-delete-preview
2+
3+
on:
4+
pull_request_target:
5+
types: closed
6+
7+
jobs:
8+
delete:
9+
uses: ProjectPythia/cookbook-actions/.github/workflows/delete-preview.yaml@main
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
name: trigger-link-check
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
link-check:
7+
uses: ProjectPythia/cookbook-actions/.github/workflows/link-checker.yaml@main
+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: trigger-preview
2+
on:
3+
workflow_run:
4+
workflows:
5+
- trigger-book-build
6+
types:
7+
- requested
8+
- completed
9+
10+
jobs:
11+
find-pull-request:
12+
uses: ProjectPythia/cookbook-actions/.github/workflows/find-pull-request.yaml@main
13+
deploy-preview:
14+
needs: find-pull-request
15+
if: github.event.workflow_run.conclusion == 'success'
16+
uses: ProjectPythia/cookbook-actions/.github/workflows/deploy-book.yaml@main
17+
with:
18+
artifact_name: book-zip-${{ needs.find-pull-request.outputs.number }}
19+
destination_dir: _preview/${{ needs.find-pull-request.outputs.number }} # deploy to subdirectory labeled with PR number
20+
is_preview: "true"
21+
22+
preview-comment:
23+
needs: find-pull-request
24+
uses: ProjectPythia/cookbook-actions/.github/workflows/preview-comment.yaml@main
25+
with:
26+
pull_request_number: ${{ needs.find-pull-request.outputs.number }}
27+
sha: ${{ needs.find-pull-request.outputs.sha }}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: trigger-replace-links
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
permissions:
10+
contents: write
11+
12+
steps:
13+
- uses: actions/checkout@v4
14+
- name: Find and Replace Repository Name
15+
uses: jacobtomlinson/gha-find-replace@v3
16+
with:
17+
find: "ProjectPythia/cookbook-template"
18+
replace: "${{ github.repository_owner }}/${{ github.event.repository.name }}"
19+
regex: false
20+
exclude: ".github/workflows/trigger-replace-links.yaml"
21+
22+
- name: Find and Replace Repository ID
23+
uses: jacobtomlinson/gha-find-replace@v3
24+
with:
25+
find: "475509405"
26+
replace: "${{ github.repository_id}}"
27+
regex: false
28+
exclude: ".github/workflows/trigger-replace-links.yaml"
29+
30+
- name: Push changes
31+
uses: stefanzweifel/git-auto-commit-action@v5

.gitignore

+136
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
# Default JupyterBook build output dir
2+
_build/
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+
notebooks/_build/
16+
develop-eggs/
17+
dist/
18+
downloads/
19+
eggs/
20+
.eggs/
21+
lib/
22+
lib64/
23+
parts/
24+
sdist/
25+
var/
26+
wheels/
27+
pip-wheel-metadata/
28+
share/python-wheels/
29+
*.egg-info/
30+
.installed.cfg
31+
*.egg
32+
MANIFEST
33+
34+
# PyInstaller
35+
# Usually these files are written by a python script from a template
36+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
37+
*.manifest
38+
*.spec
39+
40+
# Installer logs
41+
pip-log.txt
42+
pip-delete-this-directory.txt
43+
44+
# Unit test / coverage reports
45+
htmlcov/
46+
.tox/
47+
.nox/
48+
.coverage
49+
.coverage.*
50+
.cache
51+
nosetests.xml
52+
coverage.xml
53+
*.cover
54+
*.py,cover
55+
.hypothesis/
56+
.pytest_cache/
57+
58+
# Translations
59+
*.mo
60+
*.pot
61+
62+
# Django stuff:
63+
*.log
64+
local_settings.py
65+
db.sqlite3
66+
db.sqlite3-journal
67+
68+
# Flask stuff:
69+
instance/
70+
.webassets-cache
71+
72+
# Scrapy stuff:
73+
.scrapy
74+
75+
# Sphinx documentation
76+
docs/_build/
77+
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+
.python-version
90+
91+
# pipenv
92+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
93+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
94+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
95+
# install all needed dependencies.
96+
#Pipfile.lock
97+
98+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
99+
__pypackages__/
100+
101+
# Celery stuff
102+
celerybeat-schedule
103+
celerybeat.pid
104+
105+
# SageMath parsed files
106+
*.sage.py
107+
108+
# Environments
109+
.env
110+
.venv
111+
env/
112+
venv/
113+
ENV/
114+
env.bak/
115+
venv.bak/
116+
117+
# Spyder project settings
118+
.spyderproject
119+
.spyproject
120+
121+
# Rope project settings
122+
.ropeproject
123+
124+
# mkdocs documentation
125+
/site
126+
127+
# mypy
128+
.mypy_cache/
129+
.dmypy.json
130+
dmypy.json
131+
132+
# Pyre type checker
133+
.pyre/
134+
135+
# Ephemeral .nfs files
136+
.nfs*

.isort.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[settings]
2+
known_third_party =

.pre-commit-config.yaml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.5.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-docstring-first
8+
- id: check-json
9+
- id: check-yaml
10+
- id: double-quote-string-fixer
11+
12+
- repo: https://github.com/psf/black
13+
rev: 23.12.1
14+
hooks:
15+
- id: black
16+
17+
- repo: https://github.com/keewis/blackdoc
18+
rev: v0.3.9
19+
hooks:
20+
- id: blackdoc
21+
22+
- repo: https://github.com/PyCQA/flake8
23+
rev: 7.0.0
24+
hooks:
25+
- id: flake8
26+
27+
- repo: https://github.com/asottile/seed-isort-config
28+
rev: v2.2.0
29+
hooks:
30+
- id: seed-isort-config
31+
32+
- repo: https://github.com/PyCQA/isort
33+
rev: 5.13.2
34+
hooks:
35+
- id: isort
36+
37+
- repo: https://github.com/pre-commit/mirrors-prettier
38+
rev: v3.1.0
39+
hooks:
40+
- id: prettier
41+
additional_dependencies: [[email protected]]
42+
43+
- repo: https://github.com/nbQA-dev/nbQA
44+
rev: 1.7.1
45+
hooks:
46+
- id: nbqa-black
47+
additional_dependencies: [black]
48+
- id: nbqa-pyupgrade
49+
additional_dependencies: [pyupgrade]
50+
exclude: foundations/quickstart.ipynb
51+
- id: nbqa-isort
52+
additional_dependencies: [isort]

CITATION.cff

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
cff-version: 1.2.0
2+
message: "If you use this cookbook, please cite it as below."
3+
authors:
4+
# add additional entries for each author -- see https://github.com/citation-file-format/citation-file-format/blob/main/schema-guide.md
5+
- family-names: Rose
6+
given-names: Brian E. J.
7+
orcid: https://orcid.org/0000-0002-9961-3821 # optional
8+
website: https://github.com/brian-rose # optional
9+
affiliation: University at Albany (State University of New York) # optional
10+
- family-names: Kent
11+
given-names: Julia
12+
orcid: https://orcid.org/0000-0002-5611-8986
13+
website: https://github.com/jukent
14+
affiliation: UCAR/NCAR
15+
- family-names: Tyle
16+
given-names: Kevin
17+
orcid: https://orcid.org/0000-0001-5249-9665
18+
website: https://github.com/ktyle
19+
affiliation: University at Albany (State University of New York)
20+
- family-names: Clyne
21+
given-names: John
22+
orcid: https://orcid.org/0000-0003-2788-9017
23+
website: https://github.com/clyne
24+
affiliation: UCAR/NCAR
25+
- family-names: Camron
26+
given-names: Drew
27+
orcid: https://orcid.org/0000-0001-7246-6502
28+
website: https://github.com/dcamron
29+
affiliation: UCAR/Unidata
30+
- family-names: Grover
31+
given-names: Maxwell
32+
orcid: https://orcid.org/0000-0002-0370-8974
33+
website: https://github.com/mgrover1
34+
affiliation: Argonne National Laboratory
35+
- family-names: Ford
36+
given-names: Robert R.
37+
orcid: https://orcid.org/0000-0001-5483-4965
38+
website: https://github.com/r-ford
39+
affiliation: University at Albany (State University of New York)
40+
- family-names: Paul
41+
given-names: Kevin
42+
orcid: https://orcid.org/0000-0001-8155-8038
43+
website: https://github.com/kmpaul
44+
affiliation: NVIDIA
45+
- name: "Cookbook Template contributors" # use the 'name' field to acknowledge organizations
46+
website: "https://github.com/ProjectPythia/cookbook-template/graphs/contributors"
47+
title: "Cookbook Template"
48+
abstract: "A sample cookbook description."

0 commit comments

Comments
 (0)