Skip to content

Commit e3261be

Browse files
authored
[FIX] update version in container (#1306)
* update dockerignore * adapt apptainer image * fixes * print version apptainer * fix doc * fix doc * make sure we have a clean working tree * run git status to check worktree * fix * more git status * typo * clean * fix
1 parent 5b88310 commit e3261be

File tree

11 files changed

+46
-40
lines changed

11 files changed

+46
-40
lines changed

.circleci/config.yml

+4
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,10 @@ jobs:
103103
name: create output directory
104104
command: mkdir -p /home/circleci/outputs/ds000001/derivatives
105105

106+
- run:
107+
name: version
108+
command: docker run -ti --rm << parameters.dh_orga >>/<< parameters.dh_repo >> --version
109+
106110
- run:
107111
name: default model subject level
108112
command: |

.dockerignore

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
# ignoring this might speed up build
2-
# by preventing passing extra content to the docker daemon
3-
4-
.github
5-
.mypy_cache
6-
.vscode
7-
binder
8-
coverage_html
9-
**/demos
10-
**/docs
11-
templates
12-
**/tests
13-
**/bids-examples
14-
lib/**/.git
1+
lib/spmup
152

3+
docs/posters/2023_ohbm/poster/betterposter-thumbnail-portrait.png
164

175
# General
186
.DS_Store
@@ -23,6 +11,8 @@ lib/**/.git
2311
*.html
2412
*.docx
2513
*.ps
14+
*.~lock.*
15+
*.ppt*
2616

2717
new_events.tsv
2818

@@ -38,21 +28,31 @@ skipped_roi_*.tsv
3828
# created by tests
3929
CHANGES
4030
README
31+
tests/data/tsv_files/moae_results_table.tsv
32+
htmlcov
4133

4234
# Project specific
4335
onsets*_events.mat
4436

45-
4637
## from running tests in root dir
4738
*/group/*
4839
models/*
40+
derivatives/models
41+
derivatives/options
42+
43+
# hatch
44+
src/bidspm/_version.py
4945

5046
###############################################################################
5147
# python
5248
**/*egg-info
5349
**/__pycache__
5450
**/build
5551
.coverage
52+
.pytest_cache
53+
.tox
54+
55+
.mypy_cache
5656

5757
# jupyter notebooks
5858
.ipynb_checkpoints

.github/workflows/apptainer_build.yml

+2
Original file line numberDiff line numberDiff line change
@@ -26,3 +26,5 @@ jobs:
2626
apptainer-version: 1.3.0
2727
- name: build sif image
2828
run: apptainer build bidspm.sif bidspm.def
29+
- name: version
30+
run: apptainer run bidspm.sif --version

.readthedocs.yml

+3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66
# Required
77
version: 2
88

9+
submodules:
10+
exclude: [lib/riksneurotools, lib/CPP_ROI]
11+
912
build:
1013
os: ubuntu-22.04
1114
tools:

Dockerfile

+9-3
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,17 @@ WORKDIR /home/neuro
5656

5757
COPY . /home/neuro/bidspm
5858
WORKDIR /home/neuro/bidspm
59-
RUN pip install --no-cache-dir --upgrade pip && \
59+
RUN git restore . && \
60+
git -C lib/CPP_ROI/atlas/HCPex reset --hard && \
61+
git -C lib/CPP_ROI/atlas/HCPex clean --force -dfx && \
62+
git status && \
63+
pip install --no-cache-dir --upgrade pip && \
6064
pip3 --no-cache-dir install -r requirements.txt && \
6165
pip3 --no-cache-dir install . && \
62-
octave --no-gui --eval "addpath('/opt/spm12/'); savepath ();" && \
63-
octave --no-gui --eval "addpath(pwd); savepath(); bidspm(); path"
66+
octave --no-gui --eval "addpath('/opt/spm12/'); savepath ('/usr/share/octave/site/m/startup/octaverc');" && \
67+
octave --no-gui --eval "addpath(pwd); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path" && \
68+
octave --no-gui --eval "path"
69+
6470

6571
WORKDIR /home/neuro
6672

Makefile

-14
Original file line numberDiff line numberDiff line change
@@ -123,20 +123,6 @@ clean_docker:
123123
build_image: Dockerfile ## Build stable docker image from the main branch
124124
docker build . -f Dockerfile -t cpplab/bidspm:unstable
125125

126-
Dockerfile_matlab:
127-
docker run --rm kaczmarj/neurodocker:0.9.1 generate docker \
128-
--pkg-manager apt \
129-
--base-image debian:stretch-slim \
130-
--spm12 version=r7771 \
131-
--install nodejs npm \
132-
--run "node -v && npm -v && npm install -g bids-validator" \
133-
--user neuro \
134-
--run "mkdir code output bidspm" \
135-
--copy ".", "/home/neuro/bidspm/" > Dockerfile_matlab
136-
137-
build_image_matlab: Dockerfile_matlab
138-
docker build . -f Dockerfile_matlab -t cpplab/bidspm_matlab:unstable
139-
140126
docker_data:
141127
make -C demos/openneuro data_ds000001
142128

bidspm.def

+9-1
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,19 @@ From: bids/base_validator:1.13.1
5050
make -C /opt/spm12/src PLATFORM=octave install
5151
ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12
5252

53+
git -C /opt/bidspm restore .
54+
git -C /opt/bidspm/ submodule foreach --recursive 'git reset --hard'
55+
git -C /opt/bidspm/ submodule foreach --recursive 'git clean --force -dfx'
56+
git -C /opt/bidspm/ status
57+
58+
59+
5360
pip install --upgrade pip
5461
pip install -r /opt/bidspm/requirements.txt
5562
pip install /opt/bidspm
5663
octave --no-gui --eval "addpath('/opt/spm12/'); savepath ('/usr/share/octave/site/m/startup/octaverc');" && \
57-
octave --no-gui --eval "addpath('/opt/bidspm/'); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path"
64+
octave --no-gui --eval "addpath('/opt/bidspm/'); savepath('/usr/share/octave/site/m/startup/octaverc'); bidspm(); path" && \
65+
octave --no-gui --eval "path"
5866

5967
%runscript
6068
bidspm "$@"

docs/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ BROWSER := python -c "$$BROWSER_PYSCRIPT"
1515

1616
# You can set these variables from the command line, and also
1717
# from the environment for the first two.
18-
SPHINXOPTS ?=
18+
SPHINXOPTS ?= -v
1919
SPHINXBUILD ?= sphinx-build
2020
SOURCEDIR = source
2121
BUILDDIR = build

docs/source/conf.py

-3
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,10 @@
5858
exclude_patterns = [
5959
"**/examples/*",
6060
"**/images/*",
61-
"**/lib/**",
6261
"demo",
6362
"defaults",
6463
"examples",
6564
"images",
66-
"lib",
67-
"tests/**/*.m",
6865
]
6966

7067
suppress_warnings = ["myst.header", "myst.xref_missing"]

docs/source/demos/openneuro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -158,5 +158,5 @@ transformers cannot yet be appled to confounds
158158
### Scripts
159159

160160
```{eval-rst}
161-
.. autoscript:: ds003379_run
161+
.. autoscript:: ds003397_run
162162
```

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ dev = [
3636
'pandas'
3737
]
3838
doc = [
39-
"urllib3==1.26.15",
39+
"urllib3",
4040
"faqtory",
4141
"myst-parser",
4242
"sphinx",
@@ -45,7 +45,7 @@ doc = [
4545
"pydata-sphinx-theme",
4646
"sphinx-togglebutton",
4747
"sphinxcontrib-bibtex",
48-
"sphinxcontrib-matlabdomain",
48+
"sphinxcontrib-matlabdomain>=0.22.1",
4949
"sphinxcontrib-mermaid",
5050
"setuptools"
5151
]

0 commit comments

Comments
 (0)