Skip to content

Commit a1e5524

Browse files
authored
Merge pull request #787 from Remi-Gau/validate
[ENH] improve bids validation
2 parents cd835a5 + 334a7bc commit a1e5524

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+744
-3324
lines changed

.github/workflows/run_system_tests_matlab.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,23 @@ jobs:
6464
# MATLAB release to set up R2020a
6565
release: R2020a
6666

67+
- uses: actions/setup-node@v3
68+
with:
69+
node-version: 18
70+
71+
- uses: actions/setup-python@v4
72+
with:
73+
python-version: '3.10'
74+
6775
- name: Clone bidspm
6876
uses: actions/checkout@v3
6977
with:
7078
submodules: recursive
7179
fetch-depth: 0
7280

81+
- name: Install validators
82+
run: make install
83+
7384
- name: Get moae fmriprep data from OSF
7485
run: |
7586
mkdir -p demos/MoAE/inputs/

.github/workflows/run_system_tests_octave.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ jobs:
5959
sudo apt-get -y -qq update
6060
sudo apt-get -y install octave liboctave-dev
6161
62+
- uses: actions/setup-node@v3
63+
with:
64+
node-version: 18
65+
66+
- uses: actions/setup-python@v4
67+
with:
68+
python-version: '3.10'
69+
6270
- name: Info
6371
run: |
6472
octave --version
@@ -69,6 +77,9 @@ jobs:
6977
submodules: recursive
7078
fetch-depth: 0
7179

80+
- name: Install validators
81+
run: make install
82+
7283
- name: Get moae fmriprep data from OSF
7384
run: |
7485
mkdir -p demos/MoAE/inputs/

.github/workflows/run_tests_matlab.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,23 @@ jobs:
2929
# MATLAB release to set up R2020a
3030
release: R2020a
3131

32+
- uses: actions/setup-node@v3
33+
with:
34+
node-version: 18
35+
36+
- uses: actions/setup-python@v4
37+
with:
38+
python-version: '3.10'
39+
3240
- name: Clone bidspm
3341
uses: actions/checkout@v3
3442
with:
3543
submodules: recursive
3644
fetch-depth: 0
3745

46+
- name: Install validators
47+
run: make install
48+
3849
- name: Install SPM
3950
run: |
4051
git clone https://github.com/spm/spm12.git --depth 1

.github/workflows/run_tests_octave.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,23 @@ jobs:
3939
run: |
4040
octave --version
4141
42+
- uses: actions/setup-node@v3
43+
with:
44+
node-version: 18
45+
46+
- uses: actions/setup-python@v4
47+
with:
48+
python-version: '3.10'
49+
4250
- name: Clone bidspm
4351
uses: actions/checkout@v3
4452
with:
4553
submodules: recursive
4654
fetch-depth: 0
4755

56+
- name: Install validators
57+
run: make install
58+
4859
- name: Install SPM
4960
run: |
5061
git clone https://github.com/spm/spm12.git --depth 1

.gitmodules

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,3 @@
3131
path = lib/octache
3232
url = https://github.com/Remi-Gau/Octache.git
3333
datalad-url = https://github.com/Remi-Gau/Octache.git
34-
[submodule "tools/stats_model"]
35-
path = tools/stats_model
36-
url = https://github.com/bids-standard/stats-models.git

.pre-commit-config.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,20 @@ repos:
5353
rev: 22.10.0
5454
hooks:
5555
- id: black
56+
args: [--config=pyproject.toml]
5657

5758
- repo: https://github.com/asottile/reorder_python_imports
5859
rev: v3.9.0
5960
hooks:
6061
- id: reorder-python-imports
62+
63+
- repo: https://github.com/asottile/setup-cfg-fmt
64+
rev: v2.1.0
65+
hooks:
66+
- id: setup-cfg-fmt
67+
68+
- repo: https://github.com/asottile/pyupgrade
69+
rev: v3.1.0
70+
hooks:
71+
- id: pyupgrade
72+
args: [--py38-plus]

.readthedocs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ formats:
2121

2222
# Optionally set the version of Python and requirements required to build your docs
2323
python:
24-
version: 3.8
24+
version: "3.8"
2525
install:
2626
- requirements: requirements_doc.txt

CITATION.cff

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ cff-version: 1.2.0
22

33
title: "bidspm"
44

5-
version: 2.1.0dev
5+
version: 2.2.0
66

77
abstract: BIDSpm is a set pipelines and tools for Octave/MATLAB to process and analyze BIDS data sets using SPM.
88

Dockerfile

Lines changed: 32 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Creates a docker image of bidspm with
1+
# Creates a docker image of bidspm
2+
3+
# version number are updated automatically with tbe bump version script
24

35
# this is mostly taken from the spm docker files: https://github.com/spm/spm-docker
46
FROM ubuntu:22.04
@@ -8,62 +10,59 @@ USER root
810
ENV LANG="en_US.UTF-8" \
911
LC_ALL="en_US.UTF-8"
1012

11-
#TODO how to update this with the content of the current version
12-
LABEL version="1.1.5dev"
13+
LABEL version="2.2.0"
1314

1415
LABEL maintainer="Rémi Gau <remi.gau@gmail.com>"
1516

16-
## Install SPM
17-
# basic OS tools install and also octave
17+
## basic OS tools install, node, npm also octave
1818
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
19-
build-essential \
19+
build-essential software-properties-common\
2020
curl \
21-
octave \
22-
liboctave-dev &&
23-
apt-get clean &&
21+
octave liboctave-dev \
22+
nodejs npm
23+
24+
## add python
25+
RUN add-apt-repository ppa:deadsnakes/ppa && apt-get update
26+
RUN apt-get -y install python3.10 python3-pip
27+
28+
RUN apt-get clean && \
2429
rm -rf \
2530
/tmp/hsperfdata* \
2631
/var/*/apt/*/partial \
2732
/var/lib/apt/lists/* \
2833
/var/log/apt/term*
2934

30-
RUN mkdir /opt/spm12 &&
31-
curl -SL https://github.com/spm/spm12/archive/r7771.tar.gz |
32-
tar -xzC /opt/spm12 --strip-components 1 &&
33-
curl -SL https://raw.githubusercontent.com/spm/spm-docker/main/octave/spm12_r7771.patch |
34-
patch -p0 &&
35-
make -C /opt/spm12/src PLATFORM=octave distclean &&
36-
make -C /opt/spm12/src PLATFORM=octave &&
37-
make -C /opt/spm12/src PLATFORM=octave install &&
35+
## Install SPM
36+
RUN mkdir /opt/spm12 && \
37+
curl -SL https://github.com/spm/spm12/archive/r7771.tar.gz | \
38+
tar -xzC /opt/spm12 --strip-components 1 && \
39+
curl -SL https://raw.githubusercontent.com/spm/spm-docker/main/octave/spm12_r7771.patch | \
40+
patch -p0 && \
41+
make -C /opt/spm12/src PLATFORM=octave distclean && \
42+
make -C /opt/spm12/src PLATFORM=octave && \
43+
make -C /opt/spm12/src PLATFORM=octave install && \
3844
ln -s /opt/spm12/bin/spm12-octave /usr/local/bin/spm12
39-
4045
RUN octave --no-gui --eval "addpath('/opt/spm12/'); savepath ();"
4146

4247
## Install nods and bids validator
43-
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y install \
44-
nodejs npm &&
45-
apt-get clean &&
46-
rm -rf \
47-
/tmp/hsperfdata* \
48-
/var/*/apt/*/partial \
49-
/var/lib/apt/lists/* \
50-
/var/log/apt/term*
51-
5248
RUN node -v && npm -v && npm install -g bids-validator
5349

5450
## Install BIDSpm in user folder
5551
RUN test "$(getent passwd neuro)" || useradd --no-user-group --create-home --shell /bin/bash neuro
5652

57-
USER neuro
58-
5953
WORKDIR /home/neuro
54+
RUN mkdir code input output
6055

61-
RUN mkdir code output bidspm
56+
# COPY . /home/neuro/bidspm # this is for local development
57+
RUN git clone --branch v2.2.0 --depth 1 --recursive https://github.com/cpp-lln-lab/bidspm.git
6258

63-
WORKDIR /home/neuro/
59+
RUN cd bidspm && pip3 install .
60+
RUN echo '\n'
61+
RUN python3 --version && pip3 list
62+
RUN echo '\n'
6463

65-
COPY [".", "/home/neuro/bidspm/"]
64+
RUN cd bidspm && octave --no-gui --eval "bidspm; savepath();"
6665

67-
RUN cd bidspm && octave --no-gui --eval "initCppSpm(false); savepath();"
66+
USER neuro
6867

6968
ENTRYPOINT ["octave"]

MANIFEST.in

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)