Skip to content

Commit

Permalink
add notebooks to docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lorenzocerrone committed Sep 27, 2024
1 parent 87b0ce5 commit b8f3a25
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 2 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ jobs:
python-version: "3.12"
cache-dependency-path: "pyproject.toml"
cache: "pip"

- name: Download Dataset from Zenodo
run: |
mkdir -p data
wget -O data/dataset.zip https://zenodo.org/records/13305156/files/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr.zip?download=1?
unzip -o data/dataset.zip -d data
- name: Install Dependencies
run: |
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,9 @@ docs/_build/
target/

# Jupyter Notebook
.ipynb_checkpoints
*.ipynb_checkpoints
*.ipynb
!docs/**/*.ipynb

# pyenv
.python-version
Expand Down
44 changes: 44 additions & 0 deletions docs/notebooks/quickstart.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"from ngio.core import NgffImage\n",
"\n",
"ngff_image = NgffImage(\"../../data/20200812-CardiomyocyteDifferentiation14-Cycle1.zarr/B/03/0\")\n",
"print(ngff_image.levels_paths)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "dev2",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.6"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
8 changes: 7 additions & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ theme:

nav:
- Home: index.md
- Getting Started: getting-started.md
- Getting Started:
- Installation: getting-started.md
- Getting Started: notebooks/quickstart.ipynb
- API Reference:
- core: api/core.md

Expand All @@ -22,3 +24,7 @@ plugins:
# Use Google-style docstrings, for example
docstring_style: google

- mkdocs-jupyter:
notebooks_dir: notebooks
execute: true

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ docs = [
"mkdocs",
"mkdocs-material",
"mkdocstrings[python]",
"mkdocs-jupyter",
]


Expand Down

0 comments on commit b8f3a25

Please sign in to comment.