From e07c7fba62eef96ab1724b2cfbb1809a05bd0756 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 13 Nov 2024 11:17:12 -0500 Subject: [PATCH 1/6] Replace pennbbl with pennlinc in package. --- .circleci/config.yml | 16 ++++++++-------- .circleci/get_data.sh | 2 +- .github/config.yml | 4 ++-- Dockerfile | 4 ++-- README.rst | 6 +++--- docs/contributors.rst | 14 +++++++------- docs/installation.rst | 8 ++++---- docs/license.rst | 4 ++-- docs/preprocessing.rst | 2 +- pyproject.toml | 6 +++--- qsiprep/cli/version.py | 4 ++-- qsiprep/tests/run_local_tests.py | 2 +- qsiprep/utils/bids.py | 2 +- 13 files changed, 37 insertions(+), 37 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 25f8dd14..ff5435f7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ orbs: .dockersetup: &dockersetup docker: - - image: pennbbl/qsiprep_build:24.7.4 + - image: pennlinc/qsiprep_build:24.7.4 working_directory: /tmp/src/qsiprep runinstall: &runinstall @@ -465,9 +465,9 @@ jobs: # Build docker image e=1 && for i in {1..5}; do docker build \ - --cache-from=pennbbl/qsiprep \ + --cache-from=pennlinc/qsiprep \ --rm=false \ - -t pennbbl/qsiprep:latest \ + -t pennlinc/qsiprep:latest \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VCS_REF=`git rev-parse --short HEAD` \ --build-arg VERSION="${CIRCLE_TAG:-$THISVERSION}" . \ @@ -479,12 +479,12 @@ jobs: command: | if [[ -n "$DOCKER_PASS" ]]; then docker login -u $DOCKER_USER -p $DOCKER_PASS - docker tag pennbbl/qsiprep pennbbl/qsiprep:unstable - docker push pennbbl/qsiprep:unstable + docker tag pennlinc/qsiprep pennlinc/qsiprep:unstable + docker push pennlinc/qsiprep:unstable if [[ -n "$CIRCLE_TAG" ]]; then - docker push pennbbl/qsiprep:latest - docker tag pennbbl/qsiprep pennbbl/qsiprep:$CIRCLE_TAG - docker push pennbbl/qsiprep:$CIRCLE_TAG + docker push pennlinc/qsiprep:latest + docker tag pennlinc/qsiprep pennlinc/qsiprep:$CIRCLE_TAG + docker push pennlinc/qsiprep:$CIRCLE_TAG fi fi diff --git a/.circleci/get_data.sh b/.circleci/get_data.sh index ed6a8689..6c70004e 100644 --- a/.circleci/get_data.sh +++ b/.circleci/get_data.sh @@ -1,4 +1,4 @@ -IMAGE=pennbbl/qsiprep:unstable +IMAGE=pennlinc/qsiprep:unstable # Set this to be comfortable on the testing machine MAX_CPUS=18 diff --git a/.github/config.yml b/.github/config.yml index 66a61592..b3cc4fe2 100644 --- a/.github/config.yml +++ b/.github/config.yml @@ -5,7 +5,7 @@ newPRWelcomeComment: > Thanks for opening this pull request! We have detected this is the first time for you to contribute to *qsiprep*. - Please check out our [contributing guidelines](https://github.com/pennbbl/qsiprep/blob/master/CONTRIBUTING.md). + Please check out our [contributing guidelines](https://github.com/pennlinc/qsiprep/blob/master/CONTRIBUTING.md). These are guidelines intended to make communication easier by describing a consistent process, but don't worry if you don't get it everything exactly @@ -13,7 +13,7 @@ newPRWelcomeComment: > We invite you to list yourself as a *qsiprep* contributor, so if your name is not already mentioned, please modify the - [``.zenodo.json``](https://github.com/pennbbl/qsiprep/blob/master/.zenodo.json) + [``.zenodo.json``](https://github.com/pennlinc/qsiprep/blob/master/.zenodo.json) file with your data. If you do so, your name will be listed as an author at the next release. Please add yourself to the list in alphabetical order, keeping Cieslak, Matthew as first and Satterthwaite, Theodore D. as last diff --git a/Dockerfile b/Dockerfile index 9f7d980b..2ca30d29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && \ COPY . /src/qsiprep RUN python -m build /src/qsiprep -FROM pennbbl/qsiprep_build:24.7.4 +FROM pennlinc/qsiprep_build:24.7.4 # Install qsiprep wheel COPY --from=wheelstage /src/qsiprep/dist/*.whl . @@ -30,6 +30,6 @@ LABEL org.label-schema.build-date=$BUILD_DATE \ org.label-schema.description="qsiprep - q Space Images preprocessing tool" \ org.label-schema.url="http://qsiprep.readthedocs.io" \ org.label-schema.vcs-ref=$VCS_REF \ - org.label-schema.vcs-url="https://github.com/pennbbl/qsiprep" \ + org.label-schema.vcs-url="https://github.com/pennlinc/qsiprep" \ org.label-schema.version=$VERSION \ org.label-schema.schema-version="1.0" \ No newline at end of file diff --git a/README.rst b/README.rst index 49bf43d2..75b084c9 100644 --- a/README.rst +++ b/README.rst @@ -11,8 +11,8 @@ QSIprep: Preprocessing and analysis of q-space images :target: http://qsiprep.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status -.. image:: https://img.shields.io/badge/docker-pennbbl/qsiprep-brightgreen.svg?logo=docker&style=flat - :target: https://hub.docker.com/r/pennbbl/qsiprep/tags/ +.. image:: https://img.shields.io/badge/docker-pennlinc/qsiprep-brightgreen.svg?logo=docker&style=flat + :target: https://hub.docker.com/r/pennlinc/qsiprep/tags/ :alt: Docker .. image:: https://circleci.com/gh/PennLINC/qsiprep/tree/master.svg?style=svg @@ -44,7 +44,7 @@ The main features of this software are from Dipy_, MRTrix_, `DSI Studio`_ and others. 4. A novel motion correction algorithm that works on DSI and random q-space sampling schemes -.. image:: https://github.com/PennBBL/qsiprep/raw/master/docs/_static/workflow_full.png +.. image:: https://github.com/PennLINC/qsiprep/raw/master/docs/_static/workflow_full.png .. _preprocessing_def: diff --git a/docs/contributors.rst b/docs/contributors.rst index ed3e2338..66dddc1f 100644 --- a/docs/contributors.rst +++ b/docs/contributors.rst @@ -9,8 +9,8 @@ update an existing environment, as necessary. Development in Docker is encouraged, for the sake of consistency and portability. -By default, work should be built off of `pennbbl/qsiprep:latest -`_ (see the +By default, work should be built off of `pennlinc/qsiprep:latest +`_ (see the installation_ guide for the basic procedure for running). @@ -30,7 +30,7 @@ For example, :: $ docker run --rm -v $HOME/fullds005:/data:ro -v $HOME/dockerout:/out \ -v $HOME/projects/qsiprep/qsiprep:/usr/local/miniconda/lib/python3.10/site-packages/qsiprep:ro \ - pennbbl/qsiprep:latest /data /out/out participant \ + pennlinc/qsiprep:latest /data /out/out participant \ -w /out/work/ In order to work directly in the container, use ``--entrypoint=bash`` @@ -38,7 +38,7 @@ arguments in a ``docker`` command:: $ docker run --rm -v $HOME/fullds005:/data:ro -v $HOME/dockerout:/out \ -v $HOME/projects/qsiprep/qsiprep:/usr/local/miniconda/lib/python3.10/site-packages/qsiprep:ro --entrypoint=bash \ - pennbbl/qsiprep:latest + pennlinc/qsiprep:latest Patching containers can be achieved in Apptainer analogous to ``docker`` using the ``--bind`` (``-B``) option: :: @@ -65,14 +65,14 @@ dependency changes. Python dependencies should generally be included in the ``REQUIRES`` list in `qsiprep/info.py -`_. +`_. If the latest version in `PyPI `_ is sufficient, then no further action is required. For large Python dependencies where there will be a benefit to pre-compiled binaries, `conda `_ packages may also be added to the ``conda install`` line in the `Dockerfile -`_. +`_. Non-Python dependencies must also be installed in the Dockerfile, via a ``RUN`` command. @@ -89,7 +89,7 @@ repository, located in ``~/projects/qsiprep``: :: ~/projects/qsiprep$ docker build -t qsiprep . -To work in this image, replace ``pennbbl/qsiprep:latest`` with +To work in this image, replace ``pennlinc/qsiprep:latest`` with ``qsiprep`` in any of the above commands. diff --git a/docs/installation.rst b/docs/installation.rst index 6a693caa..f8e49ca9 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -32,7 +32,7 @@ You may invoke ``docker`` directly:: -v /filepath/to/data/dir \ -v /filepath/to/output/dir \ -v ${FREESURFER_HOME}/license.txt:/opt/freesurfer/license.txt \ - pennbbl/qsiprep:latest \ + pennlinc/qsiprep:latest \ /filepath/to/data/dir /filepath/to/output/dir participant \ --fs-license-file /opt/freesurfer/license.txt @@ -42,7 +42,7 @@ For example: :: -v $HOME/fullds005 \ -v $HOME/dockerout \ -v ${FREESURFER_HOME}/license.txt:/opt/freesurfer/license.txt \ - pennbbl/qsiprep:latest \ + pennlinc/qsiprep:latest \ $HOME/fullds005 $HOME/dockerout participant \ --ignore fieldmaps \ --fs-license-file /opt/freesurfer/license.txt @@ -54,7 +54,7 @@ you will need to mount your Freesurfer license.txt file when invoking ``docker`` -v $HOME/fullds005 \ -v $HOME/dockerout \ -v ${FREESURFER_HOME}/license.txt:/opt/freesurfer/license.txt \ - pennbbl/qsiprep:latest \ + pennlinc/qsiprep:latest \ $HOME/fullds005 -v $HOME/dockerout participant \ --fs-license-file /opt/freesurfer/license.txt @@ -69,7 +69,7 @@ Apptainer Container The easiest way to get an Apptainer (formerly Singularity) image is to run:: - $ apptainer build qsiprep-.sif docker://pennbbl/qsiprep: + $ apptainer build qsiprep-.sif docker://pennlinc/qsiprep: Where ```` should be replaced with the desired version of qsiprep that you want to download. Do not use ``latest`` or ``unstable`` unless you are performing limited testing. diff --git a/docs/license.rst b/docs/license.rst index dc785012..538c67d6 100644 --- a/docs/license.rst +++ b/docs/license.rst @@ -2,10 +2,10 @@ License information ------------------- We use the 3-clause BSD license; the full license may be found in the -`LICENSE `_ file +`LICENSE `_ file in the ``qsiprep`` distribution. All trademarks referenced herein are property of their respective holders. -Copyright (c) 2018-2019 PennBBL +Copyright (c) 2018-2019 PennLINC All rights reserved. diff --git a/docs/preprocessing.rst b/docs/preprocessing.rst index a120a17e..5a29bb08 100644 --- a/docs/preprocessing.rst +++ b/docs/preprocessing.rst @@ -737,7 +737,7 @@ Configuring ``eddy`` options, you can specify them in a JSON file and pass that to ``qsiprep`` using the ``--eddy-config`` option. An example (default) eddy config json can be viewed or downloaded `here -`__ +`__ diff --git a/pyproject.toml b/pyproject.toml index e09f3e7e..6c8cb45d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ build-backend = "hatchling.build" name = "qsiprep" description = "qsiprep builds workflows for preprocessing and reconstructing q-space images" readme = "long_description.rst" -authors = [{name = "The PennBBL developers"}] +authors = [{name = "The PennLINC developers"}] classifiers = [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", @@ -47,10 +47,10 @@ dependencies = [ dynamic = ["version"] [project.urls] -Homepage = "https://github.com/pennbbl/qsiprep" +Homepage = "https://github.com/pennlinc/qsiprep" Documentation = "https://www.qsiprep.readthedocs.io" Paper = "https://doi.org/10.1038/s41592-022-01458-7" -"Docker Images" = "https://hub.docker.com/r/pennbbl/qsiprep/tags/" +"Docker Images" = "https://hub.docker.com/r/pennlinc/qsiprep/tags/" [project.optional-dependencies] doc = [ diff --git a/qsiprep/cli/version.py b/qsiprep/cli/version.py index b0c4a969..9278c356 100644 --- a/qsiprep/cli/version.py +++ b/qsiprep/cli/version.py @@ -66,12 +66,12 @@ def check_latest(): def is_flagged(): """Check whether current version is flagged.""" - # https://raw.githubusercontent.com/pennbbl/qsiprep/master/.versions.json + # https://raw.githubusercontent.com/pennlinc/qsiprep/master/.versions.json flagged = tuple() try: response = requests.get( url="""\ -https://raw.githubusercontent.com/pennbbl/qsiprep/master/.versions.json""", +https://raw.githubusercontent.com/pennlinc/qsiprep/master/.versions.json""", timeout=1.0, ) except Exception: diff --git a/qsiprep/tests/run_local_tests.py b/qsiprep/tests/run_local_tests.py index 91fc8105..f609ab33 100644 --- a/qsiprep/tests/run_local_tests.py +++ b/qsiprep/tests/run_local_tests.py @@ -70,7 +70,7 @@ def run_tests(test_regex, test_mark): run_str = "docker run --rm -ti " run_str += f"-v {local_patch}:{mounted_code} " run_str += "--entrypoint pytest " - run_str += "pennbbl/qsiprep:unstable " + run_str += "pennlinc/qsiprep:unstable " run_str += ( f"{mounted_code}/qsiprep " f"--data_dir={mounted_code}/qsiprep/tests/test_data " diff --git a/qsiprep/utils/bids.py b/qsiprep/utils/bids.py index df61fdfe..61be5d50 100644 --- a/qsiprep/utils/bids.py +++ b/qsiprep/utils/bids.py @@ -243,7 +243,7 @@ def write_derivative_description(bids_dir, deriv_dir): "CodeURL": DOWNLOAD_URL, } ], - "CodeURL": "https://github.com/pennbbl/qsiprep", + "CodeURL": "https://github.com/pennlinc/qsiprep", "HowToAcknowledge": "Please cite our paper " "(https://www.nature.com/articles/s41592-021-01185-5#citeas), and " "include the generated citation boilerplate within the Methods " From f00c3a1fdf345b2c03fa375f4f283cc08fcb9277 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Wed, 13 Nov 2024 14:32:05 -0500 Subject: [PATCH 2/6] Remove container warning. --- qsiprep/cli/run.py | 26 -------------------------- 1 file changed, 26 deletions(-) diff --git a/qsiprep/cli/run.py b/qsiprep/cli/run.py index 1a7cafdb..c1ae0377 100644 --- a/qsiprep/cli/run.py +++ b/qsiprep/cli/run.py @@ -30,7 +30,6 @@ def main(): """Entry point.""" import gc - import os import sys from multiprocessing import Manager, Process from os import EX_SOFTWARE @@ -42,31 +41,6 @@ def main(): parse_args() - # Raise a warning about PennBBL/QSIPrep being deprecated - in_container = False - # Check for Docker - if os.path.exists("/.dockerenv"): - in_container = True - - # Check for Apptainer/Singularity - if os.path.exists("/.singularity.d") or os.path.exists("/.apptainer.d"): - in_container = True - - # Check for environment variables - if os.getenv("SINGULARITY_NAME") or os.getenv("APPTAINER_NAME"): - in_container = True - - if in_container: - print( - """\ -************************************************************** -WARNING: The pennbbl/qsiprep Docker image has been DEPRECATED. -Please use the pennlinc/qsiprep image instead. -************************************************************** -""", - file=sys.stderr, - ) - if "pdb" in config.execution.debug: from qsiprep.utils.debug import setup_exceptionhook From 35f5e4255dee74f6dce41d8800f0abb6eccbfb9c Mon Sep 17 00:00:00 2001 From: Matt Cieslak Date: Wed, 13 Nov 2024 20:48:58 -0500 Subject: [PATCH 3/6] update tag --- .circleci/config.yml | 2 +- Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ff5435f7..7fd81703 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,7 +4,7 @@ orbs: .dockersetup: &dockersetup docker: - - image: pennlinc/qsiprep_build:24.7.4 + - image: pennlinc/qsiprep_build:24.10.0 working_directory: /tmp/src/qsiprep runinstall: &runinstall diff --git a/Dockerfile b/Dockerfile index 2ca30d29..4df02ead 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ RUN apt-get update && \ COPY . /src/qsiprep RUN python -m build /src/qsiprep -FROM pennlinc/qsiprep_build:24.7.4 +FROM pennlinc/qsiprep_build:24.10.0 # Install qsiprep wheel COPY --from=wheelstage /src/qsiprep/dist/*.whl . From f195a2f73f3105a8de822c63a856854562dc86b0 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 14 Nov 2024 09:50:13 -0500 Subject: [PATCH 4/6] Update config.yml --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 7fd81703..e5c806ac 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -133,7 +133,7 @@ jobs: steps: - checkout - restore_cache: - key: twoses-01 + key: twoses-02 - run: *runinstall - run: name: Download twoses test data @@ -141,7 +141,7 @@ jobs: cd /tmp/src/qsiprep/.circleci python get_data.py $PWD/data twoses - save_cache: - key: twoses-01 + key: twoses-02 paths: - /tmp/src/qsiprep/.circleci/data/twoses @@ -380,7 +380,7 @@ jobs: steps: - checkout - restore_cache: - key: twoses-01 + key: twoses-02 - run: *runinstall - run: name: Test the mri robust template for T1w images From f797187d2137ea488c42ef2581a9f66075b4da24 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 14 Nov 2024 10:14:43 -0500 Subject: [PATCH 5/6] Update test config. --- .circleci/config.yml | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e5c806ac..d34ef498 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,10 +33,7 @@ runinstall: &runinstall ln -s /home/qsiprep/.dipy /root/.dipy fi - - jobs: - build: resource_class: small docker: @@ -364,6 +361,8 @@ jobs: CIRCLE_CPUS: 4 steps: - checkout + - restore_cache: + key: twoses-02 - run: *runinstall - run: name: Test the intramodal template workflow @@ -380,7 +379,7 @@ jobs: steps: - checkout - restore_cache: - key: twoses-02 + key: DSDTI-01 - run: *runinstall - run: name: Test the mri robust template for T1w images @@ -591,14 +590,14 @@ workflows: - IntramodalTemplate: requires: - - build + - download_twoses filters: tags: only: /.*/ - MultiT1w: requires: - - download_twoses + - download_DSDTI filters: tags: only: /.*/ From 63165990ef93b1b860d63a5c4fc5f0261fbc3736 Mon Sep 17 00:00:00 2001 From: Taylor Salo Date: Thu, 14 Nov 2024 10:38:45 -0500 Subject: [PATCH 6/6] Try this. --- .circleci/IntramodalTemplate.sh | 2 +- .circleci/MultiT1w.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/IntramodalTemplate.sh b/.circleci/IntramodalTemplate.sh index 856c35bd..51ff00f5 100644 --- a/.circleci/IntramodalTemplate.sh +++ b/.circleci/IntramodalTemplate.sh @@ -34,7 +34,7 @@ TESTNAME=imtemplate setup_dir ${TESTDIR}/${TESTNAME} TEMPDIR=${TESTDIR}/${TESTNAME}/work OUTPUT_DIR=${TESTDIR}/${TESTNAME}/derivatives -BIDS_INPUT_DIR=${TESTDIR}/data/twoses +BIDS_INPUT_DIR=${TESTDIR}/data/twoses/twoses QSIPREP_CMD=$(run_qsiprep_cmd ${BIDS_INPUT_DIR} ${OUTPUT_DIR}) ${QSIPREP_CMD} \ diff --git a/.circleci/MultiT1w.sh b/.circleci/MultiT1w.sh index d5fd6cf2..484423c3 100644 --- a/.circleci/MultiT1w.sh +++ b/.circleci/MultiT1w.sh @@ -28,12 +28,12 @@ EDDY_CFG=${TESTDIR}/data/eddy_config.json setup_dir ${TESTDIR}/${TESTNAME} TEMPDIR=${TESTDIR}/${TESTNAME}/work OUTPUT_DIR=${TESTDIR}/${TESTNAME}/derivatives -BIDS_INPUT_DIR=${TESTDIR}/data/DSDTI +BIDS_INPUT_DIR=${TESTDIR}/data/DSDTI/DSDTI export FS_LICENSE=${TESTDIR}/data/license.txt QSIPREP_CMD=$(run_qsiprep_cmd ${BIDS_INPUT_DIR} ${OUTPUT_DIR}) # CRITICAL: delete the fieldmap data -rm -rf data/DSDTI/sub-PNC/fmap +rm -rf data/DSDTI/DSDTI/sub-PNC/fmap # Create a shifted version of the t1w if [[ "${IN_CI}" = 'true' ]]; then