Skip to content

Commit c5eae3c

Browse files
committed
ENH: Build notebook docs with nbsphinx
1 parent 34633b2 commit c5eae3c

File tree

7 files changed

+26
-2
lines changed

7 files changed

+26
-2
lines changed

.github/workflows/build-test-publish.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
- os: ubuntu-18.04
256256
c-compiler: "gcc"
257257
cxx-compiler: "g++"
258-
itk-git-tag: "v5.2rc03"
258+
itk-git-tag: "7548a390d71dc25b80e792703ee3cfea17853a99"
259259
cmake-build-type: "Release"
260260

261261
steps:
@@ -274,11 +274,14 @@ jobs:
274274
sudo apt-get update
275275
sudo apt-get install gnuplot dvipng
276276
sudo apt-get install texlive-full
277+
sudo apt-get install pandoc
277278
278279
python -m pip install --upgrade pip
279280
python -m pip install ninja
280281
python -m pip install sphinx==3.0.4
281282
python -m pip install --ignore-installed six
283+
python -m pip install ipython
284+
python -m pip install nbsphinx
282285
283286
- name: Remove Duplicate Declaration Warnings
284287
run: |

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ if(BUILD_DOCUMENTATION)
277277
# Builds the documentation.
278278
find_package(PythonInterp REQUIRED)
279279
find_package(Sphinx REQUIRED)
280+
find_program(PANDOC_BIN pandoc REQUIRED)
280281

281282
set(SPHINX_CONF_DIR ${ITKExamples_BINARY_DIR}/Formatting)
282283
set(SPHINX_INPUT_DIR ${ITKExamples_BINARY_DIR})

Formatting/conf.py.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ primary_domain = 'cpp'
4242
# Add any Sphinx extension module names here, as strings. They can be extensions
4343
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
4444
extensions = ['sphinx.ext.todo', 'sphinx.ext.imgmath', 'sphinx.ext.ifconfig',
45-
'sphinx.ext.viewcode', 'breathe', 'doxylink', 'breathelink']
45+
'sphinx.ext.viewcode', 'breathe', 'doxylink', 'breathelink', 'nbsphinx']
4646

4747
# Add any paths that contain templates here, relative to this directory.
4848
templates_path = ['templates']

src/Core/Transform/MutualInformationAffine/Documentation.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ Mutual Information Affine
66
single: MutualInformationImageToImageMetric
77
single: GradientDescentOptimizer
88

9+
.. toctree::
10+
:maxdepth: 1
11+
12+
MutualInformationAffine.ipynb
13+
914
Synopsis
1015
--------
1116

src/Numerics/Optimizers/ExhaustiveOptimizer/Documentation.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ Exhaustive Optimizer
33

44
.. index::
55
single: ExhaustiveOptimizer
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
10+
PlotExhaustiveOptimizer.ipynb
611

712
Synopsis
813
--------

src/Registration/Common/MutualInformation/Documentation.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ Mutual Information
44
.. index::
55
single: MutualInformationImageToImageMetric
66
single: TranslationTransform
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
11+
MutualInformation.ipynb
712

813
Synopsis
914
--------

src/Registration/Metricsv4/RegisterTwoPointSets/Documentation.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,11 @@ Index
1212

1313
.. seealso:: registration; transformation; pointset
1414

15+
.. toctree::
16+
:maxdepth: 1
17+
18+
RegisterTwoPointSets.ipynb
19+
1520
Synopsis
1621
--------
1722

0 commit comments

Comments
 (0)