Skip to content

Commit

Permalink
add jupyter notebook support in documentation (#109)
Browse files Browse the repository at this point in the history
* add jupyter notebook support in documentation

* add ruff linting and formatting for jupyter notebooks

* add the capability for notebook testing
  • Loading branch information
pstjohn authored Aug 20, 2024
1 parent 33ffda3 commit 3c8c2bc
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 5 deletions.
3 changes: 2 additions & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
"streetsidesoftware.code-spell-checker",
"ms-azuretools.vscode-docker",
"charliermarsh.ruff",
"njpwerner.autodocstring"
"njpwerner.autodocstring",
"ms-toolsai.jupyter"
],
"settings": {
"python.analysis.extraPaths": [
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
python-version: '3.10'
- uses: pre-commit/[email protected]
- run: pip install -r requirements-dev.txt
- run: ruff check scripts/ sub-packages/
- run: ruff check scripts/ sub-packages/ docs/
- run: tach check
- uses: trufflesecurity/trufflehog@main
with:
Expand Down
18 changes: 16 additions & 2 deletions .secrets.baseline
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@
{
"path": "detect_secrets.filters.allowlist.is_line_allowlisted"
},
{
"path": "detect_secrets.filters.common.is_baseline_file",
"filename": ".secrets.baseline"
},
{
"path": "detect_secrets.filters.common.is_ignored_due_to_verification_policies",
"min_level": 2
Expand Down Expand Up @@ -122,6 +126,16 @@
"path": "detect_secrets.filters.heuristic.is_templated_secret"
}
],
"results": {},
"generated_at": "2024-07-16T22:20:55Z"
"results": {
"docs/docs/developer-guide/jupyter-notebooks.ipynb": [
{
"type": "Base64 High Entropy String",
"filename": "docs/docs/developer-guide/jupyter-notebooks.ipynb",
"hashed_secret": "9a4fdd92fe53aa1f5be34f8faf864679dfd36481",
"is_verified": true,
"line_number": 83
}
]
},
"generated_at": "2024-08-20T19:17:56Z"
}
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"allclose",
"bionemo",
"dtype",
"NBVAL",
"nemo",
"pretraining",
"rampup",
Expand Down
3 changes: 2 additions & 1 deletion docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ FROM squidfunk/mkdocs-material:latest

# Install plugins.
COPY docs/requirements.txt /tmp/
RUN pip install -r /tmp/requirements.txt
RUN apk add gcc python3-dev musl-dev linux-headers
RUN pip install --disable-pip-version-check --no-cache-dir -r /tmp/requirements.txt
163 changes: 163 additions & 0 deletions docs/docs/developer-guide/jupyter-notebooks.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ plugins:
python:
paths:
- ../sub-packages/*/src
- mkdocs-jupyter

markdown_extensions:
- pymdownx.snippets:
Expand Down
1 change: 1 addition & 0 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ mkdocs-minify-plugin
mkdocstrings[python]
mkdocs-gen-files
pymdown-extensions
mkdocs-jupyter
1 change: 1 addition & 0 deletions requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ testbook==0.4.2
requests_mock==1.11.0
# For SwiftStack access
awscli==1.33.33
nbval==0.11.0

0 comments on commit 3c8c2bc

Please sign in to comment.