Skip to content

Commit

Permalink
Merge pull request #923 from scilus/fixDoc
Browse files Browse the repository at this point in the history
Fix Documentation - readthedoc v2
  • Loading branch information
arnaudbore authored Feb 26, 2024
2 parents 82fdf5f + 42813dd commit bcf63aa
Show file tree
Hide file tree
Showing 6 changed files with 56 additions and 45 deletions.
9 changes: 6 additions & 3 deletions docs/.readthedocs.yaml → .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,18 @@ version: 2
# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
apt_packages:
- libblas-dev
- liblapack-dev
tools:
python: "3.11"
python: "3.10"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: source/conf.py
configuration: docs/source/conf.py

# We recommend specifying your dependencies to enable reproducible builds:
# https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
python:
install:
- requirements: requirements.txt
- requirements: docs/requirements.txt
9 changes: 4 additions & 5 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
# 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
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build

Expand All @@ -17,4 +16,4 @@ help:
# 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)
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
65 changes: 43 additions & 22 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,23 +1,44 @@
dipy>=1.1
fury==0.2.*
future==0.17.*
h5py==2.9.*
matplotlib==2.2.*
nibabel==3.0.*
nilearn==0.6.*
numpy==1.21.*
Pillow==10.2.0
pybids==0.10.*
pyparsing==2.2.*
python-dateutil==2.7.*
pytz==2018.4.*
scikit-learn==0.22.*
scipy==1.4.*
setuptools==46.1.*
six==1.15.*
vtk==8.1.*
trimeshpy==0.0.*
coloredlogs==10.0.*
statsmodels==0.11.*
bids-validator==1.11.*
bctpy==0.5.*
mock==4.0.*
bz2file==0.98.*
coloredlogs==15.0.*
cvxpy==1.4.*
cycler==0.11.*
Cython==0.29.*, !=0.29.29
dipy==1.8.*
deepdiff==6.3.0
docopt==0.6.*
formulaic==0.3.*
fury==0.9.*
future==0.18.*
GitPython==3.1.*
joblib==1.2.*
kiwisolver==1.4.*
matplotlib==3.6.*
mock==5.1.*
nibabel==5.2.*
nilearn==0.9.*
numpy==1.23.*
openpyxl==3.0.*
packaging == 23.2.*
Pillow==10.2.*
pybids==0.16.*
pyparsing==3.0.*
PySocks==1.7.*
pytest==7.2.*
pytest-console-scripts==1.3.*
pytest-cov==4.1.0
pytest-html==4.1.1
pytest-mock==3.10.*
python-dateutil==2.8.*
pytz==2022.6.*
requests==2.28.*
scikit-learn==1.2.*
scikit-image==0.22.*
scipy==1.9.*
sphinx-rtd-theme==2.0.*
six==1.16.*
spams==2.6.*
statsmodels==0.13.*
trimeshpy==0.0.3
vtk==9.2.*
9 changes: 2 additions & 7 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,6 @@
sys.path.insert(0, os.path.abspath("../.."))
sys.path.insert(1, os.path.abspath("../../scripts"))

autodoc_mock_imports = ['numpy', 'dipy', 'fury', 'nibabel', "scipy", "h5py",
"scilpy.tractanalysis.grid_intersections",
"scilpy.tractanalysis.quick_tools",
"sklearn", "scilpy.tractanalysis.streamlines_metrics",
"scilpy.tractograms.uncompress", "matplotlib",
"skimage"]

# -- Project information -----------------------------------------------------

project = 'scilpy'
Expand Down Expand Up @@ -217,6 +210,8 @@ def setup(app):

# Loop over scripts
for i in sorted(os.listdir(path_script)):
if 'scil' not in i:
continue
if not isdir(join(path_script, i)):
name, ext = i.split(".")

Expand Down
2 changes: 1 addition & 1 deletion scilpy/dwi/operations.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def compute_residuals(predicted_data, real_data, b0s_mask=None, mask=None):
If data is a tensor, the residuals computation was introduced in:
[J-D Tournier, S. Mori, A. Leemans. Diffusion Tensor Imaging and Beyond.
MRM 2011].
MRM 2011].
Parameters
----------
Expand Down
7 changes: 0 additions & 7 deletions scilpy/io/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
from PIL import Image
from scipy.io import loadmat
import six
import importlib.metadata

from scilpy.io.streamlines import load_tractogram_with_reference
from scilpy.gradients.bvec_bval_tools import DEFAULT_B0_THRESHOLD
Expand Down Expand Up @@ -231,12 +230,6 @@ def add_verbose_arg(parser):
'the provided level. \nDefault level is warning, '
'default when using -v is info.')

version = importlib.metadata.version('scilpy')

logging.getLogger().setLevel(logging.INFO)
logging.info("Scilpy version: {}".format(version))
logging.getLogger().setLevel(logging.WARNING)


def add_bbox_arg(parser):
parser.add_argument('--no_bbox_check', dest='bbox_check',
Expand Down

0 comments on commit bcf63aa

Please sign in to comment.