Skip to content

Commit e9062a8

Browse files
authored
Initial commit
0 parents  commit e9062a8

25 files changed

+3397
-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 }}

.gitignore

+133
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
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/

.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.4.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.3.0
14+
hooks:
15+
- id: black
16+
17+
- repo: https://github.com/keewis/blackdoc
18+
rev: v0.3.8
19+
hooks:
20+
- id: blackdoc
21+
22+
- repo: https://github.com/PyCQA/flake8
23+
rev: 6.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.12.0
34+
hooks:
35+
- id: isort
36+
37+
- repo: https://github.com/pre-commit/mirrors-prettier
38+
rev: v2.7.1
39+
hooks:
40+
- id: prettier
41+
additional_dependencies: [[email protected]]
42+
43+
- repo: https://github.com/nbQA-dev/nbQA
44+
rev: 1.7.0
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]

0 commit comments

Comments
 (0)