Skip to content

Commit

Permalink
add example notebook gallery
Browse files Browse the repository at this point in the history
  • Loading branch information
sophiamaedler committed Nov 17, 2024
1 parent d1d7bde commit 7525613
Show file tree
Hide file tree
Showing 8 changed files with 57 additions and 3 deletions.
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ help:
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

clean:
rm -rf $(SOURCEDIR)/auto_examples
rm -rf $(BUILDDIR)/html/*
rm -rf $(BUILDDIR)/latex/*
rm -rf $(BUILDDIR)/doctrees/*
5 changes: 3 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ def setup(app):
"sphinxarg.ext",
"sphinx_rtd_theme",
"nbsphinx",
"nbsphinx_link",
"sphinx_design",
"sphinx_copybutton",
"sphinx_gallery.gen_gallery"
Expand Down Expand Up @@ -92,8 +93,8 @@ def setup(app):
html_logo = "_static/scPortrait_logo_light.svg"

#set up sphinx gallery
sg_examples_dir = ["../examples/code_snippets"]
sg_gallery_dir = ["auto_examples/code_snippets"]
sg_examples_dir = ["../examples/code_snippets",]
sg_gallery_dir = ["auto_examples/code_snippets",]

sphinx_gallery_conf = {
"doc_module": "scportrait",
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Documentation
:caption: Code Examples

auto_examples/code_snippets/index
pages/example_notebooks.ipynb

.. toctree::
:maxdepth: 2
Expand Down
3 changes: 3 additions & 0 deletions docs/pages/_notebook_sharded_hpa.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../examples/notebooks/example_projects/example_2/processing_notebook.ipynb"
}
3 changes: 3 additions & 0 deletions docs/pages/_notebook_sharded_large.nblink
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"path": "../../examples/notebooks/example_projects/example_1/processing_notebook_sharded.ipynb"
}
44 changes: 44 additions & 0 deletions docs/pages/example_notebooks.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Example Projects"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": [
"nbsphinx-gallery"
]
},
"source": [
"* [Sharded Cellpose Segmentation](_notebook_sharded_large.nblink)\n",
"* [Sharded Cellpose Segmentation on human protein atlas images](_notebook_sharded_hpa.nblink)\n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.11.2"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
2 changes: 1 addition & 1 deletion examples/notebooks
1 change: 1 addition & 0 deletions requirements_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ sphinx
sphinx-argparse
sphinx-rtd-theme==2.0.0
nbsphinx
nbsphinx-link
sphinx-book-theme
sphinx-design
sphinx-copybutton
Expand Down

0 comments on commit 7525613

Please sign in to comment.