Skip to content

Commit

Permalink
Add notebooks section in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Joni Herttuainen committed Mar 26, 2024
1 parent 890c06e commit bd5c098
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
12 changes: 12 additions & 0 deletions doc/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
# -- Path setup --------------------------------------------------------------

import importlib
import subprocess

# -- Project information -----------------------------------------------------

Expand All @@ -25,6 +26,7 @@
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.autosectionlabel",
"sphinx.ext.extlinks",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
]
Expand Down Expand Up @@ -75,3 +77,13 @@
suppress_warnings = [
"autosectionlabel.*",
]

# generate the link to the notebooks on GitHub
_base_url = "https://github.com/BlueBrain/snap"
_git_commit = subprocess.check_output(["git", "rev-parse", "HEAD"], text=True).strip()
extlinks = {
"notebooks_source": (
f"{_base_url}/blob/{_git_commit}/doc/source/notebooks/%s.ipynb",
"Notebook: %s",
)
}
1 change: 1 addition & 0 deletions doc/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:maxdepth: 2

Home <self>
notebooks
api
changelog

Expand Down
31 changes: 31 additions & 0 deletions doc/source/notebooks.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Notebooks
=========

There is a collection of ``jupyter`` notebooks covering most of the use cases.

Circuit
-------
Covers basic circuit usage.

- :notebooks_source:`01_circuits`
- :notebooks_source:`02_node_populations`
- :notebooks_source:`03_node_properties`
- :notebooks_source:`04_edge_properties`

Simulation
----------
Covers basic simulation usage.

- :notebooks_source:`05_simulations`
- :notebooks_source:`06_spike_reports`
- :notebooks_source:`07_frame_reports`


Advanced
--------
Covers more advanced use cases.

- :notebooks_source:`08_nodesets`: How to take full advantage of node sets
- :notebooks_source:`09_node_queries`: Different node queries
- :notebooks_source:`10_edge_queries`: Different edge queries based on node properties
- :notebooks_source:`11_iter_connections`: Efficient querying on large edge collections

0 comments on commit bd5c098

Please sign in to comment.