Skip to content

Commit

Permalink
[MAINT] use python to create dummy data (#1143)
Browse files Browse the repository at this point in the history
* replace bash scipt with python one

* update install in CI

* fix typo

* adapt script

* add fixes

* simplify system test on windows
  • Loading branch information
Remi-Gau authored Sep 17, 2023
1 parent 2677a02 commit 4ffe5f3
Show file tree
Hide file tree
Showing 14 changed files with 421 additions and 392 deletions.
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ coverage_html
templates
**/tests
**/bids-examples
lib/*/.git
lib/**/.git


# General
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests_octave.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ jobs:
- name: Install python
uses: actions/setup-python@v4
with:
python-version: '3.10'
python-version: '3.11'

- name: Clone bidspm
uses: actions/checkout@v3
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ARG = -nodisplay -nosplash -nodesktop

install:
npm install -g bids-validator
pip3 install .
pip3 install .[dev]

help: ## Show what this Makefile can do
@python -c "$$PRINT_HELP_PYSCRIPT" < $(MAKEFILE_LIST)
Expand Down Expand Up @@ -122,7 +122,6 @@ clean_docker:

build_image: Dockerfile ## Build stable docker image from the main branch
docker build . -f Dockerfile -t cpplab/bidspm:unstable
VERSION=$(cat version.txt | cut -c2-)

Dockerfile_matlab:
docker run --rm kaczmarj/neurodocker:0.9.1 generate docker \
Expand All @@ -138,4 +137,7 @@ 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

################################################################################
13 changes: 11 additions & 2 deletions demos/MoAE/test_moae.m
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,22 @@

cd(WD);

% with Octave running more n-1 loop in CI is fine
% Octave
% running more n-1 loop in CI is fine
% but not running crashes with a segmentation fault
% /home/runner/work/_temp/fb8e9d58-fa9f-4f93-8c96-387973f3632e.sh: line 2:
% 7487 Segmentation fault (core dumped) octave $OCTFLAGS --eval "run system_tests_facerep;"
%
% not sure why
if bids.internal.is_octave()
%

% Windows
% Error using overwriteDir
% C:\Users\runneradmin\AppData\Local\Temp\8f7c44ca98d0\outputs\derivatives\bidspm-stats\
% sub-01\task-auditory_space-individual_FWHM-6 could not be removed.
% Error in setBatchSubjectLevelGLMSpec (line 73)
% overwriteDir(ffxDir, opt);
if bids.internal.is_octave() || ispc()
break
end

Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ dev = [
"coverage",
"pytest",
"ruamel.yaml",
'pandas'
]

[project.scripts]
Expand Down
2 changes: 1 addition & 1 deletion tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ clean_local:
rm -rf data/derivatives/bidspm-*/jobs

create_dummy_dataset: clean_local
sh createDummyDataSet.sh
python create_dummy_dataset.py

bids_examples:
rm -rf bids-examples/
Expand Down
Loading

0 comments on commit 4ffe5f3

Please sign in to comment.