From c76310e6d2a177d39206165df2789bb3347e72c6 Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Sat, 14 Dec 2024 01:06:16 +0200 Subject: [PATCH 1/2] New corrected docsfolder and fixes on some links --- .github/workflows/sphinx-docs.yml | 6 +-- docs/Makefile | 4 +- {docs2 => docs}/README.rst | 0 {docs2 => docs}/api.rst | 0 {docs2 => docs}/components.rst | 16 ++++--- {docs2 => docs}/conf.py | 0 {docs2 => docs}/contributors.rst | 0 {docs2 => docs}/help.rst | 0 {docs2 => docs}/index.rst | 0 {docs2 => docs}/installation.rst | 0 {docs2 => docs}/license.rst | 0 docs/make.bat | 70 +++++++++++++++---------------- {docs2 => docs}/modules.rst | 0 docs/source/conf.py | 33 --------------- docs/source/index.rst | 18 -------- docs/source/modules.rst | 6 --- {docs2 => docs}/usage.rst | 0 docs2/Makefile | 20 --------- docs2/make.bat | 35 ---------------- 19 files changed, 47 insertions(+), 161 deletions(-) mode change 100755 => 100644 docs/Makefile rename {docs2 => docs}/README.rst (100%) rename {docs2 => docs}/api.rst (100%) rename {docs2 => docs}/components.rst (79%) rename {docs2 => docs}/conf.py (100%) rename {docs2 => docs}/contributors.rst (100%) rename {docs2 => docs}/help.rst (100%) rename {docs2 => docs}/index.rst (100%) rename {docs2 => docs}/installation.rst (100%) rename {docs2 => docs}/license.rst (100%) mode change 100755 => 100644 docs/make.bat rename {docs2 => docs}/modules.rst (100%) delete mode 100644 docs/source/conf.py delete mode 100644 docs/source/index.rst delete mode 100644 docs/source/modules.rst rename {docs2 => docs}/usage.rst (100%) delete mode 100644 docs2/Makefile delete mode 100644 docs2/make.bat diff --git a/.github/workflows/sphinx-docs.yml b/.github/workflows/sphinx-docs.yml index 82f63886..ec09aa78 100644 --- a/.github/workflows/sphinx-docs.yml +++ b/.github/workflows/sphinx-docs.yml @@ -29,8 +29,8 @@ jobs: pip install sphinx sphinx_rtd_theme sphinx-tabs sphinx_toolbox - name: Sphinx build run: | - sphinx-apidoc -o docs2 src/ - cd docs2/ + sphinx-apidoc -o docs src/ + cd docs/ make html cd .. @@ -38,7 +38,7 @@ jobs: uses: actions/upload-pages-artifact@v3 with: - path: docs2/_build/html + path: docs/_build/html retention-days: 90 deploy-docs: diff --git a/docs/Makefile b/docs/Makefile old mode 100755 new mode 100644 index d0c3cbf1..d4bb2cbb --- a/docs/Makefile +++ b/docs/Makefile @@ -5,8 +5,8 @@ # from the environment for the first two. SPHINXOPTS ?= SPHINXBUILD ?= sphinx-build -SOURCEDIR = source -BUILDDIR = build +SOURCEDIR = . +BUILDDIR = _build # Put it first so that "make" without argument is like "make help". help: diff --git a/docs2/README.rst b/docs/README.rst similarity index 100% rename from docs2/README.rst rename to docs/README.rst diff --git a/docs2/api.rst b/docs/api.rst similarity index 100% rename from docs2/api.rst rename to docs/api.rst diff --git a/docs2/components.rst b/docs/components.rst similarity index 79% rename from docs2/components.rst rename to docs/components.rst index 40e1ede3..b6705fcc 100644 --- a/docs2/components.rst +++ b/docs/components.rst @@ -20,17 +20,16 @@ Neuroimaging pipeline for computing AI biomarkers of disease and aging from T1-w Segmentation ------------ -`DLMUSE `: Rapid and accurate **brain anatomy segmentation** +`DLMUSE `_: Rapid and accurate **brain anatomy segmentation** .. image:: https://github.com/CBICA/NiChart_Project/blob/031d1cafc5091eb514511ee25af189d5f0b5ac56/resources/images/dlicv%2Bdlmuse_segmask.png - :target https://github.com/CBICA/NiChart_DLMUSE :alt: DLMUSE ------------- Harmonization ------------- -`COMBAT `: **Statistical data harmonization** of ROI volumes to `reference data ` +`COMBAT `_: **Statistical data harmonization** of ROI volumes to `reference data `_ .. image:: https://raw.githubusercontent.com/CBICA/NiChart_Project/refs/heads/ge-dev/resources/images/combat_agetrend.png :alt: COMBAT @@ -39,13 +38,12 @@ Harmonization Supervised ML Biomarkers ------------------------ -`SPARE-AD and SPARE-Age indices `: AI biomarkers of **Alzheimer's Disease and Aging** related brain atrophy patterns +`SPARE-AD and SPARE-Age indices `_: AI biomarkers of **Alzheimer's Disease and Aging** related brain atrophy patterns .. image:: https://raw.githubusercontent.com/CBICA/NiChart_Project/refs/heads/ge-dev/resources/images/sparead%2Bage.png - :target https://github.com/CBICA/spare_scores :alt: SPARE-AD and SPARE-Age indices -`SPARE-CVR indices `: AI biomarkers of brain atrophy patterns associated with **Cardio-Vascular Risk Factors** +`SPARE-CVR indices `_: AI biomarkers of brain atrophy patterns associated with **Cardio-Vascular Risk Factors** .. image:: https://raw.githubusercontent.com/CBICA/NiChart_Project/refs/heads/ge-dev/resources/images/sparecvr.png :alt: SPARE-CVR indices, Govindarajan, S.T., et. al., Nature Communications, 2024 @@ -54,7 +52,7 @@ Supervised ML Biomarkers Semi-supervised ML Biomarkers ----------------------------- - - `SurrealGAN indices `: Data-driven phenotyping of brain aging, **5 Brain Aging Subtypes** + - `SurrealGAN indices `_: Data-driven phenotyping of brain aging, **5 Brain Aging Subtypes** .. image:: https://raw.githubusercontent.com/CBICA/NiChart_Project/refs/heads/ge-dev/resources/images/sgan1.jpg :alt: SurrrealGAN indices @@ -63,9 +61,9 @@ Semi-supervised ML Biomarkers 2. WM Lesion Segmentation ==================================== -Neuroimaging pipeline for segmenting white matter lesions on FLAIR MRI scans. +Neuroimaging pipeline for segmenting white matter lesions on FLAIR MRI scans. -`DLWMLS `: Rapid and accurate **white matter lesion segmentation** +`DLWMLS `_: Rapid and accurate **white matter lesion segmentation** .. image:: https://github.com/CBICA/NiChart_Project/blob/031d1cafc5091eb514511ee25af189d5f0b5ac56/resources/images/dlwmls.png :target https://github.com/CBICA/NiChart_DLWMLS diff --git a/docs2/conf.py b/docs/conf.py similarity index 100% rename from docs2/conf.py rename to docs/conf.py diff --git a/docs2/contributors.rst b/docs/contributors.rst similarity index 100% rename from docs2/contributors.rst rename to docs/contributors.rst diff --git a/docs2/help.rst b/docs/help.rst similarity index 100% rename from docs2/help.rst rename to docs/help.rst diff --git a/docs2/index.rst b/docs/index.rst similarity index 100% rename from docs2/index.rst rename to docs/index.rst diff --git a/docs2/installation.rst b/docs/installation.rst similarity index 100% rename from docs2/installation.rst rename to docs/installation.rst diff --git a/docs2/license.rst b/docs/license.rst similarity index 100% rename from docs2/license.rst rename to docs/license.rst diff --git a/docs/make.bat b/docs/make.bat old mode 100755 new mode 100644 index 747ffb7b..954237b9 --- a/docs/make.bat +++ b/docs/make.bat @@ -1,35 +1,35 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=source -set BUILDDIR=build - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd +@ECHO OFF + +pushd %~dp0 + +REM Command file for Sphinx documentation + +if "%SPHINXBUILD%" == "" ( + set SPHINXBUILD=sphinx-build +) +set SOURCEDIR=. +set BUILDDIR=_build + +%SPHINXBUILD% >NUL 2>NUL +if errorlevel 9009 ( + echo. + echo.The 'sphinx-build' command was not found. Make sure you have Sphinx + echo.installed, then set the SPHINXBUILD environment variable to point + echo.to the full path of the 'sphinx-build' executable. Alternatively you + echo.may add the Sphinx directory to PATH. + echo. + echo.If you don't have Sphinx installed, grab it from + echo.https://www.sphinx-doc.org/ + exit /b 1 +) + +if "%1" == "" goto help + +%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% +goto end + +:help +%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% + +:end +popd diff --git a/docs2/modules.rst b/docs/modules.rst similarity index 100% rename from docs2/modules.rst rename to docs/modules.rst diff --git a/docs/source/conf.py b/docs/source/conf.py deleted file mode 100644 index 6e5cdcfc..00000000 --- a/docs/source/conf.py +++ /dev/null @@ -1,33 +0,0 @@ -# Configuration file for the Sphinx documentation builder. -# -# For the full list of built-in configuration values, see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Project information ----------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information - -import os -import sys - -basedir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "..", "src")) -sys.path.insert(0, basedir) - -project = "NiChart" -copyright = "" -author = "Guray Erus, Alexander Getka, Spiros Maggioros, Kyunglok Baik" -release = "2024" - -# -- General configuration --------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration - -extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"] - -templates_path = ["_templates"] -exclude_patterns = [] - - -# -- Options for HTML output ------------------------------------------------- -# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output - -html_theme = "alabaster" -html_static_path = ["_static"] diff --git a/docs/source/index.rst b/docs/source/index.rst deleted file mode 100644 index 2580a099..00000000 --- a/docs/source/index.rst +++ /dev/null @@ -1,18 +0,0 @@ -.. NiChart documentation master file, created by - sphinx-quickstart on Thu Aug 22 22:45:12 2024. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -NiChart documentation -===================== - -Add your content using ``reStructuredText`` syntax. See the -`reStructuredText `_ -documentation for details. - - -.. toctree:: - :maxdepth: 2 - :caption: Contents: - - modules diff --git a/docs/source/modules.rst b/docs/source/modules.rst deleted file mode 100644 index 7033b51c..00000000 --- a/docs/source/modules.rst +++ /dev/null @@ -1,6 +0,0 @@ -src -=== - -.. toctree:: - :maxdepth: 4 - diff --git a/docs2/usage.rst b/docs/usage.rst similarity index 100% rename from docs2/usage.rst rename to docs/usage.rst diff --git a/docs2/Makefile b/docs2/Makefile deleted file mode 100644 index d4bb2cbb..00000000 --- a/docs2/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs2/make.bat b/docs2/make.bat deleted file mode 100644 index 954237b9..00000000 --- a/docs2/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.https://www.sphinx-doc.org/ - exit /b 1 -) - -if "%1" == "" goto help - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd From d9bb3fca36ec1430451e38b271a91faa1457382d Mon Sep 17 00:00:00 2001 From: Spiros Maggioros Date: Sat, 14 Dec 2024 01:10:44 +0200 Subject: [PATCH 2/2] Fixes on some more rst files --- docs/installation.rst | 26 ++++++++++++-------------- docs/license.rst | 2 +- 2 files changed, 13 insertions(+), 15 deletions(-) diff --git a/docs/installation.rst b/docs/installation.rst index 9656ac8b..08cb7645 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -16,18 +16,18 @@ We release our latest stable version on PyPI; accordingly, **we strongly recomme .. warning:: PyTorch and NumPy have known compatibility issues across different platforms. To avoid potential conflicts, please follow the installation instructions below. -- After installing all other necessary packages, uninstall any existing Torch installations: - +- After installing all other necessary packages, uninstall any existing Torch installations: :: + $ pip uninstall torch - Reinstall PyTorch: - **Linux:** PyTorch version 2.3.1 - **Windows:** PyTorch version 2.5.1 - -- Users can select the correct index URL for their CUDA version based on the `PyTorch getting started page ` -**Example on a Linux x86 system:** +- Users can select the correct index URL for their CUDA version based on the `PyTorch getting started page `_ + +**Example on a Linux x86 system:** :: $ pip install torch==2.3.1 --index-url https://download.pytorch.org/whl/cu121 @@ -35,15 +35,13 @@ We release our latest stable version on PyPI; accordingly, **we strongly recomme Managing your environment ************************* -We recommend installing NiChart Project within a dedicated environment. Users can create an environment using Mamba (please see `Mamba Installation Guide `). +We recommend installing NiChart Project within a dedicated environment. Users can create an environment using Mamba (please see `Mamba Installation Guide `_). **Example on a Linux x86 system:** :: - wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh - bash Mambaforge-Linux-x86_64.sh - mamba create -c conda-forge -c bioconda -n NCP_env python=3.12 - mamba activate NCP_env - git clone https://github.com/CBICA/NiChart_Project.git - pip install -r requirements.txt - - + $ wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh + bash Mambaforge-Linux-x86_64.sh + mamba create -c conda-forge -c bioconda -n NCP_env python=3.12 + mamba activate NCP_env + git clone https://github.com/CBICA/NiChart_Project.git + pip install -r requirements.txt diff --git a/docs/license.rst b/docs/license.rst index 8a5fb7bc..8401eded 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -2,4 +2,4 @@ License ####### -NiChart application, web site, the content and the logo of NiChart are intellectual property of CBICA, UPENN. For details, please see `the licence `. +NiChart application, web site, the content and the logo of NiChart are intellectual property of CBICA, UPENN. For details, please see `the licence `_.