Skip to content

Commit db88799

Browse files
authored
Merge branch 'main' into enh/default_root
2 parents c82a1b7 + 8cc14d5 commit db88799

File tree

14 files changed

+196
-240
lines changed

14 files changed

+196
-240
lines changed

.circleci/config.yml

Lines changed: 35 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ version: 2.1
44

55
.dockersetup: &dockersetup
66
docker:
7-
- image: pennlinc/babs_testing:0.3
7+
- image: pennlinc/slurm-docker-ci:0.9
88

99
jobs:
1010
download_test_data:
@@ -51,6 +51,33 @@ jobs:
5151
pip install .[tests]
5252
pytest -n 4 -sv --durations=0 --timeout=300 --log-cli-level=DEBUG
5353
54+
e2e-slurm:
55+
machine:
56+
image: ubuntu-2204:current
57+
# docker:
58+
# - image: pennlinc/slurm-docker-ci:0.8
59+
working_directory: /home/circleci/src/babs
60+
steps:
61+
- checkout:
62+
path: /home/circleci/src/babs
63+
- restore_cache:
64+
keys:
65+
- test-data-v1
66+
- run:
67+
name: pytest of BABS
68+
no_output_timeout: 1h
69+
command: |
70+
docker build \
71+
-t pennlinc/slurm-docker-ci:unstable \
72+
-f Dockerfile_testing .
73+
74+
docker run -it \
75+
-v ${PWD}:/tests \
76+
-h slurmctl --cap-add sys_admin \
77+
--privileged \
78+
pennlinc/slurm-docker-ci:unstable \
79+
/tests/tests/e2e-slurm/container/walkthrough-tests.sh
80+
5481
deployable: # checkpoint of deployable: requires all success
5582
<<: *dockersetup
5683
steps:
@@ -87,9 +114,16 @@ workflows:
87114
filters:
88115
tags:
89116
only: /.*/
117+
- e2e-slurm:
118+
requires:
119+
- download_test_data
120+
filters:
121+
tags:
122+
only: /.*/
90123
- deployable:
91124
requires:
92125
- pytest
126+
- e2e-slurm
93127
filters:
94128
branches:
95129
only: main

.github/workflows/shellcheck.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,4 @@ jobs:
1717
- name: Run shellcheck
1818
run: |
1919
shellcheck -x \
20-
tests/e2e-slurm/container/babs-user-script.sh \
21-
tests/e2e-slurm/container/ensure-env.sh \
22-
tests/e2e-slurm/container/walkthrough-tests.sh \
23-
tests/e2e-slurm/install-babs.sh \
24-
tests/e2e-slurm/main.sh
20+
tests/e2e-slurm/container/walkthrough-tests.sh

DockerfileSLURM

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
FROM giovtorres/docker-centos7-slurm:latest
2+
3+
WORKDIR /
4+
RUN echo "2024.04.11"
5+
RUN curl -Ls https://micro.mamba.pm/api/micromamba/linux-64/latest | tar -xvj bin/micromamba
6+
7+
COPY docker/environment.yml /tmp/environment.yml
8+
ENV MAMBA_ROOT_PREFIX="/opt/conda" \
9+
MAMBA_NO_LOW_SPEED_LIMIT=1 \
10+
PIP_DEFAULT_TIMEOUT=100
11+
12+
RUN micromamba config set extract_threads 1 \
13+
&& micromamba create -vv -y -f /tmp/environment.yml \
14+
&& micromamba clean -y -a
15+
16+
ENV PATH=/opt/conda/envs/babs/bin:$PATH
17+
18+
# Configure the git user name and email
19+
RUN git config --global user.name "CircleCI" \
20+
&& git config --global user.email "circleci@example.com"
21+
22+
# Create toy bids app
23+
RUN mkdir -p /singularity_images \
24+
&& /opt/conda/envs/babs/bin/apptainer build \
25+
/singularity_images/toybidsapp_0.0.7.sif \
26+
docker://pennlinc/toy_bids_app:0.0.7
27+
28+
# # install BABS
29+
# COPY . /babs
30+
# WORKDIR /babs
31+
# RUN pip install .[tests]

Dockerfile_testing

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM pennlinc/slurm-docker-ci:0.9
2+
3+
# # install BABS
4+
COPY . /babs
5+
WORKDIR /babs
6+
RUN pip install .[tests]

docker/docker-entrypoint.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#!/bin/bash
2+
3+
exec "$@"

docker/environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ dependencies:
66
- git
77
- git-annex
88
- pip
9+
- p7zip
910
- python=3.11
1011
- pip:
1112
- backoff

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ allow-direct-references = true
7171
exclude = [".git_archival.txt"] # No longer needed in sdist
7272

7373
[tool.hatch.build.targets.wheel]
74-
packages = ["qsiprep"]
74+
packages = ["babs"]
7575
exclude = [
76-
"qsiprep/tests/data", # Large test data directory
76+
"babs/tests/data", # Large test data directory
7777
]
7878

7979
## The following two sections configure setuptools_scm in the hatch way

tests/e2e-slurm/container/babs-user-script.sh

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

tests/e2e-slurm/container/config_toybidsapp.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Arguments in `singularity run`:
22
singularity_run:
3+
$SUBJECT_SELECTION_FLAG: "--participant-label"
34
--no-zipped: ""
45
--dummy: "2"
56
-v: ""
@@ -11,11 +12,10 @@ zip_foldernames:
1112
# How much cluster resources it needs:
1213
cluster_resources:
1314
interpreting_shell: /bin/bash
14-
hard_memory_limit: 2G
1515

1616
script_preamble: |
17-
. ~/miniconda.env
18-
conda activate babs
17+
PATH=/opt/conda/envs/babs/bin:$PATH
18+
which python
1919
2020
# Where to run the jobs:
2121
job_compute_space: "/tmp"

tests/e2e-slurm/container/ensure-env.sh

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

0 commit comments

Comments
 (0)