From 18abc87bac0f9c15cb64c76bcd19c8e528480849 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Thu, 4 Aug 2022 11:18:23 +0200 Subject: [PATCH 1/6] basic set up for auto doc main CLI --- docs/conf.py | 1 + docs/user_guide/cli_auto.rst | 7 +++++++ docs/user_guide/index.rst | 1 + setup.cfg | 1 + 4 files changed, 10 insertions(+) create mode 100644 docs/user_guide/cli_auto.rst diff --git a/docs/conf.py b/docs/conf.py index ebe09bec..a3c02855 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -45,6 +45,7 @@ "sphinx.ext.viewcode", # "sphinx.ext.linkcode", "sphinxcontrib.apidoc", + 'sphinx_click', ] # Add any paths that contain templates here, relative to this directory. diff --git a/docs/user_guide/cli_auto.rst b/docs/user_guide/cli_auto.rst new file mode 100644 index 00000000..3a6c2e34 --- /dev/null +++ b/docs/user_guide/cli_auto.rst @@ -0,0 +1,7 @@ +Command-line Interface +====================== + +.. click:: neurodocker.cli.cli:cli + :prog: neurodocker + :nested: full + diff --git a/docs/user_guide/index.rst b/docs/user_guide/index.rst index 5c5b372b..83ab6dc0 100644 --- a/docs/user_guide/index.rst +++ b/docs/user_guide/index.rst @@ -6,6 +6,7 @@ User Guide installation quickstart cli + cli_auto examples common_uses minify diff --git a/setup.cfg b/setup.cfg index 8806d74e..ce030758 100644 --- a/setup.cfg +++ b/setup.cfg @@ -50,6 +50,7 @@ docs = sphinx >= 3.4 pydata-sphinx-theme sphinxcontrib.apidoc >= 0.3 + sphinx-click all = %(minify)s %(dev)s From 5c173ed5e630ec62aed30630e9fd3800753de1a4 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Tue, 22 Aug 2023 05:17:57 -0400 Subject: [PATCH 2/6] update doc --- docs/conf.py | 2 +- docs/index.rst | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/conf.py b/docs/conf.py index 35163ead..b0a86492 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -66,7 +66,7 @@ # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] +# html_static_path = ["_static"] # -- Options for extensions --------------------------------------------------- diff --git a/docs/index.rst b/docs/index.rst index 939a497d..16e11e18 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -16,7 +16,6 @@ This website is in progress. Is there is something you would like to see here, p :caption: Contents: user_guide/index - build_results api From 549eceb4a20960a23a951d9632c43dd9a5a67cff Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 3 Sep 2023 10:57:47 -0400 Subject: [PATCH 3/6] autobuild CLI help --- .github/workflows/docs.yml | 4 +- docs/Makefile | 5 +- docs/generate_cli_help.sh | 11 + docs/user_guide/.gitignore | 1 + docs/user_guide/cli.rst | 511 +---------------------------------- docs/user_guide/cli_auto.rst | 7 - docs/user_guide/index.rst | 1 - 7 files changed, 26 insertions(+), 514 deletions(-) create mode 100644 docs/generate_cli_help.sh create mode 100644 docs/user_guide/.gitignore delete mode 100644 docs/user_guide/cli_auto.rst diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 060838f6..79adb7f4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -16,7 +16,9 @@ jobs: - name: Install neurodocker run: python -m pip install --editable .[docs] - name: build docs - run: sphinx-build docs docs-build + run: | + make -C docs cli + sphinx-build docs docs-build - name: Deploy uses: JamesIves/github-pages-deploy-action@v4 with: diff --git a/docs/Makefile b/docs/Makefile index d4bb2cbb..5942c131 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -14,7 +14,10 @@ help: .PHONY: help Makefile +cli: + bash generate_cli_help.sh + # Catch-all target: route all unknown targets to Sphinx using the new # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile +%: Makefile cli @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/generate_cli_help.sh b/docs/generate_cli_help.sh new file mode 100644 index 00000000..9abc6843 --- /dev/null +++ b/docs/generate_cli_help.sh @@ -0,0 +1,11 @@ +#! /bin/bash + +# quick and dirty way to make sure the CLI help is up to date + +echo "Generating CLI help for Neurodocker and its subcommands..." + +neurodocker --help > user_guide/cli_help.txt +neurodocker generate --help > user_guide/generate_cli_help.txt +neurodocker generate docker --help > user_guide/generate_docker_cli_help.txt +neurodocker generate singularity --help > user_guide/generate_singularity_cli_help.txt +neurodocker minify --help > user_guide/minify_cli_help.txt diff --git a/docs/user_guide/.gitignore b/docs/user_guide/.gitignore new file mode 100644 index 00000000..2211df63 --- /dev/null +++ b/docs/user_guide/.gitignore @@ -0,0 +1 @@ +*.txt diff --git a/docs/user_guide/cli.rst b/docs/user_guide/cli.rst index 479480fe..9b4c3667 100644 --- a/docs/user_guide/cli.rst +++ b/docs/user_guide/cli.rst @@ -7,499 +7,25 @@ This program has two subcommands: :code:`generate` and :code:`minify`. neurodocker ----------- - .. code-block:: - - Usage: neurodocker [OPTIONS] COMMAND [ARGS]... - - Generate custom containers, and minify existing containers. - - Options: - --version Show the version and exit. - --help Show this message and exit. - - Commands: - generate Generate a container. - minify Minify a container. +.. literalinclude:: cli_help.txt neurodocker generate ~~~~~~~~~~~~~~~~~~~~ -.. code-block:: - - Usage: neurodocker generate [OPTIONS] COMMAND [ARGS]... +.. literalinclude:: generate_cli_help.txt - Generate a container. - - Options: - --template-path DIRECTORY Path to directories with templates to register - [env var: REPROENV_TEMPLATE_PATH] - - --help Show this message and exit. - - Commands: - docker Generate a Dockerfile. - singularity Generate a Singularity recipe. - -The :code: `neurodocker generate` command has two subcommands: `docker` and `singularity`. Most of the arguments for these subcommands are identical, but please check the details below. +The ``neurodocker generate`` command has two subcommands: `docker` and `singularity`. +Most of the arguments for these subcommands are identical, but please check the details below. neurodocker generate docker ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. code-block:: - - Usage: neurodocker generate docker [OPTIONS] - - Generate a Dockerfile. - - Options: - -p, --pkg-manager [apt|yum] System package manager [required] - -b, --base-image TEXT Base image [required] - --arg KEY=VALUE Build-time variables (do not persist after - container is built) - - --copy TUPLE Copy files into the container. Provide at least - two paths. The last path is always the - destination path in the container. - - --env KEY=VALUE Set persistent environment variables - --entrypoint TUPLE Set entrypoint of the container - --install TUPLE Install packages with system package manager - --label KEY=VALUE Set labels on the container - --run TEXT Run commands in /bin/sh - --run-bash TEXT Run commands in a bash shell - --user TEXT Switch to a different user (create user if it - does not exist) - - --workdir TEXT Set the working directory - --yes Reply yes to all prompts for agreeing to any - alerts that a neurodocker template might have. - The alert messages will still be printed but - no confirmation is necessary from the user. - - --json Output instructions as JSON. This can be used - to generate Dockerfiles or Singularity recipes - with Neurodocker. - - --_header KEY=VALUE Add _header - method=[source] - options for method=source - - --afni KEY=VALUE Add afni - method=[binaries|source] - options for method=binaries - - install_path [default: /opt/afni-{{ self.version }}] - - version [default: latest] - - install_r_pkgs [default: false] - - install_python3 [default: false] - options for method=source - - version [required] - - repo [default: https://github.com/afni/afni.git] - - install_path [default: /opt/afni-{{ self.version }}] - - install_r_pkgs [default: false] - - install_python3 [default: false] - - --ants KEY=VALUE Add ants - method=[binaries|source] - options for method=binaries - - version [required] - version=[2.4.1|2.3.4|2.3.2|2.3.1|2.3.0|2.2.0|2.1.0|2.0.3|2.0.0] - - install_path [default: /opt/ants-{{ self.version }}] - options for method=source - - version [required] - - repo [default: https://github.com/ANTsX/ANTs.git] - - install_path [default: /opt/ants-{{ self.version }}] - - cmake_opts [default: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF] - - make_opts [default: -j1] - - --cat12 KEY=VALUE Add cat12 - method=[binaries] - options for method=binaries - - version [required] - version=[r1933_R2017b] - - install_path [default: /opt/CAT12-{{ self.version }}] - - --convert3d KEY=VALUE Add convert3d - method=[binaries] - options for method=binaries - - version [required] - version=[nightly|1.0.0] - - install_path [default: /opt/convert3d-{{ self.version }}] - - --dcm2niix KEY=VALUE Add dcm2niix - method=[binaries|source] - options for method=binaries - - version [required] - version=[v1.0.20201102|v1.0.20200331|v1.0.20190902|latest] - - install_path [default: /opt/dcm2niix-{{ self.version }}] - options for method=source - - version [required] - - repo [default: https://github.com/rordenlab/dcm2niix] - - install_path [default: /opt/dcm2niix-{{ self.version }}] - - cmake_opts [default: ] - - make_opts [default: -j1] - - --freesurfer KEY=VALUE Add freesurfer - method=[binaries] - options for method=binaries - - version [required] - version=[7.3.1|7.3.0|7.2.0|7.1.1-min|7.1.1|7.1.0|6.0.1|6.0.0-min|6.0.0] - - install_path [default: /opt/freesurfer-{{ self.version }}] - - exclude_paths [default: average/mult-comp-cor - lib/cuda - lib/qt - subjects/V1_average - subjects/bert - subjects/cvs_avg35 - subjects/cvs_avg35_inMNI152 - subjects/fsaverage3 - subjects/fsaverage4 - subjects/fsaverage5 - subjects/fsaverage6 - subjects/fsaverage_sym - trctrain - ] - - --fsl KEY=VALUE Add fsl - method=[binaries] - options for method=binaries - - version [required] - version=[6.0.6.4|6.0.6.3|6.0.6.2|6.0.6.1|6.0.6|6.0.5.2|6.0.5.1|6.0.5|6.0.4|6.0.3|6.0.2|6.0.1|6.0.0|5.0.9|5.0.8|5.0.11|5.0.10] - - install_path [default: /opt/fsl-{{ self.version }}] - - exclude_paths [default: ] - **Note**: FSL is non-free. If you are considering commercial use of FSL, please consult the relevant license(s). - - --jq KEY=VALUE Add jq - method=[binaries|source] - options for method=binaries - - version [required] - version=[1.6|1.5] - options for method=source - - version [required] - - --matlabmcr KEY=VALUE Add matlabmcr - method=[binaries] - options for method=binaries - - version [required] - version=[2021b|2021a|2020b|2020a|2019b|2019a|2018b|2018a|2017b|2017a|2016b|2016a|2015b|2015aSP1|2015a|2014b|2014a|2013b|2013a|2012b|2012a|2010a] - - curl_opts [default: ] - - install_path [default: /opt/MCR-{{ self.version }}] - - --minc KEY=VALUE Add minc - method=[binaries] - options for method=binaries - - version [required] - version=[1.9.18|1.9.17|1.9.16|1.9.15] - - install_path [default: /opt/minc-{{ self.version }}] - - --miniconda KEY=VALUE Add miniconda - method=[binaries] - options for method=binaries - - version [required] - version=[latest|*] - - install_path [default: /opt/miniconda-{{ self.version }}] - - installed [default: false] - - env_name [default: base] - - env_exists [default: true] - - conda_install [default: ] - - pip_install [default: ] - - conda_opts [default: ] - - pip_opts [default: ] - - yaml_file [default: ] - - --mricron KEY=VALUE Add mricron - method=[binaries] - options for method=binaries - - version [required] - version=[1.0.20190902|1.0.20190410|1.0.20181114|1.0.20180614|1.0.20180404|1.0.20171220] - - install_path [default: /opt/mricron-{{ self.version }}] - - --mrtrix3 KEY=VALUE Add mrtrix3 - method=[binaries|source] - options for method=binaries - - version [required] - version=[3.0.2|3.0.1|3.0.0] - - install_path [default: /opt/mrtrix3-{{ self.version }}] - - build_processes [default: 1] - options for method=source - - version [required] - - repo [default: https://github.com/MRtrix3/mrtrix3.git] - - install_path [default: /opt/mrtrix3-{{ self.version }}] - - build_processes [default: ] - - --ndfreeze KEY=VALUE Add ndfreeze - method=[source] - options for method=source - - date [required] - - opts [default: ] - - --neurodebian KEY=VALUE Add neurodebian - method=[binaries] - options for method=binaries - - version [required] - version=[usa-tn|usa-nh|usa-ca|japan|greece|germany-munich|germany-magdeburg|china-zhejiang|china-tsinghua|china-scitech|australia] - - os_codename [required] - - full_or_libre [default: full] - - --niftyreg KEY=VALUE Add niftyreg - method=[source] - options for method=source - - version [required] - - repo [default: https://github.com/KCL-BMEIS/niftyreg] - - install_path [default: /opt/niftyreg-{{ self.version }}] - - cmake_opts [default: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF] - - make_opts [default: -j1] - - --petpvc KEY=VALUE Add petpvc - method=[binaries] - options for method=binaries - - version [required] - version=[1.2.4|1.2.2|1.2.1|1.2.0-b|1.2.0-a|1.1.0|1.0.0] - - install_path [default: /opt/petpvc-{{ self.version }}] - - --spm12 KEY=VALUE Add spm12 - method=[binaries] - options for method=binaries - - version [required] - version=[r7771|r7487|r7219|r6914|r6685|r6472|r6225|dev] - - install_path [default: /opt/spm12-{{ self.version }}] - - matlab_install_path [default: /opt/matlab-compiler-runtime-2010a] - - --vnc KEY=VALUE Add vnc - method=[source] - options for method=source - - passwd [required] - - --help Show this message and exit. +.. literalinclude:: generate_docker_cli_help.txt neurodocker generate singularity ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -.. code-block:: - - Usage: neurodocker generate singularity [OPTIONS] - - Generate a Singularity recipe. - - Options: - -p, --pkg-manager [apt|yum] System package manager [required] - -b, --base-image TEXT Base image [required] - --arg KEY=VALUE Build-time variables (do not persist after - container is built) - - --copy TUPLE Copy files into the container. Provide at least - two paths. The last path is always the - destination path in the container. - - --env KEY=VALUE Set persistent environment variables - --entrypoint TUPLE Set entrypoint of the container - --install TUPLE Install packages with system package manager - --label KEY=VALUE Set labels on the container - --run TEXT Run commands in /bin/sh - --run-bash TEXT Run commands in a bash shell - --user TEXT Switch to a different user (create user if it - does not exist) - - --workdir TEXT Set the working directory - --yes Reply yes to all prompts for agreeing to any - alerts that a neurodocker template might have. - The alert messages will still be printed but - no confirmation is necessary from the user. - - --json Output instructions as JSON. This can be used - to generate Dockerfiles or Singularity recipes - with Neurodocker. - --_header KEY=VALUE Add _header - method=[source] - options for method=source - - --afni KEY=VALUE Add afni - method=[binaries|source] - options for method=binaries - - install_path [default: /opt/afni-{{ self.version }}] - - version [default: latest] - - install_r_pkgs [default: false] - - install_python3 [default: false] - options for method=source - - version [required] - - repo [default: https://github.com/afni/afni.git] - - install_path [default: /opt/afni-{{ self.version }}] - - install_r_pkgs [default: false] - - install_python3 [default: false] - - --ants KEY=VALUE Add ants - method=[binaries|source] - options for method=binaries - - version [required] - version=[2.4.1|2.3.4|2.3.2|2.3.1|2.3.0|2.2.0|2.1.0|2.0.3|2.0.0] - - install_path [default: /opt/ants-{{ self.version }}] - options for method=source - - version [required] - - repo [default: https://github.com/ANTsX/ANTs.git] - - install_path [default: /opt/ants-{{ self.version }}] - - cmake_opts [default: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF] - - make_opts [default: -j1] - - --cat12 KEY=VALUE Add cat12 - method=[binaries] - options for method=binaries - - version [required] - version=[r1933_R2017b] - - install_path [default: /opt/CAT12-{{ self.version }}] - - - --convert3d KEY=VALUE Add convert3d - method=[binaries] - options for method=binaries - - version [required] - version=[nightly|1.0.0] - - install_path [default: /opt/convert3d-{{ self.version }}] - - --dcm2niix KEY=VALUE Add dcm2niix - method=[binaries|source] - options for method=binaries - - version [required] - version=[v1.0.20201102|v1.0.20200331|v1.0.20190902|latest] - - install_path [default: /opt/dcm2niix-{{ self.version }}] - options for method=source - - version [required] - - repo [default: https://github.com/rordenlab/dcm2niix] - - install_path [default: /opt/dcm2niix-{{ self.version }}] - - cmake_opts [default: ] - - make_opts [default: -j1] - - --freesurfer KEY=VALUE Add freesurfer - method=[binaries] - options for method=binaries - - version [required] - version=[7.3.1|7.3.0|7.2.0|7.1.1-min|7.1.1|7.1.0|6.0.1|6.0.0-min|6.0.0] - - install_path [default: /opt/freesurfer-{{ self.version }}] - - exclude_paths [default: average/mult-comp-cor - lib/cuda - lib/qt - subjects/V1_average - subjects/bert - subjects/cvs_avg35 - subjects/cvs_avg35_inMNI152 - subjects/fsaverage3 - subjects/fsaverage4 - subjects/fsaverage5 - subjects/fsaverage6 - subjects/fsaverage_sym - trctrain - ] - - --fsl KEY=VALUE Add fsl - method=[binaries] - options for method=binaries - - version [required] - version=[6.0.6.4|6.0.6.3|6.0.6.2|6.0.6.1|6.0.6|6.0.5.2|6.0.5.1|6.0.5|6.0.4|6.0.3|6.0.2|6.0.1|6.0.0|5.0.9|5.0.8|5.0.11|5.0.10] - - install_path [default: /opt/fsl-{{ self.version }}] - - exclude_paths [default: ] - **Note**: FSL is non-free. If you are considering commercial use of FSL, please consult the relevant license(s). - - --jq KEY=VALUE Add jq - method=[binaries|source] - options for method=binaries - - version [required] - version=[1.6|1.5] - options for method=source - - version [required] - - --matlabmcr KEY=VALUE Add matlabmcr - method=[binaries] - options for method=binaries - - version [required] - version=[2023a|2021b|2021a|2020b|2020a|2019b|2019a|2018b|2018a|2017b|2017a|2016b|2016a|2015b|2015aSP1|2015a|2014b|2014a|2013b|2013a|2012b|2012a|2010a] - - curl_opts [default: ] - - install_path [default: /opt/MCR-{{ self.version }}] - - --minc KEY=VALUE Add minc - method=[binaries] - options for method=binaries - - version [required] - version=[1.9.18|1.9.17|1.9.16|1.9.15] - - install_path [default: /opt/minc-{{ self.version }}] - - --miniconda KEY=VALUE Add miniconda - method=[binaries] - options for method=binaries - - version [required] - version=[latest|*] - - install_path [default: /opt/miniconda-{{ self.version }}] - - installed [default: false] - - env_name [default: base] - - env_exists [default: true] - - conda_install [default: ] - - pip_install [default: ] - - conda_opts [default: ] - - pip_opts [default: ] - - yaml_file [default: ] - - --mricron KEY=VALUE Add mricron - method=[binaries] - options for method=binaries - - version [required] - version=[1.0.20190902|1.0.20190410|1.0.20181114|1.0.20180614|1.0.20180404|1.0.20171220] - - install_path [default: /opt/mricron-{{ self.version }}] - - --mrtrix3 KEY=VALUE Add mrtrix3 - method=[binaries|source] - options for method=binaries - - version [required] - version=[3.0.2|3.0.1|3.0.0] - - install_path [default: /opt/mrtrix3-{{ self.version }}] - - build_processes [default: 1] - options for method=source - - version [required] - - repo [default: https://github.com/MRtrix3/mrtrix3.git] - - install_path [default: /opt/mrtrix3-{{ self.version }}] - - build_processes [default: ] - - --ndfreeze KEY=VALUE Add ndfreeze - method=[source] - options for method=source - - date [required] - - opts [default: ] - - --neurodebian KEY=VALUE Add neurodebian - method=[binaries] - options for method=binaries - - version [required] - version=[usa-tn|usa-nh|usa-ca|japan|greece|germany-munich|germany-magdeburg|china-zhejiang|china-tsinghua|china-scitech|australia] - - os_codename [required] - - full_or_libre [default: full] - - --niftyreg KEY=VALUE Add niftyreg - method=[source] - options for method=source - - version [required] - - repo [default: https://github.com/KCL-BMEIS/niftyreg] - - install_path [default: /opt/niftyreg-{{ self.version }}] - - cmake_opts [default: -DCMAKE_INSTALL_PREFIX={{ self.install_path }} -DBUILD_SHARED_LIBS=ON -DBUILD_TESTING=OFF] - - make_opts [default: -j1] - - -petpvc KEY=VALUE Add petpvc - method=[binaries] - options for method=binaries - - version [required] - version=[1.2.4|1.2.2|1.2.1|1.2.0-b|1.2.0-a|1.1.0|1.0.0] - - install_path [default: /opt/petpvc-{{ self.version }}] - - --spm12 KEY=VALUE Add spm12 - method=[binaries] - options for method=binaries - - version [required] - version=[r7771|r7487|r7219|r6914|r6685|r6472|r6225|dev] - - install_path [default: /opt/spm12-{{ self.version }}] - - matlab_install_path [default: /opt/matlab-compiler-runtime-2010a] - - --vnc KEY=VALUE Add vnc - method=[source] - options for method=source - - passwd [required] - - --help Show this message and exit. - +.. literalinclude:: generate_singularity_cli_help.txt neurodocker minify ~~~~~~~~~~~~~~~~~~ @@ -512,27 +38,4 @@ neurodocker minify pip install neurodocker[minify] - -.. code-block:: - - Usage: neurodocker minify [OPTIONS] COMMAND... - - Minify a container. - - Trace COMMAND... in the container, and remove all files in `--dirs-to- - prune` that were not used by the commands. - - Examples - -------- - docker run --rm -itd --name to-minify python:3.9-slim bash - neurodocker minify \ - --container to-minify \ - --dir /usr/local \ - "python -c 'a = 1 + 1; print(a)'" - - Options: - -c, --container TEXT ID or name of running Docker container [required] - -d, --dir TEXT Directories in container to prune. Data will be lost - in these directories [required] - - --help Show this message and exit. +.. literalinclude:: minify_cli_help.txt diff --git a/docs/user_guide/cli_auto.rst b/docs/user_guide/cli_auto.rst deleted file mode 100644 index 3a6c2e34..00000000 --- a/docs/user_guide/cli_auto.rst +++ /dev/null @@ -1,7 +0,0 @@ -Command-line Interface -====================== - -.. click:: neurodocker.cli.cli:cli - :prog: neurodocker - :nested: full - diff --git a/docs/user_guide/index.rst b/docs/user_guide/index.rst index 83ab6dc0..5c5b372b 100644 --- a/docs/user_guide/index.rst +++ b/docs/user_guide/index.rst @@ -6,7 +6,6 @@ User Guide installation quickstart cli - cli_auto examples common_uses minify From 6bdd58534dffc8dbbbb790a6b7fde0efe37d57f8 Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 3 Sep 2023 11:19:31 -0400 Subject: [PATCH 4/6] add links to github and docker --- README.md | 2 +- docs/conf.py | 28 ++++++++++++++++++++++++---- 2 files changed, 25 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4eac3505..d5734909 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![build status](https://github.com/ReproNim/neurodocker/actions/workflows/pull-request.yml/badge.svg)](https://github.com/ReproNim/neurodocker/actions/workflows/pull-request.yml) [![docker pulls](https://img.shields.io/docker/pulls/repronim/neurodocker.svg)](https://hub.docker.com/r/repronim/neurodocker/) -[![docker pulls](https://img.shields.io/docker/pulls/kaczmarj/neurodocker.svg)](https://hub.docker.com/r/kaczmarj/neurodocker/) +[![docker pulls](https://img.shields.io/docker/pulls/repronim/neurodocker.svg)](https://hub.docker.com/r/repronim/neurodocker/) [![python versions](https://img.shields.io/pypi/pyversions/neurodocker.svg)](https://pypi.org/project/neurodocker/) [![DOI](https://zenodo.org/badge/88654995.svg)](https://zenodo.org/badge/latestdoi/88654995) diff --git a/docs/conf.py b/docs/conf.py index c6f945f1..311edc11 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -39,14 +39,10 @@ "sphinx.ext.githubpages", "sphinx.ext.intersphinx", "sphinx.ext.coverage", - # "sphinx.ext.mathjax", - # "sphinx.ext.ifconfig", "sphinx.ext.napoleon", "sphinx.ext.todo", "sphinx.ext.viewcode", - # "sphinx.ext.linkcode", "sphinxcontrib.apidoc", - 'sphinx_click', ] # Add any paths that contain templates here, relative to this directory. @@ -64,6 +60,30 @@ # html_theme = "pydata_sphinx_theme" +html_theme_options = { + "use_edit_page_button": True, + "icon_links": [ + { + "name": "GitHub", + "url": "https://github.com/ReproNim/neurodocker", + "icon": "fa-brands fa-github", + }, + { + "name": "Docker Hub", + "url": "https://hub.docker.com/r/repronim/neurodocker", + "icon": "fa-brands fa-docker", + }, + ], +} + + +html_context = { + "github_user": "ReproNim", + "github_repo": "neurodocker", + "github_version": "master", + "doc_path": "docs", +} + # Add any paths that contain custom static files (such as style sheets) here, # relative to this directory. They are copied after the builtin static files, # so a file named "default.css" will overwrite the builtin "default.css". From 18fe870e1bb05b43bb92cfe55e72a2a55d65b85c Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 3 Sep 2023 11:26:44 -0400 Subject: [PATCH 5/6] remove unused dependency --- setup.cfg | 1 - 1 file changed, 1 deletion(-) diff --git a/setup.cfg b/setup.cfg index 02972c7c..96e4bfcc 100644 --- a/setup.cfg +++ b/setup.cfg @@ -54,7 +54,6 @@ docs = sphinx <7 pydata-sphinx-theme >= 0.13 sphinxcontrib.apidoc >= 0.3 - sphinx-click all = %(minify)s %(dev)s From 5e0a707b1e4ae9542182bda567609a390b10584e Mon Sep 17 00:00:00 2001 From: Remi Gau Date: Sun, 3 Sep 2023 20:19:34 +0200 Subject: [PATCH 6/6] Update README.md Co-authored-by: Jakub Kaczmarzyk --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index d5734909..6b5ff122 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,6 @@ [![build status](https://github.com/ReproNim/neurodocker/actions/workflows/pull-request.yml/badge.svg)](https://github.com/ReproNim/neurodocker/actions/workflows/pull-request.yml) [![docker pulls](https://img.shields.io/docker/pulls/repronim/neurodocker.svg)](https://hub.docker.com/r/repronim/neurodocker/) -[![docker pulls](https://img.shields.io/docker/pulls/repronim/neurodocker.svg)](https://hub.docker.com/r/repronim/neurodocker/) [![python versions](https://img.shields.io/pypi/pyversions/neurodocker.svg)](https://pypi.org/project/neurodocker/) [![DOI](https://zenodo.org/badge/88654995.svg)](https://zenodo.org/badge/latestdoi/88654995)