Skip to content

Commit f84312a

Browse files
authored
Merge pull request #322 from thewtex/sphinx-update
ENH: Update Sphinx to 4.4.0
2 parents 6b9e0fe + 4255ef2 commit f84312a

File tree

9 files changed

+28
-62
lines changed

9 files changed

+28
-62
lines changed

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

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,10 @@ jobs:
262262
cmake-build-type: "Release"
263263

264264
steps:
265-
- uses: actions/checkout@v1
265+
- uses: actions/checkout@v2
266+
with:
267+
path: Ex
268+
submodules: recursive
266269

267270
- name: Set up Python 3.8
268271
uses: actions/setup-python@v1
@@ -282,10 +285,9 @@ jobs:
282285
283286
python -m pip install --upgrade pip
284287
python -m pip install ninja
285-
python -m pip install sphinx==3.0.4
288+
python -m pip install 'sphinx==4.4.0' 'docutils<0.18'
286289
python -m pip install --ignore-installed six
287290
python -m pip install ipython
288-
python -m pip install nbsphinx
289291
290292
- name: Remove Duplicate Declaration Warnings
291293
run: |
@@ -309,26 +311,27 @@ jobs:
309311
310312
- name: Fetch CTest driver script
311313
run: |
312-
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITK/dashboard/itk_common.cmake -O
314+
curl -L https://raw.githubusercontent.com/InsightSoftwareConsortium/ITKSphinxExamples/dashboard/itkexamples_common.cmake -O
313315
314316
- name: Configure CTest script
315317
shell: bash
316318
run: |
319+
mv Ex ../../
317320
operating_system="${{ matrix.os }}"
318321
cat > dashboard.cmake << EOF
319322
set(CTEST_SITE "GitHubActions")
320-
file(TO_CMAKE_PATH "${GITHUB_WORKSPACE}/.." CTEST_DASHBOARD_ROOT)
321-
file(TO_CMAKE_PATH "${GITHUB_WORKSPACE}/" CTEST_SOURCE_DIRECTORY)
322-
file(TO_CMAKE_PATH "${GITHUB_WORKSPACE}/ITKSphinxExamples-build" CTEST_BINARY_DIRECTORY)
323-
set(dashboard_source_name "${GITHUB_REPOSITORY}")
323+
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/.." CTEST_DASHBOARD_ROOT)
324+
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../../Ex" CTEST_SOURCE_DIRECTORY)
325+
file(TO_CMAKE_PATH "\$ENV{GITHUB_WORKSPACE}/../../bld/" CTEST_BINARY_DIRECTORY)
326+
set(dashboard_superbuild 1)
324327
if(ENV{GITHUB_REF} MATCHES "master")
325328
set(branch "-master")
326329
set(dashboard_model "Continuous")
327330
else()
328331
set(branch "-${GITHUB_REF}")
329332
set(dashboard_model "Experimental")
330333
endif()
331-
set(CTEST_BUILD_NAME "${GITHUB_REPOSITORY}-${operating_system}-\${branch}")
334+
set(CTEST_BUILD_NAME "${GITHUB_REPOSITORY}-${operating_system}-\${branch}-docs")
332335
set(CTEST_UPDATE_VERSION_ONLY 1)
333336
set(CTEST_TEST_ARGS \${CTEST_TEST_ARGS} PARALLEL_LEVEL \${PARALLEL_LEVEL})
334337
set(CTEST_BUILD_CONFIGURATION "Release")
@@ -341,15 +344,17 @@ jobs:
341344
set(dashboard_no_clean 1)
342345
set(ENV{CC} ${{ matrix.c-compiler }})
343346
set(ENV{CXX} ${{ matrix.cxx-compiler }})
347+
if(WIN32)
348+
set(ENV{PATH} "\${CTEST_DASHBOARD_ROOT}/ITK-build/bin;\$ENV{PATH}")
349+
endif()
344350
set(dashboard_cache "
345-
ITK_DIR:PATH=\${CTEST_DASHBOARD_ROOT}/ITK-build
346351
BUILD_TESTING:BOOL=ON
347352
BUILD_DOCUMENTATION:BOOL=ON
348353
")
349354
string(TIMESTAMP build_date "%Y-%m-%d")
350355
message("CDash Build Identifier: \${build_date} \${CTEST_BUILD_NAME}")
351356
message("CTEST_SITE = \${CTEST_SITE}")
352-
include(\${CTEST_SCRIPT_DIRECTORY}/itk_common.cmake)
357+
include(\${CTEST_SCRIPT_DIRECTORY}/itkexamples_common.cmake)
353358
EOF
354359
cat dashboard.cmake
355360
@@ -362,14 +367,14 @@ jobs:
362367
with:
363368
name: Documentation
364369
path: |
365-
${{ github.workspace }}/ITKSphinxExamples-build/ITKSphinxExamples-*-html.tar.gz
366-
${{ github.workspace }}/ITKSphinxExamples-build/ITKSphinxExamples-*-html.zip
370+
${{ github.workspace }}/../../bld/ITKEx-build/ITKSphinxExamples-*-html.tar.gz
371+
${{ github.workspace }}/../../bld/ITKEx-build/ITKSphinxExamples-*-html.zip
367372
368373
- name: Unpack site
369374
shell: bash
370375
run: |
371376
mkdir site
372-
tar --strip-components=1 -xf ${{ github.workspace }}/ITKSphinxExamples-build/ITKSphinxExamples-*-html.tar.gz -C site
377+
tar --strip-components=1 -xf ${{ github.workspace }}/../../ITKEx-build/ITKSphinxExamples-*-html.tar.gz -C site
373378
374379
- name: Publish website to Netlify
375380
uses: nwtgck/actions-netlify@v1.1.13

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
[submodule "Utilities/SphinxExtensions/breathe"]
55
path = Utilities/SphinxExtensions/breathe
66
url = https://github.com/michaeljones/breathe
7-
[submodule "Utilities/SphinxExtensions/gitstats"]
8-
path = Utilities/SphinxExtensions/gitstats
9-
url = https://github.com/arnaudgelas/gitstats.git
107
[submodule "Utilities/SphinxExtensions/sphinx-bootstrap-theme"]
118
path = Utilities/SphinxExtensions/sphinx-bootstrap-theme
129
url = https://github.com/ryan-roemer/sphinx-bootstrap-theme

CMakeLists.txt

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -251,16 +251,6 @@ if(BUILD_DOCUMENTATION)
251251
# was built before build_html.
252252
add_dependencies(copy_sources ITKSphinxExamplesData)
253253

254-
configure_file("${ITKSphinxExamples_SOURCE_DIR}/Utilities/SphinxExtensions/RunGitStats.cmake.in"
255-
"${ITKSphinxExamples_BINARY_DIR}/Utilities/SphinxExtensions/RunGitStats.cmake"
256-
@ONLY)
257-
add_custom_target(gitstats ALL
258-
COMMAND ${CMAKE_COMMAND} -P "${ITKSphinxExamples_BINARY_DIR}/Utilities/SphinxExtensions/RunGitStats.cmake"
259-
WORKING_DIRECTORY ${ITKSphinxExamples_BINARY_DIR}
260-
COMMENT "Running gitstats"
261-
)
262-
add_dependencies(gitstats copy_sources)
263-
264254
# A high level target that the individual targets depend on.
265255
add_custom_target(CreateDownloadableArchives ALL
266256
${CMAKE_COMMAND} -E echo "Done creating individual example downloadable archives..."
@@ -282,7 +272,7 @@ if(BUILD_DOCUMENTATION)
282272
set(SPHINX_CONF_DIR ${ITKSphinxExamples_BINARY_DIR}/Formatting)
283273
set(SPHINX_INPUT_DIR ${ITKSphinxExamples_BINARY_DIR})
284274
set(SPHINX_DESTINATION ${ITKSphinxExamples_BINARY_DIR})
285-
set(SPHINX_DEPENDENCIES gitstats ITKDoxygenXML ITKSphinxExamplesData ITKDoxygenTAG CreateDownloadableArchives)
275+
set(SPHINX_DEPENDENCIES ITKDoxygenXML ITKSphinxExamplesData ITKDoxygenTAG CreateDownloadableArchives)
286276

287277
option(DOC_WITH_LOCAL_DOXYGEN "Generate documentation with local doxygen" OFF)
288278
mark_as_advanced(DOC_WITH_LOCAL_DOXYGEN)

Documentation/Credits.rst

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,9 @@
11
Credits
22
==========
33

4-
.. toctree::
5-
:maxdepth: 2
6-
7-
gitstats/index
8-
gitstats/authors
9-
gitstats/activity
10-
gitstats/files
11-
gitstats/lines
12-
gitstats/tags
4+
.. contributors:: InsightSoftwareConsortium/ITKSphinxExamples
5+
:contributions:
6+
:avatars:
7+
:exclude: itkrobot
8+
:limit: 100
9+
:order: DESC

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', 'sphinx.ext.imgconverter', 'breathe', 'doxylink', 'breathelink', 'nbsphinx']
45+
'sphinx.ext.viewcode', 'sphinx.ext.imgconverter', 'breathe', 'doxylink', 'breathelink', 'nbsphinx', 'sphinx_contributors']
4646

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

Superbuild/External-Python.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@ ExternalProject_Add(ITKPython
1717
DOWNLOAD_COMMAND ""
1818
CONFIGURE_COMMAND ${PYTHON_EXECUTABLE} -m venv "${_itk_venv}"
1919
BUILD_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --upgrade pip
20-
INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.2.0.post2 sphinx==3.0.4 six black nbsphinx ipython
20+
INSTALL_COMMAND ${ITKPYTHON_EXECUTABLE} -m pip install --ignore-installed itk>=5.2.0.post2 sphinx==4.4.0 docutils<0.18 six black nbsphinx ipython sphinx-contributors
2121
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/ITKBlackConfig.cmake
2222
)

Superbuild/Superbuild.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ if(BUILD_DOCUMENTATION)
8888
"-DSPHINX_DEVHELP_OUTPUT:BOOL=${SPHINX_DEVHELP_OUTPUT}"
8989
"-DSPHINX_DIRHTML_OUTPUT:BOOL=${SPHINX_DIRHTML_OUTPUT}"
9090
"-DSPHINX_EPUB_OUTPUT:BOOL=${SPHINX_EPUB_OUTPUT}"
91-
"-DSPHINX_HTMLHELP_OUTPUT:BOOL=${SPHINX_HTMLHELP_OUTPUT}"
9291
"-DSPHINX_HTML_OUTPUT:BOOL=${SPHINX_HTML_OUTPUT}"
9392
"-DSPHINX_LATEX_OUTPUT:BOOL=${SPHINX_LATEX_OUTPUT}"
9493
"-DSPHINX_MAN_OUTPUT:BOOL=${SPHINX_MAN_OUTPUT}"

Utilities/SphinxExtensions/RunGitStats.cmake.in

Lines changed: 0 additions & 21 deletions
This file was deleted.

Utilities/SphinxExtensions/gitstats

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)