Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
28b8b8a
DOC: Deduplicate code for Sphinx's APIdoc generation
oesteban Dec 20, 2019
722bd64
DOC: Deep revision of documentation building
oesteban Dec 21, 2019
c68e3b9
fix: last release changelog
oesteban Dec 21, 2019
48f78d0
enh: accept a milestone number in the ``update_changes.sh`` script
oesteban Dec 21, 2019
0ce15de
fix: remove unnecessary line [skip ci]
oesteban Dec 21, 2019
a51b95a
DOC: Documentation overhaul
oesteban Dec 21, 2019
204c0bd
fix: circle.yml file
oesteban Dec 29, 2019
6de90c5
fix: add modified specs
oesteban Dec 30, 2019
f763008
sty: black
oesteban Dec 30, 2019
1e55bc6
fix: make specs after black
oesteban Dec 30, 2019
f5f7314
maint: remove unused ``build_docs.py`` script
oesteban Dec 30, 2019
9967f25
fix: small typos, pep8 errors, etc.
oesteban Dec 30, 2019
45a6bfc
Update .zenodo.json - added Hrvoje Stojic
hstojic Dec 23, 2019
7c90bd8
MNT: Update mailmap
effigies Dec 30, 2019
d7bef76
change ANTS number_of_time_steps from Float to Int
Dec 20, 2019
218a63d
Apply suggestions from code review
oesteban Jan 1, 2020
9224a6f
Apply suggestions from code review
oesteban Jan 1, 2020
be8d9a9
fix: minimal fixes in ordering and links
oesteban Jan 1, 2020
be900d1
fix: links to interface bases when showing inheritance
oesteban Jan 1, 2020
8b5dab1
Apply suggestions from code review
oesteban Jan 1, 2020
46d8f2b
Apply suggestions from code review
oesteban Jan 1, 2020
022dea5
Apply suggestions from code review
oesteban Jan 1, 2020
ff7dd7d
Update doc/interfaces.rst
oesteban Jan 1, 2020
da67d71
fix: typos and links in fmri auditory example
oesteban Jan 1, 2020
5bdaaf2
fix: updates to ``make_examples.py``
oesteban Jan 1, 2020
9f99aaf
fix: miscellaneous improvements and fixes
oesteban Jan 1, 2020
879c556
fix: documentation build at readthedocs
oesteban Jan 1, 2020
3335c1b
doc: fix sphinx's latex build
oesteban Jan 2, 2020
21ecd6a
fix: strings too long
oesteban Jan 2, 2020
9ef8c95
fix: codacy issues
oesteban Jan 2, 2020
3e2e89f
DOC: Bring examples generation back to ``doc/conf.py``
oesteban Jan 2, 2020
d8b89aa
DOC: Revise generation of examples to work in RTD
oesteban Jan 2, 2020
4b8d467
FIX: Repair aftermath of docs refactor
oesteban Jan 2, 2020
d576418
fix: revise some r-strings in SPM's EstimateContrast
oesteban Jan 2, 2020
aaf677a
sty: black
oesteban Jan 2, 2020
3b8f228
FIX: Can't seem to import workflows from niflows in CircleCI
oesteban Jan 2, 2020
5bc2777
fix: update imports nipype.workflows -> niflow.nipyp1.workflows
oesteban Jan 2, 2020
f122323
pin: new niflows version 0.4.0
oesteban Jan 2, 2020
414fa39
fix: mapnode to generate result file when crashes in single node mode
satra Jan 5, 2020
6df7842
enh: simplify test further
satra Jan 5, 2020
4953418
DOC: Update changelog to include backported PRs
effigies Jan 6, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: Documentation overhaul
Building on top of #3119 and #3129, this PR makes a deep revision of the
documentation:

  * Added a new ``build_docs`` job to CircleCI to test how it renders.
  * Minimized external machinery (under ``/tools/``) when building the
    documentation:

      1. Some minimal modifications to sphinx extensions (apidoc,
         napoleon) allow the generation of special documentation
         for nipype interfaces, as it used to be before this PR
      2. A new sphinx extension (``nipype.sphinxext.apidoc``) takes
         care of parsing and rendering inputs and outputs. They now
         look like the parameters/arguments of functions when formatted
         with numpydoc.

  * Revised the description of many interfaces and the documentation of
    the main class and the input/output specs.
  * Revised the structure of the navbar, separating out
    User-Guide/Examples, Interfaces-Index, and Devs' documentation.
  * Minimized the number of WARNINGS at documentation build to 5 (4 of
    them coming out from the auto-generated SEM tools).
  • Loading branch information
oesteban authored and effigies committed Jan 6, 2020
commit a51b95a64da83141591ddb93aa9dc4cd9d28ffd6
47 changes: 47 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,35 @@ jobs:
ssh-add ~/.ssh/id_ed25519
/home/circleci/nipype/tools/feedstock.sh

build_docs:
docker:
- image: python:3.7.4
working_directory: /tmp/src/nipype
environment:
- FSLOUTPUTTYPE: 'NIFTI'
steps:
- checkout
name: Check Python version and upgrade pip
command: |
python --version
python -m pip install -U pip
- run:
name: Install graphviz
command: |
apt-get update
apt-get install -y graphviz
- run:
name: Install Requirements (may contain pinned versions)
command: python -m pip install -r docs/requirements.txt
- run:
name: Install NiPype
command: python -m pip install ".[doc]"
- run:
name: Build documentation
command: make -C doc html
- store_artifacts:
path: /tmp/src/nipype/doc/_build/html

workflows:
version: 2
build_test_deploy:
Expand All @@ -406,21 +435,39 @@ workflows:
only: /.*/
- compare_base_dockerfiles:
filters:
branches:
ignore:
- /docs?\/.*/
tags:
only: /.*/
- test_pytest:
filters:
branches:
ignore:
- /docs?\/.*/
tags:
only: /.*/
requires:
- compare_base_dockerfiles
- test_fmri_fsl_spm:
filters:
branches:
ignore:
- /docs?\/.*/
requires:
- compare_base_dockerfiles
- test_fmri_spm_dartel_multiproc:
filters:
branches:
ignore:
- /docs?\/.*/
requires:
- compare_base_dockerfiles
- test_fmri_spm_nested_fsl_feeds:
filters:
branches:
ignore:
- /docs?\/.*/
requires:
- compare_base_dockerfiles
- deploy_dockerhub:
Expand Down
31 changes: 5 additions & 26 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@ PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .

.PHONY: help clean html nipypeapi htmlonly latex changes linkcheck doctest
.PHONY: help clean html htmlonly latex changes linkcheck doctest

help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html make the HTML documentation"
@echo " nipypeapi make interface API documents only"
@echo " latex make the LaTeX, you can set PAPER=a4 or PAPER=letter"
@echo " pdf make <latex> and run the PDF generation"
@echo " changes make an overview of all changed/added/deprecated" \
Expand All @@ -33,20 +32,15 @@ htmlonly:
@echo
@echo "Build finished. The HTML pages are in _build/html."

nipypeapi:
rm -rf interfaces/generated
python -u ../tools/build_interface_docs.py
@echo "Build API docs finished."

html: clean examples2rst nipypeapi htmlonly
html: clean examples2rst htmlonly
@echo "Build HTML and API finished."

examples2rst:
examples2rst: clean
mkdir -p users/examples
../tools/make_examples.py --no-exec
../tools/make_examples.py -x ../../../examples/test_spm.py --no-exec
@echo "examples2rst finished."

latex: nipypeapi
latex: clean
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
@echo
@echo "Build finished; the LaTeX files are in _build/latex."
Expand Down Expand Up @@ -80,18 +74,3 @@ gitwash-update:
--project-url=http://nipy.org/nipype \
--project-ml-url=http://mail.scipy.org/mailman/listinfo/nipy-devel
@echo "gitwash updated"

# Sourceforge doesn't appear to have a way of copying the files
# without specifying a username. So we'll probably have one target
# for each project admin
sf_satra_nightly: html
@echo "Copying html files to sourceforge..."
scp -r _build/html/* satra,[email protected]:htdocs/nipype-nightly/

sf_satra: html
@echo "Copying html files to sourceforge..."
rsync -auv _build/html/. satra,[email protected]:htdocs/nipype/.

sf_filo: html
@echo "Copying html files to sourceforge..."
rsync -auv _build/html/. gorgolewski,[email protected]:htdocs/nipype/.
28 changes: 0 additions & 28 deletions doc/README.txt

This file was deleted.

4 changes: 3 additions & 1 deletion doc/_templates/navbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

<a class="navbar" href="{{pathto('index')}}">Home</a> ·
<a class="navbar" href="{{pathto('quickstart')}}">Quickstart</a> ·
<a class="navbar" href="{{pathto('documentation')}}">Documentation</a> ·
<a class="navbar" href="{{pathto('examples')}}">User Guide and Examples</a> ·
<a class="navbar" href="{{pathto('interfaces')}}">Interfaces Index</a> ·
<a class="navbar" href="{{pathto('developers')}}">Developers</a> ·
<a class="navbar" href="{{pathto('about')}}">About</a> ·
<a class="navbar" href="http://nipy.org">Nipy</a>

2 changes: 2 additions & 0 deletions doc/about.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
:orphan:

.. _about:

=====
Expand Down
15 changes: 0 additions & 15 deletions doc/api/index.rst

This file was deleted.

1 change: 1 addition & 0 deletions doc/changes.rst
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
:orphan:
:tocdepth: 2

.. _changes:
Expand Down
20 changes: 7 additions & 13 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,6 @@
from packaging.version import Version
import nipype

# if not os.path.exists('users/examples'):
# os.mkdir('users/examples')
# os.system('python ../tools/make_examples.py --no-exec')

# if os.path.exists('interfaces/generated'):
# rmtree('interfaces/generated')
# os.system('python ../tools/build_interface_docs.py')

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
Expand All @@ -41,9 +33,11 @@
'sphinx.ext.inheritance_diagram',
'sphinx.ext.todo',
'sphinxcontrib.apidoc',
'sphinxcontrib.napoleon',
'matplotlib.sphinxext.plot_directive',
'nbsphinx',
'nipype.sphinxext.plot_workflow',
'nipype.sphinxext.apidoc',
'nipype.sphinxext.documenter',
]

autodoc_mock_imports = [
Expand All @@ -57,6 +51,8 @@
'skimage',
'svgutils',
'transforms3d',
'tvtk',
'vtk'
]

# Accept custom section names to be parsed for numpy-style docstrings
Expand All @@ -68,6 +64,8 @@
('Inputs', 'Parameters'),
('Outputs', 'Parameters'),
('Attributes', 'Parameters'),
('Mandatory Inputs', 'Parameters'),
('Optional Inputs', 'Parameters'),
]


Expand Down Expand Up @@ -122,8 +120,6 @@
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = [
'_build', 'Thumbs.db', '.DS_Store',
'api/generated/gen.rst',
'interfaces/generated/gen.rst'
]

# The reST default role (used for this markup: `text`) to use for all documents.
Expand Down Expand Up @@ -278,10 +274,8 @@
apidoc_output_dir = 'api/generated'
apidoc_excluded_paths = [
'*/tests/*', 'tests/*',
'algorithms/*',
'external/*',
'fixes/*',
'interfaces/*',
'scripts/*',
'sphinxext/*',
'testing/*',
Expand Down
17 changes: 17 additions & 0 deletions doc/developers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
:orphan:

.. _developers:

==================
Developer's Corner
==================

.. toctree::
:maxdepth: 2

devel/index

.. toctree::
:maxdepth: 3

api/generated/nipype
73 changes: 0 additions & 73 deletions doc/documentation.rst

This file was deleted.

19 changes: 19 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
:orphan:

.. _examples:

=======================
User Guide and Examples
=======================

.. admonition:: Michael Notter's User Guide

Be sure to read `Michael's excellent tutorials <https://miykael.github.io/nipype_tutorial/>`__.

Examples
~~~~~~~~
.. toctree::
:maxdepth: 1
:glob:

users/examples/*
Loading