Skip to content

Commit

Permalink
Merge pull request #90 from PennLINC/enh/docker_version_4test
Browse files Browse the repository at this point in the history
[ENH] update toy BIDS App version used for CircleCI testing
  • Loading branch information
Chenying Zhao authored May 4, 2023
2 parents 1a39afb + 1970f41 commit 480da1d
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 21 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2.1

.dockersetup: &dockersetup
docker:
- image: pennlinc/babs_tests:datalad0.17.2_v4
- image: pennlinc/babs_tests:datalad0.17.2_v5

# TODO:
# runinstall: &runinstall
Expand Down
7 changes: 5 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
version: 2

build:
os: ubuntu-22.04
tools:
python: "3.8"

sphinx:
configuration: docs/source/conf.py

python:
version: 3.8
install:
- method: pip
path: .
extra_requirements:
- doc
system_packages: true
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"--container_ds",
"/Users/chenyzh/Desktop/Research/Satterthwaite_Lab/datalad_wrapper/data/toybidsapp-container-docker",
"--container_name",
"toybidsapp-0-0-6", // "fmriprep-20-2-3",
"toybidsapp-0-0-7", // "fmriprep-20-2-3",
"--container_config_yaml_file",
"/Users/chenyzh/Desktop/Research/Satterthwaite_Lab/datalad_wrapper/babs/notebooks/example_container_toybidsapp.yaml",
// "/Users/chenyzh/Desktop/Research/Satterthwaite_Lab/datalad_wrapper/babs/notebooks/example_container_fmriprep.yaml",
Expand All @@ -49,7 +49,7 @@
// // "--list_sub_file", "/cbica/projects/BABS/babs/notebooks/initial_sub_list_multi-ses.csv",
// // "--container_ds", "/cbica/projects/BABS/data/toybidsapp-container",
// "--container_ds", "/cbica/projects/BABS/data/fmriprep-container",
// // "--container_name", "toybidsapp-0-0-6",
// // "--container_name", "toybidsapp-0-0-7",
// "--container_name", "fmriprep-20-2-3",
// // "--container_config_yaml_file", "/cbica/projects/BABS/babs/notebooks/example_container_toybidsapp.yaml",
// "--container_config_yaml_file", "/cbica/projects/BABS/babs/notebooks/example_container_fmriprep_anatonly.yaml",
Expand Down
2 changes: 1 addition & 1 deletion docs/source/babs-init.rst
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ an SGE cluster:
--project_name my_BABS_project \
--input BIDS /path/to/BIDS_datalad_dataset \
--container_ds /path/to/toybidsapp-container \
--container_name toybidsapp-0-0-6 \
--container_name toybidsapp-0-0-7 \
--container_config_yaml_file /path/to/container_toybidsapp.yaml \
--type_session multi-ses \
--type_system sge
Expand Down
9 changes: 6 additions & 3 deletions notebooks/example_container_toybidsapp.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# This is an example config yaml file for toy BIDS App "toy_bids_app" version 0.0.6.
# This is an example config yaml file for:
# toy BIDS App "toy_bids_app"
# whose version = 0.0.7
# for application to raw BIDS dataset ("unzipped")
# Toy BIDS App's Docker image is publicly available at: https://hub.docker.com/r/pennlinc/toy_bids_app
# This BIDS App counts number of non-hidden files in a subject's (or a session's) folder;
# More details please see: https://github.com/PennLINC/babs_tests/blob/main/docker/README.md#toy-bids-app-toy_bids_app
Expand All @@ -12,8 +15,8 @@

singularity_run:
--no-zipped: "" # for raw BIDS dataset
# --zipped: "" # for zipped input dataset
-v: ""
--dummy: "2" # this is a dummy variable, accepting values
-v: "" # this is also a dummy variable, not accepting values

# Output foldername(s) to be zipped, and the BIDS App version to be included in the zip filename(s):
zip_foldernames:
Expand Down
16 changes: 8 additions & 8 deletions notebooks/example_container_zipped_toybidsapp.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
# Below is example config yaml file for toy BIDS App:
# This is an example config yaml file for:
# toy BIDS App "toy_bids_app"
# whose version = 0.0.7
# for application to zipped BIDS derivatives dataset ("zipped")

singularity_run:
# --no-zipped: "" # for raw BIDS dataset
--zipped: "" # for zipped input dataset
-v: ""
--dummy: "2" # this is a dummy variable, accepting values
-v: "" # this is also a dummy variable, not accepting values

# Output foldername(s) to be zipped, and the BIDS App version to be included in the zip filename(s):
zip_foldernames:
Expand Down Expand Up @@ -31,9 +34,6 @@ script_preamble: |
# Where to run the jobs:
job_compute_space: "${CBICA_TMPDIR}" # Penn Med CUBIC cluster tmp space

# Below is to filter out subjects (or sessions)
# right now we only filter based on unzipped dataset
# required_files:
# $INPUT_DATASET_#1:
# - ""
# 'required_files' section is not needed for toy BIDS App.

# 'alert_log_messages' section is usually not needed for toy BIDS App.
8 changes: 4 additions & 4 deletions tests/get_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

# containers:
LIST_WHICH_BIDSAPP = ["toybidsapp", "fmriprep", "qsiprep"]
TOYBIDSAPP_VERSION = "0.0.6" # +++++++++++++++++++++++
TOYBIDSAPP_VERSION = "0.0.7" # +++++++++++++++++++++++
TOYBIDSAPP_VERSION_DASH = TOYBIDSAPP_VERSION.replace(".", "-")
FN_TOYBIDSAPP_SIF_CIRCLECI = op.join("/singularity_images",
"toybidsapp_" + TOYBIDSAPP_VERSION + ".sif")
Expand Down Expand Up @@ -180,16 +180,16 @@ def container_ds_path(where_now, tmp_path_factory):
# datalad containers-add --url ${fn_sif} toybidsapp-${version_tag_dash}
# API help: in python env: `help(dlapi.containers_add)`
container_ds_handle.containers_add(
name=which_bidsapp+"-"+TOYBIDSAPP_VERSION_DASH, # e.g., "toybidsapp-0-0-6"
name=which_bidsapp+"-"+TOYBIDSAPP_VERSION_DASH, # e.g., "toybidsapp-0-0-7"
url=fn_toybidsapp_sif)
# # can remove the original sif file now:
# os.remove(fn_toybidsapp_sif)
elif where_now == "on_local": # add docker image:
# datalad containers-add --url dhub://pennlinc/toy_bids_app:${version_tag} \
# toybidsapp-${version_tag_dash}
container_ds_handle.containers_add(
name=which_bidsapp+"-"+TOYBIDSAPP_VERSION_DASH, # e.g., "toybidsapp-0-0-6"
url="dhub://"+docker_addr # e.g., "dhub://pennlinc/toy_bids_app:0.0.6"
name=which_bidsapp+"-"+TOYBIDSAPP_VERSION_DASH, # e.g., "toybidsapp-0-0-7"
url="dhub://"+docker_addr # e.g., "dhub://pennlinc/toy_bids_app:0.0.7"
)

return origin_container_ds
Expand Down

0 comments on commit 480da1d

Please sign in to comment.