diff --git a/.circleci/config.yml b/.circleci/config.yml index ea3b4d05..d2b13bf6 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -103,6 +103,10 @@ jobs: name: create output directory command: mkdir -p /home/circleci/outputs/ds000001/derivatives + - run: + name: version + command: docker run -ti --rm << parameters.dh_orga >>/<< parameters.dh_repo >> --version + - run: name: default model subject level command: | diff --git a/.dockerignore b/.dockerignore index c5e8d986..50cf15a2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,18 +1,6 @@ -# ignoring this might speed up build -# by preventing passing extra content to the docker daemon - -.github -.mypy_cache -.vscode -binder -coverage_html -**/demos -**/docs -templates -**/tests -**/bids-examples -lib/**/.git +lib/spmup +docs/posters/2023_ohbm/poster/betterposter-thumbnail-portrait.png # General .DS_Store @@ -23,6 +11,8 @@ lib/**/.git *.html *.docx *.ps +*.~lock.* +*.ppt* new_events.tsv @@ -38,14 +28,20 @@ skipped_roi_*.tsv # created by tests CHANGES README +tests/data/tsv_files/moae_results_table.tsv +htmlcov # Project specific onsets*_events.mat - ## from running tests in root dir */group/* models/* +derivatives/models +derivatives/options + +# hatch +src/bidspm/_version.py ############################################################################### # python @@ -53,6 +49,10 @@ models/* **/__pycache__ **/build .coverage +.pytest_cache +.tox + +.mypy_cache # jupyter notebooks .ipynb_checkpoints diff --git a/.github/workflows/apptainer_build.yml b/.github/workflows/apptainer_build.yml index 9931775c..a9372a0f 100644 --- a/.github/workflows/apptainer_build.yml +++ b/.github/workflows/apptainer_build.yml @@ -26,3 +26,5 @@ jobs: apptainer-version: 1.3.0 - name: build sif image run: apptainer build bidspm.sif bidspm.def + - name: version + run: apptainer run bidspm.sif --version diff --git a/.readthedocs.yml b/.readthedocs.yml index 2aa58616..b3828b1f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -6,6 +6,9 @@ # Required version: 2 +submodules: + exclude: [lib/riksneurotools, lib/CPP_ROI] + build: os: ubuntu-22.04 tools: diff --git a/Dockerfile b/Dockerfile index 4fc9a48b..04052e7e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,11 +56,17 @@ WORKDIR /home/neuro COPY . /home/neuro/bidspm WORKDIR /home/neuro/bidspm -RUN pip install --no-cache-dir --upgrade pip && \ +RUN git restore . && \ + git -C lib/CPP_ROI/atlas/HCPex reset --hard && \ + git -C lib/CPP_ROI/atlas/HCPex clean --force -dfx && \ + git status && \ + pip install --no-cache-dir --upgrade pip && \ pip3 --no-cache-dir install -r requirements.txt && \ pip3 --no-cache-dir install . && \ - octave --no-gui --eval "addpath('/opt/spm12/'); savepath ();" && \ - octave --no-gui --eval "addpath(pwd); savepath(); bidspm(); path" + octave --no-gui --eval "addpath('/opt/spm12/'); savepath ('/usr/share/octave/site/m/startup/octaverc');" && \ + octave --no-gui --eval "addpath(pwd); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path" && \ + octave --no-gui --eval "path" + WORKDIR /home/neuro diff --git a/Makefile b/Makefile index 168dca43..7c31770b 100644 --- a/Makefile +++ b/Makefile @@ -123,20 +123,6 @@ clean_docker: build_image: Dockerfile ## Build stable docker image from the main branch docker build . -f Dockerfile -t cpplab/bidspm:unstable -Dockerfile_matlab: - docker run --rm kaczmarj/neurodocker:0.9.1 generate docker \ - --pkg-manager apt \ - --base-image debian:stretch-slim \ - --spm12 version=r7771 \ - --install nodejs npm \ - --run "node -v && npm -v && npm install -g bids-validator" \ - --user neuro \ - --run "mkdir code output bidspm" \ - --copy ".", "/home/neuro/bidspm/" > Dockerfile_matlab - -build_image_matlab: Dockerfile_matlab - docker build . -f Dockerfile_matlab -t cpplab/bidspm_matlab:unstable - docker_data: make -C demos/openneuro data_ds000001 diff --git a/bidspm.def b/bidspm.def index e4929b0a..4c31a5a9 100644 --- a/bidspm.def +++ b/bidspm.def @@ -50,11 +50,19 @@ From: bids/base_validator:1.13.1 make -C /opt/spm12/src PLATFORM=octave install ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12 + git -C /opt/bidspm restore . + git -C /opt/bidspm/ submodule foreach --recursive 'git reset --hard' + git -C /opt/bidspm/ submodule foreach --recursive 'git clean --force -dfx' + git -C /opt/bidspm/ status + + + pip install --upgrade pip pip install -r /opt/bidspm/requirements.txt pip install /opt/bidspm octave --no-gui --eval "addpath('/opt/spm12/'); savepath ('/usr/share/octave/site/m/startup/octaverc');" && \ - octave --no-gui --eval "addpath('/opt/bidspm/'); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path" + octave --no-gui --eval "addpath('/opt/bidspm/'); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path" && \ + octave --no-gui --eval "path" %runscript bidspm "$@" diff --git a/docs/Makefile b/docs/Makefile index f982decb..878e08b3 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -15,7 +15,7 @@ BROWSER := python -c "$$BROWSER_PYSCRIPT" # You can set these variables from the command line, and also # from the environment for the first two. -SPHINXOPTS ?= +SPHINXOPTS ?= -v SPHINXBUILD ?= sphinx-build SOURCEDIR = source BUILDDIR = build diff --git a/docs/source/conf.py b/docs/source/conf.py index ea04314c..3e62a83e 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -58,13 +58,10 @@ exclude_patterns = [ "**/examples/*", "**/images/*", - "**/lib/**", "demo", "defaults", "examples", "images", - "lib", - "tests/**/*.m", ] suppress_warnings = ["myst.header", "myst.xref_missing"] diff --git a/docs/source/demos/openneuro.md b/docs/source/demos/openneuro.md index 00026f14..bf54539c 100644 --- a/docs/source/demos/openneuro.md +++ b/docs/source/demos/openneuro.md @@ -158,5 +158,5 @@ transformers cannot yet be appled to confounds ### Scripts ```{eval-rst} -.. autoscript:: ds003379_run +.. autoscript:: ds003397_run ``` diff --git a/pyproject.toml b/pyproject.toml index 4859c64b..fa33b0cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,7 +36,7 @@ dev = [ 'pandas' ] doc = [ - "urllib3==1.26.15", + "urllib3", "faqtory", "myst-parser", "sphinx", @@ -45,7 +45,7 @@ doc = [ "pydata-sphinx-theme", "sphinx-togglebutton", "sphinxcontrib-bibtex", - "sphinxcontrib-matlabdomain", + "sphinxcontrib-matlabdomain>=0.22.1", "sphinxcontrib-mermaid", "setuptools" ]