diff --git a/.circleci/config.yml b/.circleci/config.yml index 2e89ba1de..2d64ef4a1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: SCRATCH: "/scratch" docker: - image: docker:18.06.1-ce-git - working_directory: /tmp/src/BOnD + working_directory: /tmp/src/CuBIDS steps: - checkout - run: @@ -40,9 +40,9 @@ jobs: # Build docker image e=1 && for i in {1..5}; do docker build \ - --cache-from=pennlinc/bond \ + --cache-from=pennlinc/cubids \ --rm=false \ - -t pennlinc/bond:latest \ + -t pennlinc/cubids:latest \ --build-arg BUILD_DATE=`date -u +"%Y-%m-%dT%H:%M:%SZ"` \ --build-arg VCS_REF=`git rev-parse --short HEAD` . \ && e=0 && break || sleep 15 @@ -53,7 +53,7 @@ jobs: no_output_timeout: 40m command: | mkdir -p /tmp/cache - docker save pennlinc/bond:latest \ + docker save pennlinc/cubids:latest \ | pigz -3 > /tmp/cache/docker.tar.gz - save_cache: @@ -76,8 +76,8 @@ jobs: conda config --set always_yes yes conda update conda conda info -a - conda create -n bond python=3.7 - source activate bond + conda create -n cubids python=3.7 + source activate cubids conda install -c conda-forge -y datalad # Add nodejs and the validator conda install nodejs @@ -143,10 +143,10 @@ jobs: install_and_test_singularity: machine: image: ubuntu-1604:202004-01 - working_directory: /home/circleci/src/BOnD + working_directory: /home/circleci/src/CuBIDS steps: - checkout: - path: /home/circleci/src/BOnD + path: /home/circleci/src/CuBIDS - attach_workspace: at: /tmp @@ -174,10 +174,10 @@ jobs: fi - run: - name: Install BOnD + name: Install CuBIDS command: | export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids pip install . - run: @@ -195,70 +195,70 @@ jobs: no_output_timeout: 30m command: | singularity build \ - /home/circleci/bond-latest.sif \ - docker-daemon://pennlinc/bond:latest + /home/circleci/cubids-latest.sif \ + docker-daemon://pennlinc/cubids:latest - run: - name: Test bond-validate + name: Test cubids-validate command: | git config --global user.email "circleci@citesting.com" git config --global user.name "CircleCI Test" export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids /tmp/validate_testing - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/singularity - bond-validate \ + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/singularity + cubids-validate \ /tmp/bids/singularity \ /tmp/validate_testing/singularity \ - --container /home/circleci/bond-latest.sif + --container /home/circleci/cubids-latest.sif - run: - name: Test bond-group + name: Test cubids-group command: | git config --global user.email "circleci@citesting.com" git config --global user.name "CircleCI Test" export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids /tmp/group_testing - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/group - bond-group \ + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/group + cubids-group \ /tmp/bids/group \ /tmp/group_testing/group \ - --container /home/circleci/bond-latest.sif + --container /home/circleci/cubids-latest.sif - run: - name: Test bond-save + name: Test cubids-save command: | git config --global user.email "circleci@citesting.com" git config --global user.name "CircleCI Test" export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/singularity - bond-datalad-save \ + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/singularity + cubids-datalad-save \ /tmp/bids/singularity \ -m 'test save' \ - --container /home/circleci/bond-latest.sif + --container /home/circleci/cubids-latest.sif - run: - name: Test bond-remove-metadata-fields + name: Test cubids-remove-metadata-fields command: | git config --global user.email "circleci@citesting.com" git config --global user.name "CircleCI Test" export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/metatest + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/metatest # Get the original metadata fields - bond-print-metadata-fields \ + cubids-print-metadata-fields \ /tmp/bids/metatest \ - --container /home/circleci/bond-latest.sif > /tmp/origmd.txt + --container /home/circleci/cubids-latest.sif > /tmp/origmd.txt # Remove some fields - bond-remove-metadata-fields \ + cubids-remove-metadata-fields \ /tmp/bids/metatest \ - --container /home/circleci/bond-latest.sif \ + --container /home/circleci/cubids-latest.sif \ --fields DeviceSerialNumber AcquisitionTime \ InstitutionAddress InstitutionName \ StationName NotARealField > /tmp/removedmd.txt @@ -269,10 +269,10 @@ jobs: install_and_test: machine: image: ubuntu-1604:202004-01 - working_directory: /home/circleci/src/BOnD + working_directory: /home/circleci/src/CuBIDS steps: - checkout: - path: /home/circleci/src/BOnD + path: /home/circleci/src/CuBIDS - attach_workspace: at: /tmp @@ -294,10 +294,10 @@ jobs: fi - run: - name: Install BOnD + name: Install CuBIDS command: | export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids pip install .[all] py.test -sv tests @@ -307,13 +307,13 @@ jobs: git config --global user.email "circleci@citesting.com" git config --global user.name "CircleCI Test" export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids /tmp/validate_testing - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/docker-validate - bond-validate \ + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/docker-validate + cubids-validate \ /tmp/bids/docker-validate \ /tmp/validate_testing/docker \ - --container pennlinc/bond:latest + --container pennlinc/cubids:latest - run: name: Test Docker group @@ -321,13 +321,13 @@ jobs: git config --global user.email "circleci@citesting.com" git config --global user.name "CircleCI Test" export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids /tmp/group_testing - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/docker-group - bond-group \ + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/docker-group + cubids-group \ /tmp/bids/docker-group \ /tmp/group_testing/docker \ - --container pennlinc/bond:latest + --container pennlinc/cubids:latest - run: name: Test Docker save @@ -335,30 +335,30 @@ jobs: git config --global user.email "circleci@citesting.com" git config --global user.name "CircleCI Test" export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/docker-save - bond-datalad-save \ + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/docker-save + cubids-datalad-save \ /tmp/bids/docker-save \ -m 'test docker save!' \ - --container pennlinc/bond:latest + --container pennlinc/cubids:latest - run: - name: Test bond-remove-metadata-fields + name: Test cubids-remove-metadata-fields command: | export PATH=/tmp/miniconda/bin:$PATH - source activate bond + source activate cubids mkdir -p /tmp/bids - cp -r /home/circleci/src/BOnD/bond/testdata/complete /tmp/bids/metatest + cp -r /home/circleci/src/CuBIDS/cubids/testdata/complete /tmp/bids/metatest # Get the original metadata fields - bond-print-metadata-fields \ + cubids-print-metadata-fields \ /tmp/bids/metatest \ - --container pennlinc/bond:latest > /tmp/origmd.txt + --container pennlinc/cubids:latest > /tmp/origmd.txt # Remove some fields - bond-remove-metadata-fields \ + cubids-remove-metadata-fields \ /tmp/bids/metatest \ - --container pennlinc/bond:latest \ + --container pennlinc/cubids:latest \ --fields DeviceSerialNumber AcquisitionTime \ InstitutionAddress InstitutionName \ StationName NotARealField > /tmp/removedmd.txt @@ -370,7 +370,7 @@ jobs: build_docs: docker: - image: circleci/python:3.7.4 - working_directory: /tmp/src/BOnD + working_directory: /tmp/src/CuBIDS steps: - checkout - run: @@ -391,10 +391,10 @@ jobs: - run: name: Lint code with flake8 command: | - flake8 bond + flake8 cubids - run: - name: Install BOnD. + name: Install CuBIDS. command: sudo python -m pip install ".[doc]" --no-cache-dir --progress-bar off - run: @@ -403,19 +403,19 @@ jobs: command: | make SPHINXOPTS="-W" -C docs html - store_artifacts: - path: /tmp/src/BOnD/docs/_build/html + path: /tmp/src/CuBIDS/docs/_build/html deploy_docker: machine: image: circleci/classic:201711-01 - working_directory: /tmp/src/BOnD + working_directory: /tmp/src/CuBIDS steps: - checkout: - path: /home/circleci/src/BOnD + path: /home/circleci/src/CuBIDS - run: name: Check whether build should be skipped command: | - cd /home/circleci/src/BOnD + cd /home/circleci/src/CuBIDS if [[ "$( git log --format='format:%s' -n 1 $CIRCLE_SHA1 | grep -i -E '^docs?(\(\w+\))?:' )" != "" ]]; then echo "Only docs build" circleci step halt @@ -440,23 +440,23 @@ jobs: command: | if [[ -n "$DOCKER_PASS" ]]; then docker login -u $DOCKER_USER -p $DOCKER_PASS - docker tag pennlinc/BOnD pennlinc/BOnD:unstable - docker push pennlinc/BOnD:unstable + docker tag pennlinc/CuBIDS pennlinc/CuBIDS:unstable + docker push pennlinc/CuBIDS:unstable if [[ -n "$CIRCLE_TAG" ]]; then - docker push pennlinc/BOnD:latest - docker tag pennlinc/BOnD pennlinc/BOnD:$CIRCLE_TAG - docker push pennlinc/BOnD:$CIRCLE_TAG + docker push pennlinc/CuBIDS:latest + docker tag pennlinc/CuBIDS pennlinc/CuBIDS:$CIRCLE_TAG + docker push pennlinc/CuBIDS:$CIRCLE_TAG fi fi # test_deploy_pypi: # docker: # - image: circleci/python:3.7.4 -# working_directory: /tmp/src/BOnD +# working_directory: /tmp/src/CuBIDS # steps: # - checkout # - run: -# name: Build BOnD +# name: Build CuBIDS # command: | # pip install --user twine # For use in checking distributions # THISVERSION=$( python3 get_version.py ) @@ -465,26 +465,26 @@ jobs: # virtualenv --python=python build # source build/bin/activate # pip install --upgrade "pip>=19.1" numpy -# echo "${CIRCLE_TAG:-$THISVERSION}" > BOnD/VERSION +# echo "${CIRCLE_TAG:-$THISVERSION}" > CuBIDS/VERSION # python setup.py sdist # pip wheel --no-deps -w dist/ . # - store_artifacts: -# path: /tmp/src/BOnD/dist +# path: /tmp/src/CuBIDS/dist # - run: # name: Check sdist distribution # command: | # THISVERSION=$( python get_version.py ) # THISVERSION=${THISVERSION%.dirty*} # THISVERSION=${CIRCLE_TAG:-$THISVERSION} -# twine check dist/BOnD*.tar.gz +# twine check dist/CuBIDS*.tar.gz # virtualenv --python=python sdist # source sdist/bin/activate # pip install --progress-bar off --upgrade "pip>=19.1" numpy -# pip install dist/BOnD*.tar.gz -# which BOnD | grep sdist\\/bin -# INSTALLED_VERSION=$(BOnD --version) +# pip install dist/CuBIDS*.tar.gz +# which CuBIDS | grep sdist\\/bin +# INSTALLED_VERSION=$(CuBIDS --version) # INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'} -# INSTALLED_VERSION=${INSTALLED_VERSION#*"BOnD v"} +# INSTALLED_VERSION=${INSTALLED_VERSION#*"CuBIDS v"} # echo "VERSION: \"$THISVERSION\"" # echo "INSTALLED: \"$INSTALLED_VERSION\"" # test "$INSTALLED_VERSION" = "$THISVERSION" @@ -494,19 +494,19 @@ jobs: # THISVERSION=$( python get_version.py ) # THISVERSION=${THISVERSION%.dirty*} # THISVERSION=${CIRCLE_TAG:-$THISVERSION} -# twine check dist/BOnD*.whl +# twine check dist/CuBIDS*.whl # virtualenv --python=python wheel # source wheel/bin/activate -# pip install dist/BOnD*.whl -# which BOnD | grep wheel\\/bin -# INSTALLED_VERSION=$(BOnD --version) +# pip install dist/CuBIDS*.whl +# which CuBIDS | grep wheel\\/bin +# INSTALLED_VERSION=$(CuBIDS --version) # INSTALLED_VERSION=${INSTALLED_VERSION%$'\r'} -# INSTALLED_VERSION=${INSTALLED_VERSION#*"BOnD v"} +# INSTALLED_VERSION=${INSTALLED_VERSION#*"CuBIDS v"} # echo "VERSION: \"$THISVERSION\"" # echo "INSTALLED: \"$INSTALLED_VERSION\"" # test "$INSTALLED_VERSION" = "$THISVERSION" # - run: -# name: Build BOnD-container +# name: Build CuBIDS-container # command: | # THISVERSION=$( python get_version.py ) # THISVERSION=${THISVERSION%.dirty*} @@ -518,26 +518,26 @@ jobs: # python setup.py sdist # pip wheel --no-deps -w dist/ . # - store_artifacts: -# path: /tmp/src/BOnD/wrapper/dist +# path: /tmp/src/CuBIDS/wrapper/dist # deploy_pypi: # docker: # - image: circleci/python:3.7.4 -# working_directory: /tmp/src/BOnD +# working_directory: /tmp/src/CuBIDS # steps: # - checkout # - run: -# name: Build BOnD +# name: Build CuBIDS # command: | # THISVERSION=$( python get_version.py ) # virtualenv --python=python build # source build/bin/activate # pip install --upgrade "pip>=19.1" numpy -# echo "${CIRCLE_TAG:-$THISVERSION}" > BOnD/VERSION +# echo "${CIRCLE_TAG:-$THISVERSION}" > CuBIDS/VERSION # python setup.py sdist # pip wheel --no-deps -w dist/ . # - run: -# name: Build BOnD-container +# name: Build CuBIDS-container # command: | # THISVERSION=$( python get_version.py ) # cd wrapper @@ -552,7 +552,7 @@ jobs: # command: | # pip install --user twine # pip install --user --upgrade importlib-metadata -# twine upload dist/BOnD*gz wrapper/dist/BOnD* +# twine upload dist/CuBIDS*gz wrapper/dist/CuBIDS* deployable: docker: diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 87fce54ff..9187e0e93 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -15,7 +15,7 @@ Types of Contributions Report Bugs ~~~~~~~~~~~ -Report bugs at https://github.com/PennLINC/bond/issues. +Report bugs at https://github.com/PennLINC/cubids/issues. If you are reporting a bug, please include: @@ -38,14 +38,14 @@ and "help wanted" is open to whoever wants to implement it. Write Documentation ~~~~~~~~~~~~~~~~~~~ -BOnD could always use more documentation, whether as part of the -official BOnD docs, in docstrings, or even on the web in blog posts, +CuBIDS could always use more documentation, whether as part of the +official CuBIDS docs, in docstrings, or even on the web in blog posts, articles, and such. Submit Feedback ~~~~~~~~~~~~~~~ -The best way to send feedback is to file an issue at https://github.com/PennLINC/bond/issues. +The best way to send feedback is to file an issue at https://github.com/PennLINC/cubids/issues. If you are proposing a feature: @@ -57,17 +57,17 @@ If you are proposing a feature: Get Started! ------------ -Ready to contribute? Here's how to set up `bond` for local development. +Ready to contribute? Here's how to set up `cubids` for local development. -1. Fork the `bond` repo on GitHub. +1. Fork the `cubids` repo on GitHub. 2. Clone your fork locally:: - $ git clone git@github.com:your_name_here/bond.git + $ git clone git@github.com:your_name_here/cubids.git 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:: - $ mkvirtualenv bond - $ cd bond/ + $ mkvirtualenv cubids + $ cd cubids/ $ python setup.py develop 4. Create a branch for local development:: @@ -79,7 +79,7 @@ Ready to contribute? Here's how to set up `bond` for local development. 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:: - $ flake8 bond tests + $ flake8 cubids tests $ python setup.py test or pytest $ tox @@ -103,7 +103,7 @@ Before you submit a pull request, check that it meets these guidelines: your new functionality into a function with a docstring, and add the feature to the list in README.rst. 3. The pull request should work for Python 3.5, 3.6, 3.7 and 3.8, and for PyPy. Check - https://travis-ci.com/PennLINC/bond/pull_requests + https://travis-ci.com/PennLINC/cubids/pull_requests and make sure that the tests pass for all supported Python versions. Tips @@ -111,7 +111,7 @@ Tips To run a subset of tests:: -$ pytest tests.test_bond +$ pytest tests.test_cubids Deploying diff --git a/Dockerfile b/Dockerfile index 570e64ae5..8bea5473b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -37,7 +37,7 @@ RUN npm install -g yarn && \ # yarn && \ # cd bids-validator && npm install -g -COPY . /src/BOnD -RUN pip3 install --no-cache-dir "/src/BOnD" +COPY . /src/CuBIDS +RUN pip3 install --no-cache-dir "/src/CuBIDS" ENTRYPOINT [ "/bin/bash"] diff --git a/MANIFEST.in b/MANIFEST.in index 99318bc82..be20321a1 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -5,7 +5,7 @@ include LICENSE include README.rst recursive-include tests * -recursive-include bond/testdata * +recursive-include cubids/testdata * recursive-exclude * __pycache__ recursive-exclude * *.py[co] diff --git a/Makefile b/Makefile index 245d0ae5d..b0842bb85 100644 --- a/Makefile +++ b/Makefile @@ -48,7 +48,7 @@ clean-test: ## remove test and coverage artifacts rm -fr .pytest_cache lint: ## check style with flake8 - flake8 bond tests + flake8 cubids tests test: ## run tests quickly with the default Python pytest @@ -57,15 +57,15 @@ test-all: ## run tests on every Python version with tox tox coverage: ## check code coverage quickly with the default Python - coverage run --source bond -m pytest + coverage run --source cubids -m pytest coverage report -m coverage html $(BROWSER) htmlcov/index.html docs: ## generate Sphinx HTML documentation, including API docs - rm -f docs/bond.rst + rm -f docs/cubids.rst rm -f docs/modules.rst - sphinx-apidoc -o docs/ bond + sphinx-apidoc -o docs/ cubids $(MAKE) -C docs clean $(MAKE) -C docs html $(BROWSER) docs/_build/html/index.html diff --git a/README.rst b/README.rst index ef23c601c..7c6b9e07f 100644 --- a/README.rst +++ b/README.rst @@ -1,19 +1,19 @@ ================== -BOnD: BIDS On Disk +CuBIDS: BIDS On Disk ================== -.. image:: https://img.shields.io/pypi/v/bond.svg - :target: https://pypi.python.org/pypi/bond +.. image:: https://img.shields.io/pypi/v/cubids.svg + :target: https://pypi.python.org/pypi/cubids -.. image:: https://img.shields.io/travis/PennLINC/bond.svg - :target: https://travis-ci.com/PennLINC/bond +.. image:: https://img.shields.io/travis/PennLINC/cubids.svg + :target: https://travis-ci.com/PennLINC/cubids -.. image:: https://readthedocs.org/projects/bond/badge/?version=latest - :target: https://bond.readthedocs.io/en/latest/?badge=latest +.. image:: https://readthedocs.org/projects/cubids/badge/?version=latest + :target: https://cubids.readthedocs.io/en/latest/?badge=latest :alt: Documentation Status -``BOnD`` is designed to facilitate the curation and sanity-checking of BIDS +``CuBIDS`` is designed to facilitate the curation and sanity-checking of BIDS datasets that live on a hard drive. Its has many functions that help curators follow the Three Steps of Curation. These steps are @@ -26,5 +26,5 @@ follow the Three Steps of Curation. These steps are Step 1: Ensure the data is valid BIDS ------------------------------------- -The BOnD class has a call to a containerized version of the BIDS Validator. The +The CuBIDS class has a call to a containerized version of the BIDS Validator. The output of the BIDS validator is collected and converted to a convenient Python object. diff --git a/bond/__init__.py b/cubids/__init__.py similarity index 57% rename from bond/__init__.py rename to cubids/__init__.py index ef54e9e16..a46eef713 100644 --- a/bond/__init__.py +++ b/cubids/__init__.py @@ -1,7 +1,7 @@ -"""Top-level package for BOnD.""" +"""Top-level package for CuBIDS.""" __author__ = """PennLINC""" __email__ = 'PennLINC@gmail.com' __version__ = '0.1.0' -from .bond import BOnD +from .cubids import CuBIDS diff --git a/bond/cli.py b/cubids/cli.py similarity index 91% rename from bond/cli.py rename to cubids/cli.py index 29731592c..74c086371 100644 --- a/bond/cli.py +++ b/cubids/cli.py @@ -1,4 +1,4 @@ -"""Console script for bond.""" +"""Console script for cubids.""" import argparse import subprocess import os @@ -9,7 +9,7 @@ import tqdm import shutil import pandas as pd -from bond import BOnD +from cubids import CuBIDS from pathlib import Path from .validator import (build_validator_call, run_validator, parse_validator_output, @@ -17,15 +17,15 @@ from .metadata_merge import merge_json_into_json logging.basicConfig(level=logging.INFO) -logger = logging.getLogger('bond-cli') +logger = logging.getLogger('cubids-cli') GIT_CONFIG = os.path.join(os.path.expanduser("~"), '.gitconfig') -def bond_validate(): +def cubids_validate(): '''Command Line Interface function for running the bids validator.''' parser = argparse.ArgumentParser( - description="bond-validate: Wrapper around the official " + description="cubids-validate: Wrapper around the official " "BIDS Validator", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', @@ -191,7 +191,7 @@ def bond_validate(): if container_type == 'docker': cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, '-v', GIT_CONFIG+":/root/.gitconfig", - '-v', output_dir_link, '--entrypoint', 'bond-validate', + '-v', output_dir_link, '--entrypoint', 'cubids-validate', opts.container, '/bids', linked_output_prefix] if opts.ignore_nifti_headers: cmd.append('--ignore_nifti_headers') @@ -200,7 +200,7 @@ def bond_validate(): elif container_type == 'singularity': cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, - '-B', output_dir_link, opts.container, 'bond-validate', + '-B', output_dir_link, opts.container, 'cubids-validate', '/bids', linked_output_prefix] if opts.ignore_nifti_headers: cmd.append('--ignore_nifti_headers') @@ -234,11 +234,11 @@ def bids_sidecar_merge(): sys.exit(merge_status) -def bond_group(): +def cubids_group(): '''Command Line Interface function for finding key and param groups.''' parser = argparse.ArgumentParser( - description="bond-group: find key and parameter groups in BIDS", + description="cubids-group: find key and parameter groups in BIDS", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', type=Path, @@ -270,7 +270,7 @@ def bond_group(): # Run directly from python using if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad, acq_group_level=opts.acq_group_level, grouping_config=opts.config) @@ -295,7 +295,7 @@ def bond_group(): cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, '-v', GIT_CONFIG+":/root/.gitconfig", '-v', output_dir_link, - '--entrypoint', 'bond-group', + '--entrypoint', 'cubids-group', opts.container, '/bids', linked_output_prefix] if apply_config: cmd.insert(3, '-v') @@ -306,7 +306,7 @@ def bond_group(): cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, '-B', output_dir_link, - opts.container, 'bond-group', + opts.container, 'cubids-group', '/bids', linked_output_prefix] if apply_config: cmd.insert(3, '-B') @@ -325,11 +325,11 @@ def bond_group(): sys.exit(proc.returncode) -def bond_apply(): +def cubids_apply(): ''' Command Line Interface funciton for applying the csv changes.''' parser = argparse.ArgumentParser( - description="bond-apply: apply the changes specified in a csv " + description="cubids-apply: apply the changes specified in a csv " "to a BIDS directory", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', @@ -372,7 +372,7 @@ def bond_apply(): # Run directly from python using if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad, acq_group_level=opts.acq_group_level, grouping_config=opts.config) @@ -417,7 +417,7 @@ def bond_apply(): '-v', input_summary_csv_dir_link, '-v', input_files_csv_dir_link, '-v', output_csv_dir_link, - '--entrypoint', 'bond-apply', + '--entrypoint', 'cubids-apply', opts.container, '/bids', linked_input_summary_csv, linked_input_files_csv, linked_output_prefix] if apply_config: @@ -431,7 +431,7 @@ def bond_apply(): '-B', input_summary_csv_dir_link, '-B', input_files_csv_dir_link, '-B', output_csv_dir_link, - opts.container, 'bond-apply', + opts.container, 'cubids-apply', '/bids', linked_input_summary_csv, linked_input_files_csv, linked_output_prefix] if apply_config: @@ -451,11 +451,11 @@ def bond_apply(): sys.exit(proc.returncode) -def bond_datalad_save(): +def cubids_datalad_save(): ''' Command Line Interfcae function for performing datalad save.''' parser = argparse.ArgumentParser( - description="bond-datalad-save: perform a DataLad save on a BIDS " + description="cubids-datalad-save: perform a DataLad save on a BIDS " "directory", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', @@ -473,7 +473,7 @@ def bond_datalad_save(): # Run directly from python using if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), use_datalad=True) + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=True) bod.datalad_save(message=opts.m) sys.exit(0) @@ -483,23 +483,23 @@ def bond_datalad_save(): if container_type == 'docker': cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, '-v', GIT_CONFIG+":/root/.gitconfig", - '--entrypoint', 'bond-datalad-save', + '--entrypoint', 'cubids-datalad-save', opts.container, '/bids', '-m', opts.m] elif container_type == 'singularity': cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, - opts.container, 'bond-datalad-save', + opts.container, 'cubids-datalad-save', '/bids', '-m', opts.m] print("RUNNING: " + ' '.join(cmd)) proc = subprocess.run(cmd) sys.exit(proc.returncode) -def bond_undo(): +def cubids_undo(): ''' Command Line Interface function for reverting a commit.''' parser = argparse.ArgumentParser( - description="bond-undo: revert most recent commit", + description="cubids-undo: revert most recent commit", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', type=Path, @@ -513,7 +513,7 @@ def bond_undo(): # Run directly from python using if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), use_datalad=True) + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=True) bod.datalad_undo_last_commit() sys.exit(0) @@ -523,22 +523,22 @@ def bond_undo(): if container_type == 'docker': cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, '-v', GIT_CONFIG+":/root/.gitconfig", - '--entrypoint', 'bond-undo', + '--entrypoint', 'cubids-undo', opts.container, '/bids'] elif container_type == 'singularity': cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, - opts.container, 'bond-undo', '/bids'] + opts.container, 'cubids-undo', '/bids'] print("RUNNING: " + ' '.join(cmd)) proc = subprocess.run(cmd) sys.exit(proc.returncode) -def bond_copy_exemplars(): +def cubids_copy_exemplars(): ''' Command Line Interface function for purging scan associations.''' parser = argparse.ArgumentParser( - description="bond-copy-exemplars: create and save a directory with " + description="cubids-copy-exemplars: create and save a directory with " " one subject from each Acquisition Group in the BIDS dataset", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', @@ -559,7 +559,7 @@ def bond_copy_exemplars(): action='store', help='absolute path to the .csv file that lists one ' 'subject from each Acqusition Group ' - '(*_AcqGrouping.csv from the bond-group output)') + '(*_AcqGrouping.csv from the cubids-group output)') parser.add_argument('--use-datalad', action='store_true', help='ensure that there are no untracked changes ' @@ -576,7 +576,7 @@ def bond_copy_exemplars(): # Run directly from python using if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad) + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad) if opts.use_datalad: if bod.is_datalad_clean() and not opts.force_unlock: raise Exception("Need to unlock " + str(opts.bids_dir)) @@ -594,7 +594,7 @@ def bond_copy_exemplars(): cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, '-v', exemplars_dir_link, '-v', GIT_CONFIG+":/root/.gitconfig", - '-v', exemplars_csv_link, '--entrypoint', 'bond-copy-exemplars', + '-v', exemplars_csv_link, '--entrypoint', 'cubids-copy-exemplars', opts.container, '/bids', '/exemplars', '/in_csv'] if opts.force_unlock: @@ -603,7 +603,7 @@ def bond_copy_exemplars(): cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, '-B', exemplars_dir_link, - '-B', exemplars_csv_link, opts.container, 'bond-copy-exemplars', + '-B', exemplars_csv_link, opts.container, 'cubids-copy-exemplars', '/bids', '/exemplars', '/in_csv'] if opts.force_unlock: cmd.append('--force-unlock') @@ -613,11 +613,11 @@ def bond_copy_exemplars(): sys.exit(proc.returncode) -def bond_add_nifti_info(): +def cubids_add_nifti_info(): ''' Command Line Interface function for purging scan associations.''' parser = argparse.ArgumentParser( - description="bond-add-nifti-info: Add information from nifti" + description="cubids-add-nifti-info: Add information from nifti" "files to the sidecars of each dataset", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', @@ -642,7 +642,7 @@ def bond_add_nifti_info(): # Run directly from python using if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad) + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad) if opts.use_datalad: if bod.is_datalad_clean() and not opts.force_unlock: raise Exception("Need to unlock " + str(opts.bids_dir)) @@ -655,7 +655,7 @@ def bond_add_nifti_info(): if container_type == 'docker': cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, '-v', GIT_CONFIG+":/root/.gitconfig", - '--entrypoint', 'bond-add-nifti-info', + '--entrypoint', 'cubids-add-nifti-info', opts.container, '/bids'] if opts.force_unlock: @@ -663,7 +663,7 @@ def bond_add_nifti_info(): elif container_type == 'singularity': cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, - opts.container, 'bond-add-nifti-info', + opts.container, 'cubids-add-nifti-info', '/bids'] if opts.force_unlock: cmd.append('--force-unlock') @@ -673,11 +673,11 @@ def bond_add_nifti_info(): sys.exit(proc.returncode) -def bond_purge(): +def cubids_purge(): ''' Command Line Interface function for purging scan associations.''' parser = argparse.ArgumentParser( - description="bond-purge: purge associations from the dataset", + description="cubids-purge: purge associations from the dataset", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', type=Path, @@ -701,7 +701,7 @@ def bond_purge(): # Run directly from python using if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad) + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=opts.use_datalad) if opts.use_datalad: if not bod.is_datalad_clean(): raise Exception("Untracked change in " + str(opts.bids_dir)) @@ -718,14 +718,14 @@ def bond_purge(): '-v', bids_dir_link, '-v', GIT_CONFIG+":/root/.gitconfig", '-v', input_scans_link, - '--entrypoint', 'bond-purge', + '--entrypoint', 'cubids-purge', opts.container, '/bids', input_scans_link] elif container_type == 'singularity': cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, '-B', input_scans_link, - opts.container, 'bond-purge', + opts.container, 'cubids-purge', '/bids', input_scans_link] print("RUNNING: " + ' '.join(cmd)) if opts.use_datalad: @@ -734,11 +734,11 @@ def bond_purge(): sys.exit(proc.returncode) -def bond_remove_metadata_fields(): +def cubids_remove_metadata_fields(): ''' Command Line Interface function for deteling fields from metadata.''' parser = argparse.ArgumentParser( - description="bond-remove-metadata-fields: delete fields from " + description="cubids-remove-metadata-fields: delete fields from " "metadata", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', @@ -759,7 +759,7 @@ def bond_remove_metadata_fields(): # Run directly from python if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), use_datalad=False) + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=False) bod.remove_metadata_fields(opts.fields) sys.exit(0) @@ -768,23 +768,23 @@ def bond_remove_metadata_fields(): bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids:rw" if container_type == 'docker': cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, - '--entrypoint', 'bond-remove-metadata-fields', + '--entrypoint', 'cubids-remove-metadata-fields', opts.container, '/bids', '--fields'] + opts.fields elif container_type == 'singularity': cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, - opts.container, 'bond-remove-metadata-fields', + opts.container, 'cubids-remove-metadata-fields', '/bids', '--fields'] + opts.fields print("RUNNING: " + ' '.join(cmd)) proc = subprocess.run(cmd) sys.exit(proc.returncode) -def bond_print_metadata_fields(): +def cubids_print_metadata_fields(): '''Command Line Interface function that prints unique metadata fields.''' parser = argparse.ArgumentParser( - description="bond-print-metadata-fields: print all unique " + description="cubids-print-metadata-fields: print all unique " "metadata fields", formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('bids_dir', @@ -799,7 +799,7 @@ def bond_print_metadata_fields(): # Run directly from python if opts.container is None: - bod = BOnD(data_root=str(opts.bids_dir), use_datalad=False) + bod = CuBIDS(data_root=str(opts.bids_dir), use_datalad=False) fields = bod.get_all_metadata_fields() print("\n".join(fields)) sys.exit(0) @@ -809,12 +809,12 @@ def bond_print_metadata_fields(): bids_dir_link = str(opts.bids_dir.absolute()) + ":/bids:ro" if container_type == 'docker': cmd = ['docker', 'run', '--rm', '-v', bids_dir_link, - '--entrypoint', 'bond-print-metadata-fields', + '--entrypoint', 'cubids-print-metadata-fields', opts.container, '/bids'] elif container_type == 'singularity': cmd = ['singularity', 'exec', '--cleanenv', '-B', bids_dir_link, - opts.container, 'bond-print-metadata-fields', + opts.container, 'cubids-print-metadata-fields', '/bids'] print("RUNNING: " + ' '.join(cmd)) proc = subprocess.run(cmd) diff --git a/bond/config.py b/cubids/config.py similarity index 85% rename from bond/config.py rename to cubids/config.py index 72e558cbc..377bd9352 100644 --- a/bond/config.py +++ b/cubids/config.py @@ -12,7 +12,7 @@ def load_config(config_file): """ if config_file is None: - config_file = Path(pkgrf("bond", "data/config.yml")) + config_file = Path(pkgrf("cubids", "data/config.yml")) with config_file.open() as f: config = yaml.safe_load(f) diff --git a/bond/constants.py b/cubids/constants.py similarity index 100% rename from bond/constants.py rename to cubids/constants.py diff --git a/bond/bond.py b/cubids/cubids.py similarity index 99% rename from bond/bond.py rename to cubids/cubids.py index aa17fb7c4..74493adc1 100644 --- a/bond/bond.py +++ b/cubids/cubids.py @@ -23,7 +23,7 @@ bids.config.set_option('extension_initial_dot', True) -class BOnD(object): +class CuBIDS(object): def __init__(self, data_root, use_datalad=False, acq_group_level='subject', grouping_config=None): @@ -88,7 +88,7 @@ def datalad_save(self, message=None): if not self.datalad_ready: raise Exception( "DataLad has not been initialized. use datalad_init()") - statuses = self.datalad_handle.save(message=message or "BOnD Save") + statuses = self.datalad_handle.save(message=message or "CuBIDS Save") saved_status = set([status['status'] for status in statuses]) if not saved_status == set(["ok"]): raise Exception("Failed to save in DataLad") @@ -484,7 +484,7 @@ def copy_exemplars(self, exemplars_dir, exemplars_csv, force_unlock, exemplars_csv: str path to the .csv file that lists one subject from each Acqusition Group (*_AcqGrouping.csv - from the bond-group output) + from the cubids-group output) example path: /Users/Covitz/CSVs/CCNP_Acq_Grouping.csv """ @@ -640,7 +640,7 @@ def _cache_fieldmaps(self): Returns: ----------- misfits : list - A list of fmap filenames for whom BOnD has not detected + A list of fmap filenames for whom CuBIDS has not detected an IntnededFor. """ diff --git a/bond/data/config.yml b/cubids/data/config.yml similarity index 100% rename from bond/data/config.yml rename to cubids/data/config.yml diff --git a/bond/metadata_merge.py b/cubids/metadata_merge.py similarity index 100% rename from bond/metadata_merge.py rename to cubids/metadata_merge.py diff --git a/bond/testdata/complete/README b/cubids/testdata/complete/README similarity index 100% rename from bond/testdata/complete/README rename to cubids/testdata/complete/README diff --git a/bond/testdata/complete/dataset_description.json b/cubids/testdata/complete/dataset_description.json similarity index 100% rename from bond/testdata/complete/dataset_description.json rename to cubids/testdata/complete/dataset_description.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json b/cubids/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json rename to cubids/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz b/cubids/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz rename to cubids/testdata/complete/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz diff --git a/bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval b/cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval rename to cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval diff --git a/bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec b/cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec rename to cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec diff --git a/bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json b/cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json rename to cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz rename to cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz b/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz rename to cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz diff --git a/bond/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json b/cubids/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json rename to cubids/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json diff --git a/bond/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz b/cubids/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz similarity index 100% rename from bond/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz rename to cubids/testdata/complete/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz diff --git a/bond/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json b/cubids/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json rename to cubids/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json diff --git a/bond/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz b/cubids/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz rename to cubids/testdata/complete/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz diff --git a/bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval b/cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval rename to cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval diff --git a/bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec b/cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec rename to cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec diff --git a/bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json b/cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json rename to cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json diff --git a/bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz rename to cubids/testdata/complete/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json diff --git a/bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz b/cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz rename to cubids/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz diff --git a/bond/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json b/cubids/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json rename to cubids/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json diff --git a/bond/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz b/cubids/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz similarity index 100% rename from bond/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz rename to cubids/testdata/complete/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz diff --git a/bond/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json b/cubids/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json rename to cubids/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json diff --git a/bond/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz b/cubids/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz rename to cubids/testdata/complete/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz diff --git a/bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval b/cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval rename to cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval diff --git a/bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec b/cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec rename to cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec diff --git a/bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json b/cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json rename to cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json diff --git a/bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz rename to cubids/testdata/complete/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json diff --git a/bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz b/cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz rename to cubids/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz diff --git a/bond/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json b/cubids/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json rename to cubids/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json diff --git a/bond/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz b/cubids/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz similarity index 100% rename from bond/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz rename to cubids/testdata/complete/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz diff --git a/bond/testdata/inconsistent/README b/cubids/testdata/inconsistent/README similarity index 100% rename from bond/testdata/inconsistent/README rename to cubids/testdata/inconsistent/README diff --git a/bond/testdata/inconsistent/dataset_description.json b/cubids/testdata/inconsistent/dataset_description.json similarity index 100% rename from bond/testdata/inconsistent/dataset_description.json rename to cubids/testdata/inconsistent/dataset_description.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json b/cubids/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz b/cubids/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/anat/sub-01_ses-phdiff_T1w.nii.gz diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval b/cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bval diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec b/cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.bvec diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json b/cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.nii.gz diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.nii.gz diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.nii.gz diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz b/cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.nii.gz diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json b/cubids/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.json diff --git a/bond/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz b/cubids/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz rename to cubids/testdata/inconsistent/sub-01/ses-phdiff/func/sub-01_ses-phdiff_task-rest_bold.nii.gz diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json b/cubids/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.json diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz b/cubids/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/anat/sub-02_ses-phdiff_T1w.nii.gz diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval b/cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bval diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec b/cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.bvec diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json b/cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.json diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/dwi/sub-02_ses-phdiff_acq-HASC55AP_dwi.nii.gz diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.nii.gz diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.nii.gz diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz b/cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.nii.gz diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json b/cubids/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.json diff --git a/bond/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz b/cubids/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz rename to cubids/testdata/inconsistent/sub-02/ses-phdiff/func/sub-02_ses-phdiff_task-rest_bold.nii.gz diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json b/cubids/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.json diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz b/cubids/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/anat/sub-03_ses-phdiff_T1w.nii.gz diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval b/cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bval diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec b/cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.bvec diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json b/cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.json diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz b/cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/dwi/sub-03_ses-phdiff_acq-HASC55AP_dwi.nii.gz diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.nii.gz diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.nii.gz diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz b/cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.nii.gz diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json b/cubids/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.json diff --git a/bond/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz b/cubids/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz similarity index 100% rename from bond/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz rename to cubids/testdata/inconsistent/sub-03/ses-phdiff/func/sub-03_ses-phdiff_task-rest_bold.nii.gz diff --git a/bond/validator.py b/cubids/validator.py similarity index 98% rename from bond/validator.py rename to cubids/validator.py index ee8b0e543..cf1fee7ca 100644 --- a/bond/validator.py +++ b/cubids/validator.py @@ -6,7 +6,7 @@ import pathlib import pandas as pd -logger = logging.getLogger('bond-cli') +logger = logging.getLogger('cubids-cli') def build_validator_call(path, ignore_headers=False, ignore_subject=True): diff --git a/docs/Makefile b/docs/Makefile index eb72bad08..b32a31fcb 100644 --- a/docs/Makefile +++ b/docs/Makefile @@ -4,7 +4,7 @@ # You can set these variables from the command line. SPHINXOPTS = SPHINXBUILD = python -msphinx -SPHINXPROJ = bond +SPHINXPROJ = cubids SOURCEDIR = . BUILDDIR = _build diff --git a/docs/conf.py b/docs/conf.py index eee6b79c9..fe1d08ad2 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# bond documentation build configuration file, created by +# cubids documentation build configuration file, created by # sphinx-quickstart on Fri Jun 9 13:47:02 2017. # # This file is execfile()d with the current directory set to its @@ -21,7 +21,7 @@ import sys sys.path.insert(0, os.path.abspath('..')) -import bond +import cubids # -- General configuration --------------------------------------------- @@ -46,7 +46,7 @@ master_doc = 'index' # General information about the project. -project = 'BOnD' +project = 'CuBIDS' copyright = "2020, PennLINC" author = "PennLINC" @@ -55,9 +55,9 @@ # the built documents. # # The short X.Y version. -version = bond.__version__ +version = cubids.__version__ # The full version, including alpha/beta/rc tags. -release = bond.__version__ +release = cubids.__version__ # The language for content autogenerated by Sphinx. Refer to documentation # for a list of supported languages. @@ -100,7 +100,7 @@ # -- Options for HTMLHelp output --------------------------------------- # Output file base name for HTML help builder. -htmlhelp_basename = 'bonddoc' +htmlhelp_basename = 'cubidsdoc' # -- Options for LaTeX output ------------------------------------------ @@ -127,8 +127,8 @@ # (source start file, target name, title, author, documentclass # [howto, manual, or own class]). latex_documents = [ - (master_doc, 'bond.tex', - 'BOnD Documentation', + (master_doc, 'cubids.tex', + 'CuBIDS Documentation', 'PennLINC', 'manual'), ] @@ -138,8 +138,8 @@ # One entry per manual page. List of tuples # (source start file, name, description, authors, manual section). man_pages = [ - (master_doc, 'bond', - 'BOnD Documentation', + (master_doc, 'cubids', + 'CuBIDS Documentation', [author], 1) ] @@ -150,10 +150,10 @@ # (source start file, target name, title, author, # dir menu entry, description, category) texinfo_documents = [ - (master_doc, 'bond', - 'BOnD Documentation', + (master_doc, 'cubids', + 'CuBIDS Documentation', author, - 'bond', + 'cubids', 'One line description of project.', 'Miscellaneous'), ] diff --git a/docs/index.rst b/docs/index.rst index 2ae31cb82..fde11d6b1 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -1,4 +1,4 @@ -Welcome to BOnD's documentation! +Welcome to CuBIDS's documentation! ====================================== .. toctree:: diff --git a/docs/installation.rst b/docs/installation.rst index c1d781e96..ceb4d040a 100644 --- a/docs/installation.rst +++ b/docs/installation.rst @@ -8,19 +8,19 @@ Installation From sources ------------ -The sources for BOnD can be downloaded from the `Github repo`_. +The sources for CuBIDS can be downloaded from the `Github repo`_. You can either clone the public repository: .. code-block:: console - $ git clone git://github.com/PennLINC/BOnD + $ git clone git://github.com/PennLINC/CuBIDS Or download the `tarball`_: .. code-block:: console - $ curl -OJL https://github.com/PennLINC/BOnD/tarball/master + $ curl -OJL https://github.com/PennLINC/CuBIDS/tarball/master Once you have a copy of the source, you can install it with: @@ -29,5 +29,5 @@ Once you have a copy of the source, you can install it with: $ python setup.py install -.. _Github repo: https://github.com/PennLINC/BOnD -.. _tarball: https://github.com/PennLINC/BOnD/tarball/master +.. _Github repo: https://github.com/PennLINC/CuBIDS +.. _tarball: https://github.com/PennLINC/CuBIDS/tarball/master diff --git a/docs/make.bat b/docs/make.bat index 23f3b4de2..c34b8306e 100644 --- a/docs/make.bat +++ b/docs/make.bat @@ -9,7 +9,7 @@ if "%SPHINXBUILD%" == "" ( ) set SOURCEDIR=. set BUILDDIR=_build -set SPHINXPROJ=bond +set SPHINXPROJ=cubids if "%1" == "" goto help diff --git a/docs/usage.rst b/docs/usage.rst index 4e8b19ac5..bc4117ef5 100644 --- a/docs/usage.rst +++ b/docs/usage.rst @@ -1,10 +1,10 @@ ============= -BOnD Workflow +CuBIDS Workflow ============= Curating MRI data using BIDS opens up a world of wonderful pipeline tools to automatically and correctly preprocess (or more) your data. This software -is designed to help facilitate the BIDS curation of large, messy data so +is designed to help facilitate the BIDS curation of large, messy data so that you can be confident that your BIDS labels are descriptive and accurate before running pipelines *en masse*. @@ -12,7 +12,7 @@ before running pipelines *en masse*. The big picture --------------- -We find it useful to break up the curation process into 3 stages. These stages are +We find it useful to break up the curation process into 3 stages. These stages are not necessarily linear, but all three must happen before the ultimate goal: running all your data through pipelines. @@ -31,7 +31,7 @@ Definitions Key Group ~~~~~~~~~ -A *Key Group* is a unique set of BIDS key-value pairs exculding identifiers like +A *Key Group* is a unique set of BIDS key-value pairs exculding identifiers like subject and session. For example the files:: bids-root/sub-1/ses-1/func/sub-1_ses-1_acq-mb_dir-PA_task-rest_bold.nii.gz @@ -42,11 +42,11 @@ all share the same Key Group. If these scans were all acquired as a part of the study on the same scanner with exactly the same acquisition parameters, then this naming convention works perfectly. -However, in multi-scanner, multi-site, or long-running studies where acquisition +However, in multi-scanner, multi-site, or long-running studies where acquisition parameters change over time, it's possible that the same Key Group will contain scans that differ in important ways. -``BOnD`` examines all acquisitions within a Key Group to see if there are any images +``CuBIDS`` examines all acquisitions within a Key Group to see if there are any images that differ in a set of important acquisition parameters. The subsets of consistent acquisition parameter sets within a Key Group are called a :ref:`paramgroup`. @@ -71,9 +71,9 @@ command line interface .. code-block:: console - $ bond-group /bids/dir keyparam_original + $ cubids-group /bids/dir keyparam_original -This will produce two csv files prefixed by the second argument to ``bond-group``. +This will produce two csv files prefixed by the second argument to ``cubids-group``. You will find ``keyparam_original_summary.csv`` and ``keyparam_original_files.csv``. These two files are a snapshot of your current BIDS layout. @@ -81,12 +81,12 @@ The ``_summary.csv`` File ~~~~~~~~~~~~~~~~~~~~~~~~~ This file contains all the detected Key Groups and Parameter Groups. It also provides -an opportunity to evaluate your data to decide whether Key Groups should be merged +an opportunity to evaluate your data to decide whether Key Groups should be merged or whether a Parameter Group deserves to have its own Key Group (ie adding a unique identifier to its BIDS name). Here we look at some example Parameter Groups from the first DWI run in the PNC. This -reflects the original data that has been converted to BIDS using a heuristic. It is +reflects the original data that has been converted to BIDS using a heuristic. It is similar to what you will see when you first use this functionality: @@ -119,13 +119,13 @@ Modifying Key and Parameter Group Assignments Sometimes we see that there are important differences in acquisition parameters within a Key Group. If these differences impact how a pipeline will process the data, it makes sense to assign the scans in that Parameter Group to a different Key Group (i.e. assign them a different BIDS name). This can -be accomplished by editing the empty columns in the `_summary.csv` file produced by ``bond-group``. +be accomplished by editing the empty columns in the `_summary.csv` file produced by ``cubids-group``. -Once the columns have been edited you can apply the changes to BIDS data using +Once the columns have been edited you can apply the changes to BIDS data using .. code-block:: console - $ bond-apply /bids/dir keyparam_edited new_keyparam_prefix + $ cubids-apply /bids/dir keyparam_edited new_keyparam_prefix The changes in ``keyparam_edited_summary.csv`` will be applied to the BIDS data in ``/bids/dir`` and the new Key and Parameter groups will be saved to csv files starting with ``new_keyparam_prefix``. @@ -135,7 +135,7 @@ Moving a Parameter Group to a New Key Group ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Continuing with the example data, we see one Parameter group that will have a very different run -through preprocessing: Parameter Group 6. +through preprocessing: Parameter Group 6. .. csv-table:: Assign a New Key Group @@ -157,7 +157,7 @@ that value. After being applied, there will be new Key Groups and Parameter Grou .. csv-table:: New Key Group Assigned :align: center :header: "Rename KeyGroup","Merge Into","KeyGroup","Param Group",Counts,"Fieldmap Key00","N Slice Times","Repetition Time" - + ,,datatype-dwi_run-1_suffix-dwi,1,1361,datatype-fmap_fmap-phase1_suffix-phase1,70,8.1 ,,datatype-dwi_run-1_suffix-dwi,2,1,datatype-fmap_fmap-phase1_suffix-phase1,70,8.4 ,,datatype-dwi_run-1_suffix-dwi,3,15,datatype-fmap_fmap-phasediff_suffix-phasediff,70,8.1 @@ -173,9 +173,9 @@ correction applied. Dealing with Aberrant Parameter Groups ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -Mistakes can happen when scanning and sometimes you will find some scans with different parameters +Mistakes can happen when scanning and sometimes you will find some scans with different parameters that you will not want to include in your study. Other times there will be an insignificant difference -where some data is missing from a Parameter Group and you'd like to copy the metadata from another +where some data is missing from a Parameter Group and you'd like to copy the metadata from another Parameter Group. The ``MergeInto`` column can be used for either of these purposes. @@ -183,10 +183,10 @@ The ``MergeInto`` column can be used for either of these purposes. Copying Incomplete metadata ^^^^^^^^^^^^^^^^^^^^^^^^^^^ -In the example data we see that Parameter Group 5 appears to be identical to Parameter Group 3. +In the example data we see that Parameter Group 5 appears to be identical to Parameter Group 3. The reason these were separated was because ``DwellTime`` was not included in the metadata for Group 5. Since we collected the data and know that the protocol was identical for the scans in -Group 5, we can add ``3`` to the ``MergeInto`` column for Patameter Group 5. +Group 5, we can add ``3`` to the ``MergeInto`` column for Patameter Group 5. .. csv-table:: Merge Parameter Groups :align: center @@ -223,9 +223,9 @@ Deleting a Mistake ^^^^^^^^^^^^^^^^^^ To remove files in a Parameter Group from your BIDS data, you simply set the ``MergeInto`` value -to ``0``. We see in our data that there is a strange scan that has a ``RepetitionTime`` of 12.3 -seconds (Group 8) and a scan that has only 46 slices (Group 7). These scanning parameters are -different enough from all the other scans that it would be irresponsible to include them in +to ``0``. We see in our data that there is a strange scan that has a ``RepetitionTime`` of 12.3 +seconds (Group 8) and a scan that has only 46 slices (Group 7). These scanning parameters are +different enough from all the other scans that it would be irresponsible to include them in any final analysis. To remove these files from your BIDS data, add a ``0`` to ``MergeInto``: .. csv-table:: Merge Parameter Groups diff --git a/notebooks/Fieldmaps.ipynb b/notebooks/Fieldmaps.ipynb index 8f60d4609..04c18bd7e 100644 --- a/notebooks/Fieldmaps.ipynb +++ b/notebooks/Fieldmaps.ipynb @@ -39,7 +39,7 @@ "from pkg_resources import resource_filename as pkgrf \n", "\n", "# returns stirng path to testdata\n", - "TEST_DATA = pkgrf(\"bond\", \"testdata\")\n", + "TEST_DATA = pkgrf(\"cubids\", \"testdata\")\n", "\n", "# should give you the full path \n", "tmp_path = Path().resolve()\n", @@ -64,16 +64,16 @@ { "data": { "text/plain": [ - "[PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json'),\n", - " PosixPath('/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json')]" + "[PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json'),\n", + " PosixPath('/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json')]" ] }, "execution_count": 37, @@ -165,18 +165,18 @@ "name": "stdout", "output_type": "stream", "text": [ - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json: This fieldmap has a file\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json: This fieldmap is not intended for any files!\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json: This fieldmap has a file\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json: This fieldmap is not intended for any files!\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json: This fieldmap has a file\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json: This fieldmap is not intended for any files!\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json: This fieldmap is not intended for any files!\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json: This fieldmap has a file\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json: This fieldmap is not intended for any files!\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json: This fieldmap has a file\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json: This fieldmap is not intended for any files!\n", - "/Users/ttapera/BBL/Projects/BOnD/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json: This fieldmap has a file\n" + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_phasediff.json: This fieldmap has a file\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude2.json: This fieldmap is not intended for any files!\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_dir-PA_epi.json: This fieldmap has a file\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json: This fieldmap is not intended for any files!\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_phasediff.json: This fieldmap has a file\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude2.json: This fieldmap is not intended for any files!\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json: This fieldmap is not intended for any files!\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_dir-PA_epi.json: This fieldmap has a file\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude2.json: This fieldmap is not intended for any files!\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_dir-PA_epi.json: This fieldmap has a file\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json: This fieldmap is not intended for any files!\n", + "/Users/ttapera/BBL/Projects/CuBIDS/notebooks/testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_phasediff.json: This fieldmap has a file\n" ] } ], diff --git a/notebooks/FirstProofofConcept.ipynb b/notebooks/FirstProofofConcept.ipynb index 6b602aafd..4b8664fbf 100644 --- a/notebooks/FirstProofofConcept.ipynb +++ b/notebooks/FirstProofofConcept.ipynb @@ -19,7 +19,7 @@ "source": [ "import glob\n", "\n", - "root_dir = '/Users/ttapera/BBL/Projects/BOnD/'\n", + "root_dir = '/Users/ttapera/BBL/Projects/CuBIDS/'\n", "\n", "bids_dir = 'data/'" ] @@ -32,7 +32,7 @@ { "data": { "text/plain": [ - "'/Users/ttapera/BBL/Projects/BOnD/data/'" + "'/Users/ttapera/BBL/Projects/CuBIDS/data/'" ] }, "execution_count": 2, @@ -52,34 +52,34 @@ { "data": { "text/plain": [ - "['/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bval',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bvec',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.json',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bval',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bvec',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.nii.gz',\n", - " '/Users/ttapera/BBL/Projects/BOnD/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.json']" + "['/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bval',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bvec',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.json',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bval',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bvec',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.nii.gz',\n", + " '/Users/ttapera/BBL/Projects/CuBIDS/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.json']" ] }, "execution_count": 6, diff --git a/notebooks/HTML_param_groups.ipynb b/notebooks/HTML_param_groups.ipynb index 694273aa3..72ec9aff6 100644 --- a/notebooks/HTML_param_groups.ipynb +++ b/notebooks/HTML_param_groups.ipynb @@ -18,7 +18,7 @@ { "data": { "text/plain": [ - "'/Users/Covitz/BOnD/notebooks/testdata'" + "'/Users/Covitz/CuBIDS/notebooks/testdata'" ] }, "execution_count": 10, @@ -32,13 +32,13 @@ "from pathlib import Path \n", "import shutil\n", "import os\n", - "#import bond\n", + "#import cubids\n", "from bids.layout import parse_file_entities \n", - "from bond import BOnD\n", + "from cubids import CuBIDS\n", "from pkg_resources import resource_filename as pkgrf \n", "\n", "# returns stirng path to testdata\n", - "TEST_DATA = pkgrf(\"bond\", \"testdata\")\n", + "TEST_DATA = pkgrf(\"cubids\", \"testdata\")\n", "\n", "# should give you the full path \n", "tmp_path = Path().resolve()\n", @@ -237,7 +237,7 @@ "\n", "# ISSUE! Grouping by char! \n", "\n", - "#param_group = bond_obj.get_param_groups(key_group)\n", + "#param_group = cubids_obj.get_param_groups(key_group)\n", "# print(key_group)\n", "# #print(param_group)\n", "\n", @@ -316,8 +316,8 @@ "\n", "\n", "\n", - "filename = \"/Users/Covitz/BOnD/bond/testdata/complete/sub-01/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json\"\n", - "path = \"/Users/Covitz/BOnD/bond/testdata/complete/\"\n", + "filename = \"/Users/Covitz/CuBIDS/cubids/testdata/complete/sub-01/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json\"\n", + "path = \"/Users/Covitz/CuBIDS/cubids/testdata/complete/\"\n", "ret_entities = file_to_entities(filename)\n", "print(ret_entities) \n", "key_group = entities_to_key_group(ret_entities) \n", @@ -366,8 +366,8 @@ "\n", "\n", "\n", - "bond_obj = BOnD(\"/Users/Covitz/BOnD/bond/testdata/complete/\")\n", - "key_group = bond_obj.get_key_groups()\n", + "cubids_obj = CuBIDS(\"/Users/Covitz/CuBIDS/cubids/testdata/complete/\")\n", + "key_group = cubids_obj.get_key_groups()\n", "key_group" ] }, @@ -380,20 +380,20 @@ "name": "stdout", "output_type": "stream", "text": [ - "Requirement already satisfied: pybids in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (0.12.1)\n", - "Requirement already satisfied: pandas>=0.23 in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (from pybids) (1.1.3)\n", + "Requirement already satisfied: pybids in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (0.12.1)\n", + "Requirement already satisfied: pandas>=0.23 in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (from pybids) (1.1.3)\n", "Requirement already satisfied: scipy in /Users/Covitz/.local/lib/python3.8/site-packages (from pybids) (1.5.2)\n", - "Requirement already satisfied: sqlalchemy in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (from pybids) (1.3.19)\n", - "Requirement already satisfied: bids-validator in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (from pybids) (1.5.6)\n", - "Requirement already satisfied: patsy in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (from pybids) (0.5.1)\n", + "Requirement already satisfied: sqlalchemy in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (from pybids) (1.3.19)\n", + "Requirement already satisfied: bids-validator in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (from pybids) (1.5.6)\n", + "Requirement already satisfied: patsy in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (from pybids) (0.5.1)\n", "Requirement already satisfied: numpy in /Users/Covitz/.local/lib/python3.8/site-packages (from pybids) (1.19.2)\n", - "Requirement already satisfied: num2words in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (from pybids) (0.5.10)\n", + "Requirement already satisfied: num2words in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (from pybids) (0.5.10)\n", "Requirement already satisfied: nibabel>=2.1 in /Users/Covitz/.local/lib/python3.8/site-packages (from pybids) (3.1.1)\n", "Requirement already satisfied: click in /Users/Covitz/.local/lib/python3.8/site-packages (from pybids) (7.1.2)\n", - "Requirement already satisfied: pytz>=2017.2 in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (from pandas>=0.23->pybids) (2020.1)\n", + "Requirement already satisfied: pytz>=2017.2 in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (from pandas>=0.23->pybids) (2020.1)\n", "Requirement already satisfied: python-dateutil>=2.7.3 in /Users/Covitz/.local/lib/python3.8/site-packages (from pandas>=0.23->pybids) (2.8.1)\n", "Requirement already satisfied: six in /Users/Covitz/.local/lib/python3.8/site-packages (from patsy->pybids) (1.15.0)\n", - "Requirement already satisfied: docopt>=0.6.2 in /Applications/miniconda3/envs/bond/lib/python3.8/site-packages (from num2words->pybids) (0.6.2)\n", + "Requirement already satisfied: docopt>=0.6.2 in /Applications/miniconda3/envs/cubids/lib/python3.8/site-packages (from num2words->pybids) (0.6.2)\n", "Requirement already satisfied: packaging>=14.3 in /Users/Covitz/.local/lib/python3.8/site-packages (from nibabel>=2.1->pybids) (20.4)\n", "Requirement already satisfied: pyparsing>=2.0.2 in /Users/Covitz/.local/lib/python3.8/site-packages (from packaging>=14.3->nibabel>=2.1->pybids) (2.4.7)\n", "Note: you may need to restart the kernel to use updated packages.\n" @@ -433,7 +433,7 @@ "\n", "\n", "def html_groups(bids_dir):\n", - " # get key groups using bond.get_key_groups\n", + " # get key groups using cubids.get_key_groups\n", " # use key_group_to_entities to get entities \n", " # get param groups for each entity \n", " \n", diff --git a/notebooks/JSON_PoC_read_write.ipynb b/notebooks/JSON_PoC_read_write.ipynb index b4e594eec..eff761e4a 100644 --- a/notebooks/JSON_PoC_read_write.ipynb +++ b/notebooks/JSON_PoC_read_write.ipynb @@ -138,7 +138,7 @@ "source": [ "#testing the code with a single json file. \n", "\n", - "file_test = open('/Users/bjaber/Projects/BOnD-use_cases/bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json')\n", + "file_test = open('/Users/bjaber/Projects/CuBIDS-use_cases/cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json')\n", "sample_data = json.load(file_test)\n", "sample_data.keys()\n", "sample_data.get('SliceTiming')\n", @@ -337,12 +337,12 @@ } ], "source": [ - "for path in Path('/Users/bjaber/Projects/BOnD/bond/testdata/complete').rglob('*.json'): \n", + "for path in Path('/Users/bjaber/Projects/CuBIDS/cubids/testdata/complete').rglob('*.json'): \n", " #print(path)\n", "\n", " counter=0\n", "\n", - "for path in Path('/Users/bjaber/Projects/BOnD/bond/testdata/complete').rglob('*.json'):\n", + "for path in Path('/Users/bjaber/Projects/CuBIDS/cubids/testdata/complete').rglob('*.json'):\n", " print(type(path))\n", " print(counter)\n", " s_path = str(path)\n", @@ -375,13 +375,13 @@ "import os, json\n", "import pandas as pd\n", "\n", - "path_to_json = '/Users/bjaber/Projects/BOnD-use_cases/bond/testdata/complete/sub-01/ses-phdiff/anat'\n", + "path_to_json = '/Users/bjaber/Projects/CuBIDS-use_cases/cubids/testdata/complete/sub-01/ses-phdiff/anat'\n", "json_files = [pos_json for pos_json in os.listdir(path_to_json) if pos_json.endswith('.json')]\n", "print(json_files)\n", "\n", "attempt #2\n", "\n", - "for filename in glob('/Users/bjaber/Projects/BOnD-use_cases/bond/testdata/complete/*.json'):\n", + "for filename in glob('/Users/bjaber/Projects/CuBIDS-use_cases/cubids/testdata/complete/*.json'):\n", " print(filename)\n", " \n", " \n", diff --git a/notebooks/Key_and_Param_Groups.ipynb b/notebooks/Key_and_Param_Groups.ipynb index 2287c9341..d10a49715 100644 --- a/notebooks/Key_and_Param_Groups.ipynb +++ b/notebooks/Key_and_Param_Groups.ipynb @@ -8,7 +8,7 @@ "source": [ "#!/usr/bin/env python\n", "\n", - "\"\"\"Tests for `bond` package.\"\"\"\n", + "\"\"\"Tests for `cubids` package.\"\"\"\n", "import sys\n", "import time\n", "from pathlib import Path\n", @@ -20,20 +20,20 @@ "#import pytest\n", "\n", "from pkg_resources import resource_filename as pkgrf\n", - "from bond import BOnD\n", + "from cubids import CuBIDS\n", "#import shutil\n", - "#import bond\n", + "#import cubids\n", "#import tempfile\n", "#import os.path as op\n", "#from copy import deepcopy\n", "#import base64\n", "#from glob import glob\n", "\n", - "TEST_DATA = pkgrf(\"bond\", \"testdata\")\n", + "TEST_DATA = pkgrf(\"cubids\", \"testdata\")\n", "\n", "#data_root = Path(\".\") / \"testdata\" / \"complete\"\n", "\n", - "data_root2 = \"/Users/scovitz/BOnD/bond/Testdata/complete/\"\n" + "data_root2 = \"/Users/scovitz/CuBIDS/cubids/Testdata/complete/\"\n" ] }, { @@ -45,7 +45,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "mv /Users/scovitz/BOnD/bond/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz /Users/scovitz/BOnD/bond/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v5_magnitude1.nii.gz ; mv /Users/scovitz/BOnD/bond/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json /Users/scovitz/BOnD/bond/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v5_magnitude1.json ; mv /Users/scovitz/BOnD/bond/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz /Users/scovitz/BOnD/bond/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v5_magnitude1.nii.gz ; mv /Users/scovitz/BOnD/bond/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json /Users/scovitz/BOnD/bond/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v5_magnitude1.json ; mv /Users/scovitz/BOnD/bond/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz /Users/scovitz/BOnD/bond/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v5_magnitude1.nii.gz ; mv /Users/scovitz/BOnD/bond/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json /Users/scovitz/BOnD/bond/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v5_magnitude1.json\n" + "mv /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.nii.gz /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v5_magnitude1.nii.gz ; mv /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v4_magnitude1.json /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-01/ses-phdiff/fmap/sub-01_ses-phdiff_acq-v5_magnitude1.json ; mv /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.nii.gz /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v5_magnitude1.nii.gz ; mv /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v4_magnitude1.json /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-02/ses-phdiff/fmap/sub-02_ses-phdiff_acq-v5_magnitude1.json ; mv /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.nii.gz /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v5_magnitude1.nii.gz ; mv /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v4_magnitude1.json /Users/scovitz/CuBIDS/cubids/Testdata/complete/sub-03/ses-phdiff/fmap/sub-03_ses-phdiff_acq-v5_magnitude1.json\n" ] } ], @@ -55,9 +55,9 @@ "###############################\n", "\n", "\n", - "bod = BOnD(data_root2)\n", + "bod = CuBIDS(data_root2)\n", "\n", - "out = bod.change_key_groups('/Users/scovitz/BOnD/notebooks/NewTests', '/Users/scovitz/BOnD/notebooks/newCSVs')\n", + "out = bod.change_key_groups('/Users/scovitz/CuBIDS/notebooks/NewTests', '/Users/scovitz/CuBIDS/notebooks/newCSVs')\n", "\n", "\n", "print(out)\n" @@ -92,7 +92,7 @@ "\n", "# UNDOING RENAMING OF FILES \n", "\n", - "files_and_dirs = Path(\"/Users/scovitz/BOnD/bond/testdata/complete/\").rglob('*')\n", + "files_and_dirs = Path(\"/Users/scovitz/CuBIDS/cubids/testdata/complete/\").rglob('*')\n", "for path in files_and_dirs:\n", " old_name = path.stem\n", " old_ext = path.suffix\n", @@ -118,8 +118,8 @@ "\n", "# generating csvs\n", "\n", - "bod = BOnD(data_root2)\n", - "out = bod.get_CSVs('/Users/scovitz/BOnD/notebooks/NewTests')\n", + "bod = CuBIDS(data_root2)\n", + "out = bod.get_CSVs('/Users/scovitz/CuBIDS/notebooks/NewTests')\n", "out" ] }, @@ -140,7 +140,7 @@ }, "outputs": [], "source": [ - "bod = BOnD(data_root2)\n", + "bod = CuBIDS(data_root2)\n", "key_groups = bod.get_key_groups()\n", "print(key_groups)" ] diff --git a/notebooks/PofC_Key_Values2.ipynb b/notebooks/PofC_Key_Values2.ipynb index af04870bf..a43fb2da4 100644 --- a/notebooks/PofC_Key_Values2.ipynb +++ b/notebooks/PofC_Key_Values2.ipynb @@ -42,7 +42,7 @@ "metadata": {}, "outputs": [], "source": [ - "root_dir = '/Users/krmurtha/Desktop/informatics/BOnD/'\n", + "root_dir = '/Users/krmurtha/Desktop/informatics/CuBIDS/'\n", "bids_dir = 'data/'" ] }, @@ -55,7 +55,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "['/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-pepolar/dwi', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-pepolar/fmap', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-pepolar/anat', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-nofmap/dwi', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-phdiff/dwi', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-phdiff/fmap', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-buds/dwi', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-buds/fmap', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-buds/anat', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-phases/dwi', '/Users/krmurtha/Desktop/informatics/BOnD/data/DSDTI_fmap/sub-PNC/ses-phases/fmap', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bval', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bvec', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.json', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bval', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bvec', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.nii.gz', '/Users/krmurtha/Desktop/informatics/BOnD/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.json']\n" + "['/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-pepolar/dwi', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-pepolar/fmap', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-pepolar/anat', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-nofmap/dwi', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-phdiff/dwi', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-phdiff/fmap', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-buds/dwi', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-buds/fmap', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-buds/anat', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-phases/dwi', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/DSDTI_fmap/sub-PNC/ses-phases/fmap', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude2.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase2.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_magnitude1.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/fmap/sub-1832999514_ses-PNC2_phase1.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_rec-refaced_T1w.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/anat/sub-1832999514_ses-PNC2_T1w.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-idemo.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-frac2back.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC2/func/sub-1832999514_ses-PNC2_task-rest_acq-singleband_bold.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bval', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.bvec', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-02_dwi.json', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bval', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/dwi/sub-1832999514_ses-PNC1_run-01_dwi.bvec', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.nii.gz', '/Users/krmurtha/Desktop/informatics/CuBIDS/data/sub-1832999514/ses-PNC1/func/sub-1832999514_ses-PNC1_task-rest_acq-singleband_task-rest_bold.json']\n" ] } ], @@ -82,7 +82,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/Users/krmurtha/anaconda3/envs/bond/lib/python3.8/site-packages/bids/layout/models.py:148: FutureWarning: The 'extension' entity currently excludes the leading dot ('.'). As of version 0.14.0, it will include the leading dot. To suppress this warning and include the leading dot, use `bids.config.set_option('extension_initial_dot', True)`.\n", + "/Users/krmurtha/anaconda3/envs/cubids/lib/python3.8/site-packages/bids/layout/models.py:148: FutureWarning: The 'extension' entity currently excludes the leading dot ('.'). As of version 0.14.0, it will include the leading dot. To suppress this warning and include the leading dot, use `bids.config.set_option('extension_initial_dot', True)`.\n", " warnings.warn(\"The 'extension' entity currently excludes the leading dot ('.'). \"\n" ] } diff --git a/notebooks/keyparamgrouptest.ipynb b/notebooks/keyparamgrouptest.ipynb index e1821d430..a260cd146 100644 --- a/notebooks/keyparamgrouptest.ipynb +++ b/notebooks/keyparamgrouptest.ipynb @@ -31,9 +31,9 @@ } ], "source": [ - "from bond import BOnD\n", + "from cubids import CuBIDS\n", "\n", - "bod = BOnD(\"/Users/mcieslak/projects/test_bids_data/HBN\")\n", + "bod = CuBIDS(\"/Users/mcieslak/projects/test_bids_data/HBN\")\n", "bod._cache_fieldmaps()" ] }, @@ -1566,7 +1566,7 @@ "metadata": {}, "outputs": [], "source": [ - "from bond.bond import *\n", + "from cubids.cubids import *\n", "suffix = '(phase1|phasediff|epi|fieldmap)'\n", "fmap_files = self.layout.get(suffix=suffix, regex_search=True,\n", " extension=['.nii.gz', '.nii'])\n", @@ -1643,7 +1643,7 @@ "metadata": {}, "outputs": [], "source": [ - "from bond.bond import *\n", + "from cubids.cubids import *\n", "files = [\n", " '/Users/mcieslak/projects/test_bids_data/HBN/sub-NDARAT581NDH/ses-HBNsiteRU/dwi/sub-NDARAT581NDH_ses-HBNsiteRU_acq-64dir_dwi.nii.gz', \n", " '/Users/mcieslak/projects/test_bids_data/HBN/sub-NDARRP384BVX/ses-HBNsiteRU/dwi/sub-NDARRP384BVX_ses-HBNsiteRU_acq-64dir_dwi.nii.gz']\n", diff --git a/notebooks/metadata_image_param.ipynb b/notebooks/metadata_image_param.ipynb index a7b9f567b..cdef0bdbb 100644 --- a/notebooks/metadata_image_param.ipynb +++ b/notebooks/metadata_image_param.ipynb @@ -138,7 +138,7 @@ "source": [ "#testing the code with a single json file. \n", "\n", - "file_test = open('/Users/bjaber/Projects/BOnD-use_cases/bond/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json')\n", + "file_test = open('/Users/bjaber/Projects/CuBIDS-use_cases/cubids/testdata/complete/sub-01/ses-phdiff/dwi/sub-01_ses-phdiff_acq-HASC55AP_dwi.json')\n", "sample_data = json.load(file_test)\n", "sample_data.keys()\n", "sample_data.get('SliceTiming')\n", @@ -443,7 +443,7 @@ "\n", "counter=0\n", "\n", - "for path in Path('/Users/bjaber/Projects/BOnD/bond/testdata/complete').rglob('*.json'):\n", + "for path in Path('/Users/bjaber/Projects/CuBIDS/cubids/testdata/complete').rglob('*.json'):\n", " print(type(path))\n", " print(counter)\n", " s_path = str(path)\n", @@ -467,7 +467,7 @@ "\n", "\n", "#create dataframe of unique rows \n", - "#bids entities filter in the bond class to fileter through the files \n", + "#bids entities filter in the cubids class to fileter through the files \n", "#loop over , get metadata, and put into the dataframe \n", "\n", "\n", @@ -502,13 +502,13 @@ "import os, json\n", "import pandas as pd\n", "\n", - "path_to_json = '/Users/bjaber/Projects/BOnD-use_cases/bond/testdata/complete/sub-01/ses-phdiff/anat'\n", + "path_to_json = '/Users/bjaber/Projects/CuBIDS-use_cases/cubids/testdata/complete/sub-01/ses-phdiff/anat'\n", "json_files = [pos_json for pos_json in os.listdir(path_to_json) if pos_json.endswith('.json')]\n", "print(json_files)\n", "\n", "attempt #2\n", "\n", - "for filename in glob('/Users/bjaber/Projects/BOnD-use_cases/bond/testdata/complete/*.json'):\n", + "for filename in glob('/Users/bjaber/Projects/CuBIDS-use_cases/cubids/testdata/complete/*.json'):\n", " print(filename)\n", " \n", " \n", diff --git a/notebooks/rename_files_work.ipynb b/notebooks/rename_files_work.ipynb index 4412f97ef..dde81b9e3 100644 --- a/notebooks/rename_files_work.ipynb +++ b/notebooks/rename_files_work.ipynb @@ -39,7 +39,7 @@ { "data": { "text/plain": [ - "'/Users/Covitz/BOnD/notebooks/testdata'" + "'/Users/Covitz/CuBIDS/notebooks/testdata'" ] }, "execution_count": 3, @@ -57,7 +57,7 @@ "from pkg_resources import resource_filename as pkgrf \n", "\n", "# returns stirng path to testdata\n", - "TEST_DATA = pkgrf(\"bond\", \"testdata\")\n", + "TEST_DATA = pkgrf(\"cubids\", \"testdata\")\n", "\n", "# should give you the full path \n", "tmp_path = Path().resolve()\n", @@ -243,7 +243,7 @@ "\n", "\n", "\n", - "for path in Path(\"/Users/Covitz/BOnD/data/sub-1832999514/\").iterdir():\n", + "for path in Path(\"/Users/Covitz/CuBIDS/data/sub-1832999514/\").iterdir():\n", " if path.is_file():\n", " print(path.stem)\n", " old_name = path.stem \n", @@ -2289,7 +2289,7 @@ "# testing out our function rename_files \n", "# changes all filenames in all_files containing substrings \"PNC2\" to \"PNC20\" \n", "\n", - "#root_dir = \"/Users/Covitz/BOnD/data/sub-1832999514/ses-PNC2/func/\"\n", + "#root_dir = \"/Users/Covitz/CuBIDS/data/sub-1832999514/ses-PNC2/func/\"\n", "\n", "#rename_files(root_dir, \"PNC2\", \"PNC02\")\n", "\n", diff --git a/notebooks/workwithtestdata.ipynb b/notebooks/workwithtestdata.ipynb index 43f367c11..cbb6ce775 100644 --- a/notebooks/workwithtestdata.ipynb +++ b/notebooks/workwithtestdata.ipynb @@ -11,8 +11,8 @@ "import os.path as op\n", "from pkg_resources import resource_filename as pkgrf\n", "import shutil\n", - "import bond\n", - "TEST_DATA = pkgrf(\"bond\", \"testdata\")\n", + "import cubids\n", + "TEST_DATA = pkgrf(\"cubids\", \"testdata\")\n", "\n", "def test_data(tmp_path):\n", " data_root = tmp_path / \"testdata\"\n", @@ -81,9 +81,9 @@ } ], "source": [ - "from bond import BOnD\n", + "from cubids import CuBIDS\n", "\n", - "bod = BOnD(str(first_test / \"complete\"))\n", + "bod = CuBIDS(str(first_test / \"complete\"))\n", "bod._cache_fieldmaps()" ] }, @@ -129,7 +129,7 @@ } ], "source": [ - "ibod = BOnD(str(first_test / \"inconsistent\"))\n", + "ibod = CuBIDS(str(first_test / \"inconsistent\"))\n", "misfits = ibod._cache_fieldmaps()\n", "len(misfits)" ] @@ -181,7 +181,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "[INFO] Creating a new annex repo at /Users/mcieslak/projects/BOnD/notebooks/test1/testdata/inconsistent \n" + "[INFO] Creating a new annex repo at /Users/mcieslak/projects/CuBIDS/notebooks/test1/testdata/inconsistent \n" ] }, { @@ -192,19 +192,19 @@ "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m", "\u001b[0;31mRuntimeError\u001b[0m Traceback (most recent call last)", "\u001b[0;32m\u001b[0m in \u001b[0;36m\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mdatalad\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mapi\u001b[0m \u001b[0;32mas\u001b[0m \u001b[0mdlapi\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 2\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 3\u001b[0;31m \u001b[0mdl\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mdlapi\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcreate\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mfirst_test\u001b[0m \u001b[0;34m/\u001b[0m \u001b[0;34m\"inconsistent\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mforce\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mTrue\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36meval_func\u001b[0;34m(wrapped, instance, args, kwargs)\u001b[0m\n\u001b[1;32m 493\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresults\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 494\u001b[0m \u001b[0mlgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"Returning return_func from eval_func for %s\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwrapped_class\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 495\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mreturn_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgenerator_func\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 496\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 497\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0meval_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36mreturn_func\u001b[0;34m(wrapped_, instance_, args_, kwargs_)\u001b[0m\n\u001b[1;32m 481\u001b[0m \u001b[0;31m# unwind generator if there is one, this actually runs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 482\u001b[0m \u001b[0;31m# any processing\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 483\u001b[0;31m \u001b[0mresults\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresults\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 484\u001b[0m \u001b[0;31m# render summaries\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 485\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mresult_xfm\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mresult_renderer\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m'tailored'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'default'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36mgenerator_func\u001b[0;34m(*_args, **_kwargs)\u001b[0m\n\u001b[1;32m 400\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 401\u001b[0m \u001b[0;31m# process main results\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 402\u001b[0;31m for r in _process_results(\n\u001b[0m\u001b[1;32m 403\u001b[0m \u001b[0;31m# execution\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 404\u001b[0m \u001b[0mwrapped\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0m_args\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0m_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36m_process_results\u001b[0;34m(results, cmd_class, on_failure, action_summary, incomplete_results, result_renderer, result_log_level, allkwargs)\u001b[0m\n\u001b[1;32m 560\u001b[0m \u001b[0mrender_n_repetitions\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m10\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstdout\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misatty\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0mfloat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"inf\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 561\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 562\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mres\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mresults\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 563\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mres\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m'action'\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 564\u001b[0m \u001b[0;31m# XXX Yarik has to no clue on how to track the origin of the\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/core/local/create.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(path, initopts, force, description, dataset, no_annex, annex, fake_dates, cfg_proc)\u001b[0m\n\u001b[1;32m 393\u001b[0m \u001b[0;31m# always come with annex when created from scratch\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 394\u001b[0m \u001b[0mlgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minfo\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Creating a new annex repo at %s\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtbds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 395\u001b[0;31m tbrepo = AnnexRepo(\n\u001b[0m\u001b[1;32m 396\u001b[0m \u001b[0mtbds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 397\u001b[0m \u001b[0murl\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/support/repo.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(cls, *args, **kwargs)\u001b[0m\n\u001b[1;32m 149\u001b[0m \u001b[0;31m# we have no such instance yet or the existing one is invalidated,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 150\u001b[0m \u001b[0;31m# so we instantiate:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 151\u001b[0;31m \u001b[0minstance\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__call__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcls\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0mnew_args\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mnew_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 152\u001b[0m \u001b[0mcls\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_unique_instances\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mid_\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minstance\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 153\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/support/annexrepo.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, path, url, runner, backend, always_commit, create, create_sanity_checks, init, batch_size, version, description, git_opts, annex_opts, annex_init_opts, repo, fake_dates)\u001b[0m\n\u001b[1;32m 274\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 275\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mdo_init\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 276\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_init\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mversion\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mversion\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdescription\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 277\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 278\u001b[0m \u001b[0;31m# TODO: RM DIRECT eventually, but should remain while we have is_direct_mode\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/support/annexrepo.py\u001b[0m in \u001b[0;36m_init\u001b[0;34m(self, version, description)\u001b[0m\n\u001b[1;32m 1275\u001b[0m \u001b[0mwhere\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'local'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1276\u001b[0m reload=False)\n\u001b[0;32m-> 1277\u001b[0;31m self._run_annex_command(\n\u001b[0m\u001b[1;32m 1278\u001b[0m \u001b[0;34m'init'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1279\u001b[0m \u001b[0mrunner\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"gitwitless\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/support/annexrepo.py\u001b[0m in \u001b[0;36m_run_annex_command\u001b[0;34m(self, annex_cmd, git_options, annex_options, backend, jobs, files, merge_annex_branches, runner, protocol, **kwargs)\u001b[0m\n\u001b[1;32m 1098\u001b[0m \u001b[0;31m# TODO: RF to use --batch where possible instead of splitting\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1099\u001b[0m \u001b[0;31m# into multiple invocations\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1100\u001b[0;31m return run_gitcommand_on_file_list_chunks(\n\u001b[0m\u001b[1;32m 1101\u001b[0m \u001b[0mrun_func\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1102\u001b[0m \u001b[0mcmd_list\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/cmd.py\u001b[0m in \u001b[0;36mrun_gitcommand_on_file_list_chunks\u001b[0;34m(func, cmd, files, *args, **kwargs)\u001b[0m\n\u001b[1;32m 142\u001b[0m \u001b[0mresults\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcmd\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'--'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mfile_chunk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 143\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 144\u001b[0;31m \u001b[0mresults\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcmd\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 145\u001b[0m \u001b[0;31m# if it was a WitlessRunner.run -- we would get dicts.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 146\u001b[0m \u001b[0;31m# If old Runner -- stdout, stderr strings\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/site-packages/datalad/cmd.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, cmd, protocol, stdin, cwd, env, **kwargs)\u001b[0m\n\u001b[1;32m 478\u001b[0m \u001b[0masyncio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_event_loop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mevent_loop\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 479\u001b[0m \u001b[0;31m# include the subprocess manager in the asyncio event loop\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 480\u001b[0;31m results = event_loop.run_until_complete(\n\u001b[0m\u001b[1;32m 481\u001b[0m run_async_cmd(\n\u001b[1;32m 482\u001b[0m \u001b[0mevent_loop\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/asyncio/base_events.py\u001b[0m in \u001b[0;36mrun_until_complete\u001b[0;34m(self, future)\u001b[0m\n\u001b[1;32m 590\u001b[0m \"\"\"\n\u001b[1;32m 591\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_check_closed\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 592\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_check_running\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 593\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 594\u001b[0m \u001b[0mnew_task\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mfutures\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misfuture\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfuture\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", - "\u001b[0;32m~/miniconda3/envs/bond/lib/python3.8/asyncio/base_events.py\u001b[0m in \u001b[0;36m_check_running\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 552\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mRuntimeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'This event loop is already running'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 553\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mevents\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_running_loop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 554\u001b[0;31m raise RuntimeError(\n\u001b[0m\u001b[1;32m 555\u001b[0m 'Cannot run the event loop while another loop is running')\n\u001b[1;32m 556\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36meval_func\u001b[0;34m(wrapped, instance, args, kwargs)\u001b[0m\n\u001b[1;32m 493\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0mresults\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 494\u001b[0m \u001b[0mlgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mlog\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;36m2\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m\"Returning return_func from eval_func for %s\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mwrapped_class\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 495\u001b[0;31m \u001b[0;32mreturn\u001b[0m \u001b[0mreturn_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mgenerator_func\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 496\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 497\u001b[0m \u001b[0;32mreturn\u001b[0m \u001b[0meval_func\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36mreturn_func\u001b[0;34m(wrapped_, instance_, args_, kwargs_)\u001b[0m\n\u001b[1;32m 481\u001b[0m \u001b[0;31m# unwind generator if there is one, this actually runs\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 482\u001b[0m \u001b[0;31m# any processing\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 483\u001b[0;31m \u001b[0mresults\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mlist\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mresults\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 484\u001b[0m \u001b[0;31m# render summaries\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 485\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mresult_xfm\u001b[0m \u001b[0;32mand\u001b[0m \u001b[0mresult_renderer\u001b[0m \u001b[0;32min\u001b[0m \u001b[0;34m(\u001b[0m\u001b[0;34m'tailored'\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m'default'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36mgenerator_func\u001b[0;34m(*_args, **_kwargs)\u001b[0m\n\u001b[1;32m 400\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 401\u001b[0m \u001b[0;31m# process main results\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 402\u001b[0;31m for r in _process_results(\n\u001b[0m\u001b[1;32m 403\u001b[0m \u001b[0;31m# execution\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 404\u001b[0m \u001b[0mwrapped\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m*\u001b[0m\u001b[0m_args\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0m_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/interface/utils.py\u001b[0m in \u001b[0;36m_process_results\u001b[0;34m(results, cmd_class, on_failure, action_summary, incomplete_results, result_renderer, result_log_level, allkwargs)\u001b[0m\n\u001b[1;32m 560\u001b[0m \u001b[0mrender_n_repetitions\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;36m10\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0msys\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mstdout\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misatty\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32melse\u001b[0m \u001b[0mfloat\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"inf\"\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 561\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 562\u001b[0;31m \u001b[0;32mfor\u001b[0m \u001b[0mres\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mresults\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 563\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mres\u001b[0m \u001b[0;32mor\u001b[0m \u001b[0;34m'action'\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32min\u001b[0m \u001b[0mres\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 564\u001b[0m \u001b[0;31m# XXX Yarik has to no clue on how to track the origin of the\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/core/local/create.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(path, initopts, force, description, dataset, no_annex, annex, fake_dates, cfg_proc)\u001b[0m\n\u001b[1;32m 393\u001b[0m \u001b[0;31m# always come with annex when created from scratch\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 394\u001b[0m \u001b[0mlgr\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0minfo\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m\"Creating a new annex repo at %s\"\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mtbds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 395\u001b[0;31m tbrepo = AnnexRepo(\n\u001b[0m\u001b[1;32m 396\u001b[0m \u001b[0mtbds\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mpath\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 397\u001b[0m \u001b[0murl\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;32mNone\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/support/repo.py\u001b[0m in \u001b[0;36m__call__\u001b[0;34m(cls, *args, **kwargs)\u001b[0m\n\u001b[1;32m 149\u001b[0m \u001b[0;31m# we have no such instance yet or the existing one is invalidated,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 150\u001b[0m \u001b[0;31m# so we instantiate:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 151\u001b[0;31m \u001b[0minstance\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0mtype\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m__call__\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcls\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0mnew_args\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mnew_kwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 152\u001b[0m \u001b[0mcls\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_unique_instances\u001b[0m\u001b[0;34m[\u001b[0m\u001b[0mid_\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0minstance\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 153\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/support/annexrepo.py\u001b[0m in \u001b[0;36m__init__\u001b[0;34m(self, path, url, runner, backend, always_commit, create, create_sanity_checks, init, batch_size, version, description, git_opts, annex_opts, annex_init_opts, repo, fake_dates)\u001b[0m\n\u001b[1;32m 274\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 275\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mdo_init\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 276\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_init\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mversion\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mversion\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0mdescription\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0mdescription\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 277\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 278\u001b[0m \u001b[0;31m# TODO: RM DIRECT eventually, but should remain while we have is_direct_mode\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/support/annexrepo.py\u001b[0m in \u001b[0;36m_init\u001b[0;34m(self, version, description)\u001b[0m\n\u001b[1;32m 1275\u001b[0m \u001b[0mwhere\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m'local'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1276\u001b[0m reload=False)\n\u001b[0;32m-> 1277\u001b[0;31m self._run_annex_command(\n\u001b[0m\u001b[1;32m 1278\u001b[0m \u001b[0;34m'init'\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1279\u001b[0m \u001b[0mrunner\u001b[0m\u001b[0;34m=\u001b[0m\u001b[0;34m\"gitwitless\"\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/support/annexrepo.py\u001b[0m in \u001b[0;36m_run_annex_command\u001b[0;34m(self, annex_cmd, git_options, annex_options, backend, jobs, files, merge_annex_branches, runner, protocol, **kwargs)\u001b[0m\n\u001b[1;32m 1098\u001b[0m \u001b[0;31m# TODO: RF to use --batch where possible instead of splitting\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1099\u001b[0m \u001b[0;31m# into multiple invocations\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m-> 1100\u001b[0;31m return run_gitcommand_on_file_list_chunks(\n\u001b[0m\u001b[1;32m 1101\u001b[0m \u001b[0mrun_func\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 1102\u001b[0m \u001b[0mcmd_list\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/cmd.py\u001b[0m in \u001b[0;36mrun_gitcommand_on_file_list_chunks\u001b[0;34m(func, cmd, files, *args, **kwargs)\u001b[0m\n\u001b[1;32m 142\u001b[0m \u001b[0mresults\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcmd\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0;34m[\u001b[0m\u001b[0;34m'--'\u001b[0m\u001b[0;34m]\u001b[0m \u001b[0;34m+\u001b[0m \u001b[0mfile_chunk\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 143\u001b[0m \u001b[0;32melse\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 144\u001b[0;31m \u001b[0mresults\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mappend\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfunc\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mcmd\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m*\u001b[0m\u001b[0margs\u001b[0m\u001b[0;34m,\u001b[0m \u001b[0;34m**\u001b[0m\u001b[0mkwargs\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 145\u001b[0m \u001b[0;31m# if it was a WitlessRunner.run -- we would get dicts.\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 146\u001b[0m \u001b[0;31m# If old Runner -- stdout, stderr strings\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/site-packages/datalad/cmd.py\u001b[0m in \u001b[0;36mrun\u001b[0;34m(self, cmd, protocol, stdin, cwd, env, **kwargs)\u001b[0m\n\u001b[1;32m 478\u001b[0m \u001b[0masyncio\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mset_event_loop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mevent_loop\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 479\u001b[0m \u001b[0;31m# include the subprocess manager in the asyncio event loop\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 480\u001b[0;31m results = event_loop.run_until_complete(\n\u001b[0m\u001b[1;32m 481\u001b[0m run_async_cmd(\n\u001b[1;32m 482\u001b[0m \u001b[0mevent_loop\u001b[0m\u001b[0;34m,\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/asyncio/base_events.py\u001b[0m in \u001b[0;36mrun_until_complete\u001b[0;34m(self, future)\u001b[0m\n\u001b[1;32m 590\u001b[0m \"\"\"\n\u001b[1;32m 591\u001b[0m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_check_closed\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 592\u001b[0;31m \u001b[0mself\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_check_running\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 593\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 594\u001b[0m \u001b[0mnew_task\u001b[0m \u001b[0;34m=\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0mfutures\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0misfuture\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0mfuture\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n", + "\u001b[0;32m~/miniconda3/envs/cubids/lib/python3.8/asyncio/base_events.py\u001b[0m in \u001b[0;36m_check_running\u001b[0;34m(self)\u001b[0m\n\u001b[1;32m 552\u001b[0m \u001b[0;32mraise\u001b[0m \u001b[0mRuntimeError\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m'This event loop is already running'\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 553\u001b[0m \u001b[0;32mif\u001b[0m \u001b[0mevents\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0m_get_running_loop\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m \u001b[0;32mis\u001b[0m \u001b[0;32mnot\u001b[0m \u001b[0;32mNone\u001b[0m\u001b[0;34m:\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m--> 554\u001b[0;31m raise RuntimeError(\n\u001b[0m\u001b[1;32m 555\u001b[0m 'Cannot run the event loop while another loop is running')\n\u001b[1;32m 556\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n", "\u001b[0;31mRuntimeError\u001b[0m: Cannot run the event loop while another loop is running" ] } @@ -487,7 +487,7 @@ "metadata": {}, "outputs": [], "source": [ - "from bond.bond import *\n", + "from cubids.cubids import *\n", "suffix = '(phase1|phasediff|epi|fieldmap)'\n", "fmap_files = self.layout.get(suffix=suffix, regex_search=True,\n", " extension=['.nii.gz', '.nii'])\n", @@ -564,7 +564,7 @@ "metadata": {}, "outputs": [], "source": [ - "from bond.bond import *\n", + "from cubids.cubids import *\n", "files = [\n", " '/Users/mcieslak/projects/test_bids_data/HBN/sub-NDARAT581NDH/ses-HBNsiteRU/dwi/sub-NDARAT581NDH_ses-HBNsiteRU_acq-64dir_dwi.nii.gz', \n", " '/Users/mcieslak/projects/test_bids_data/HBN/sub-NDARRP384BVX/ses-HBNsiteRU/dwi/sub-NDARRP384BVX_ses-HBNsiteRU_acq-64dir_dwi.nii.gz']\n", diff --git a/setup.cfg b/setup.cfg index cb3653488..916f3a973 100644 --- a/setup.cfg +++ b/setup.cfg @@ -7,7 +7,7 @@ tag = True search = version='{current_version}' replace = version='{new_version}' -[bumpversion:file:bond/__init__.py] +[bumpversion:file:cubids/__init__.py] search = __version__ = '{current_version}' replace = __version__ = '{new_version}' @@ -73,7 +73,7 @@ all = %(tests)s [options.package_data] -bond = +cubids = data/config.yml [tool:pytest] diff --git a/setup.py b/setup.py index 90b2610b4..4b6da4b8d 100644 --- a/setup.py +++ b/setup.py @@ -28,30 +28,30 @@ description="BIDS On Disk Editor", entry_points={ 'console_scripts': [ - 'bond-group=bond.cli:bond_group', - 'bond-apply=bond.cli:bond_apply', - 'bond-purge=bond.cli:bond_purge', - 'bond-add-nifti-info=bond.cli:bond_add_nifti_info', - 'bond-copy-exemplars=bond.cli:bond_copy_exemplars', - 'bond-undo=bond.cli:bond_undo', - 'bids-sidecar-merge=bond.cli:bids_sidecar_merge', - 'bond-validate=bond.cli:bond_validate', - 'bond-datalad-save=bond.cli:bond_datalad_save', - 'bond-print-metadata-fields=bond.cli:' - 'bond_print_metadata_fields', - 'bond-remove-metadata-fields=bond.cli:' - 'bond_remove_metadata_fields' + 'cubids-group=cubids.cli:cubids_group', + 'cubids-apply=cubids.cli:cubids_apply', + 'cubids-purge=cubids.cli:cubids_purge', + 'cubids-add-nifti-info=cubids.cli:cubids_add_nifti_info', + 'cubids-copy-exemplars=cubids.cli:cubids_copy_exemplars', + 'cubids-undo=cubids.cli:cubids_undo', + 'bids-sidecar-merge=cubids.cli:bids_sidecar_merge', + 'cubids-validate=cubids.cli:cubids_validate', + 'cubids-datalad-save=cubids.cli:cubids_datalad_save', + 'cubids-print-metadata-fields=cubids.cli:' + 'cubids_print_metadata_fields', + 'cubids-remove-metadata-fields=cubids.cli:' + 'cubids_remove_metadata_fields' ], }, license="GNU General Public License v3", long_description=readme + '\n\n' + history, include_package_data=True, - keywords='bond', - name='bond', - packages=find_packages(include=['bond', 'bond.*']), + keywords='cubids', + name='cubids', + packages=find_packages(include=['cubids', 'cubids.*']), setup_requires=setup_requirements, test_suite='tests', - url='https://github.com/pennlinc/bond', + url='https://github.com/pennlinc/cubids', version='0.1.0', zip_safe=False, ) diff --git a/tests/test_bond.py b/tests/test_bond.py index d2e6d01ea..64d5ddbdf 100644 --- a/tests/test_bond.py +++ b/tests/test_bond.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -"""Tests for `bond` package.""" +"""Tests for `cubids` package.""" import sys sys.path.append("..") import shutil @@ -10,10 +10,10 @@ from pathlib import Path from pkg_resources import resource_filename as pkgrf import pytest -from bond import BOnD -from bond.validator import (build_validator_call, +from cubids import CuBIDS +from cubids.validator import (build_validator_call, run_validator, parse_validator_output) -from bond.metadata_merge import ( +from cubids.metadata_merge import ( merge_without_overwrite, merge_json_into_json) from math import nan import subprocess @@ -25,7 +25,7 @@ import pandas as pd import subprocess -TEST_DATA = pkgrf("bond", "testdata") +TEST_DATA = pkgrf("cubids", "testdata") COMPLETE_KEY_GROUPS = [ 'acquisition-HASC55AP_datatype-dwi_suffix-dwi', @@ -76,7 +76,7 @@ def test_ok_json_merge_cli(tmp_path): def test_get_param_groups(tmp_path): data_root = get_data(tmp_path) - bod = BOnD(data_root / "inconsistent", use_datalad=True) + bod = CuBIDS(data_root / "inconsistent", use_datalad=True) csv_prefix = str(tmp_path / "csvs") key_groups = bod.get_key_groups() bod._cache_fieldmaps() @@ -87,7 +87,7 @@ def test_get_param_groups(tmp_path): def test_copy_exemplars(tmp_path): data_root = get_data(tmp_path) - bod = BOnD(data_root / "complete", use_datalad=True) + bod = CuBIDS(data_root / "complete", use_datalad=True) csv_prefix = str(tmp_path / "csvs") bod.get_CSVs(csv_prefix) acq_group_csv = csv_prefix + "_AcqGrouping.csv" @@ -122,7 +122,7 @@ def test_purge_no_datalad(tmp_path): with open(purge_path, 'w') as filehandle: for listitem in scans: filehandle.write('%s\n' % listitem) - bod = BOnD(data_root / "complete", use_datalad=False) + bod = CuBIDS(data_root / "complete", use_datalad=False) assert Path(scan_name).exists() assert Path(json_name).exists() @@ -158,7 +158,7 @@ def test_purge(tmp_path): with open(purge_path, 'w') as filehandle: for listitem in scans: filehandle.write('%s\n' % listitem) - bod = BOnD(data_root / "complete", use_datalad=True) + bod = CuBIDS(data_root / "complete", use_datalad=True) bod.datalad_save() assert bod.is_datalad_clean() @@ -203,7 +203,7 @@ def test_bad_json_merge_cli(tmp_path): def test_add_nifti_info_datalad(tmp_path): data_root = get_data(tmp_path) - bod = BOnD(data_root / "complete", use_datalad=True) + bod = CuBIDS(data_root / "complete", use_datalad=True) csv_prefix = str(tmp_path / "csvs") bod.get_CSVs(csv_prefix) summary_csv = csv_prefix + "_summary.csv" @@ -224,7 +224,7 @@ def test_add_nifti_info_datalad(tmp_path): def test_add_nifti_info_no_datalad(tmp_path): data_root = get_data(tmp_path) - bod = BOnD(data_root / "complete", use_datalad=False) + bod = CuBIDS(data_root / "complete", use_datalad=False) bod.add_nifti_info(force_unlock=False) csv_prefix = str(tmp_path / "csvs") bod.get_CSVs(csv_prefix) @@ -237,7 +237,7 @@ def test_add_nifti_info_no_datalad(tmp_path): #TODO: add tests that return an error for invalid merge def test_csv_merge_no_datalad(tmp_path): data_root = get_data(tmp_path) - bod = BOnD(data_root / "inconsistent", use_datalad=False) + bod = CuBIDS(data_root / "inconsistent", use_datalad=False) # Get an initial grouping summary and files list csv_prefix = str(tmp_path / "originals") @@ -302,7 +302,7 @@ def test_csv_merge_no_datalad(tmp_path): def test_csv_merge_changes(tmp_path): data_root = get_data(tmp_path) - bod = BOnD(data_root / "inconsistent", use_datalad=True) + bod = CuBIDS(data_root / "inconsistent", use_datalad=True) bod.datalad_save() assert bod.is_datalad_clean() @@ -496,7 +496,7 @@ def test_keygroups(tmp_path): data_root = get_data(tmp_path) # Test the complete data - complete_bod = BOnD(data_root / "complete") + complete_bod = CuBIDS(data_root / "complete") complete_misfit_fmaps = complete_bod._cache_fieldmaps() # There should be no unpaired fieldmaps assert len(complete_misfit_fmaps) == 0 @@ -506,7 +506,7 @@ def test_keygroups(tmp_path): assert key_groups == COMPLETE_KEY_GROUPS # Test the incomplete - ibod = BOnD(data_root / "inconsistent") + ibod = CuBIDS(data_root / "inconsistent") inc_misfit_fmaps = ibod._cache_fieldmaps() assert len(inc_misfit_fmaps) == 1 @@ -521,7 +521,7 @@ def test_csv_creation(tmp_path): data_root = get_data(tmp_path) # Test the complete data - complete_bod = BOnD(data_root / "complete") + complete_bod = CuBIDS(data_root / "complete") complete_misfit_fmaps = complete_bod._cache_fieldmaps() # There should be no unpaired fieldmaps assert len(complete_misfit_fmaps) == 0 @@ -553,7 +553,7 @@ def test_csv_creation(tmp_path): assert bool_FMAP == True # Test the incomplete - ibod = BOnD(data_root / "inconsistent") + ibod = CuBIDS(data_root / "inconsistent") inc_misfit_fmaps = ibod._cache_fieldmaps() assert len(inc_misfit_fmaps) == 1 @@ -629,13 +629,13 @@ def test_apply_csv_changes(tmp_path): has_physio = True - complete_bond = BOnD(data_root / "complete", use_datalad=True) - complete_bond.datalad_save() + complete_cubids = CuBIDS(data_root / "complete", use_datalad=True) + complete_cubids.datalad_save() - complete_bond.get_CSVs(str(tmp_path / "originals")) + complete_cubids.get_CSVs(str(tmp_path / "originals")) # give csv with no changes (make sure it does nothing) - complete_bond.apply_csv_changes(str(tmp_path / "originals_summary.csv"), + complete_cubids.apply_csv_changes(str(tmp_path / "originals_summary.csv"), str(tmp_path / "originals_files.csv"), str(tmp_path / "modified1")) @@ -652,7 +652,7 @@ def test_apply_csv_changes(tmp_path): # edit the csv, add a RenameKeyGroup # _edit_csv(str(tmp_path / "originals_summary.csv")) - complete_bond.apply_csv_changes(str(tmp_path / "originals_summary.csv"), + complete_cubids.apply_csv_changes(str(tmp_path / "originals_summary.csv"), str(tmp_path / "originals_files.csv"), str(tmp_path / "modified2")) @@ -700,7 +700,7 @@ def test_apply_csv_changes(tmp_path): assert Path(f.replace('nii.gz', 'json')).exists() == True # apply deletion - complete_bond.apply_csv_changes(mod2_path, + complete_cubids.apply_csv_changes(mod2_path, str(tmp_path / "modified2_files.csv"), str(tmp_path / "deleted")) @@ -734,12 +734,12 @@ def test_session_apply(tmp_path): data_root = get_data(tmp_path) bids_dir = str(data_root / "inconsistent") - ses_bond = BOnD(data_root / "inconsistent", acq_group_level='session', use_datalad=True) + ses_cubids = CuBIDS(data_root / "inconsistent", acq_group_level='session', use_datalad=True) - ses_bond.get_CSVs(str(tmp_path / "originals")) + ses_cubids.get_CSVs(str(tmp_path / "originals")) # give csv and make sure 'session' is in summary both pre and post apply - ses_bond.apply_csv_changes(str(tmp_path / "originals_summary.csv"), + ses_cubids.apply_csv_changes(str(tmp_path / "originals_summary.csv"), str(tmp_path / "originals_files.csv"), str(tmp_path / "modified1")) @@ -828,7 +828,7 @@ def _get_json_string(json_path): def test_remove_fields(tmp_path): """Test that we metadata fields are detected and removed.""" data_root = get_data(tmp_path) - bod = BOnD(data_root, use_datalad=False) + bod = CuBIDS(data_root, use_datalad=False) # Get the metadata fields metadata_fields = bod.get_all_metadata_fields() @@ -849,23 +849,23 @@ def test_datalad_integration(tmp_path): """ data_root = get_data(tmp_path) - # Test that an uninitialized BOnD raises exceptions - uninit_bond = BOnD(data_root / "complete", use_datalad=False) + # Test that an uninitialized CuBIDS raises exceptions + uninit_cubids = CuBIDS(data_root / "complete", use_datalad=False) # Ensure an exception is raised if trying to use datalad without # initializing with pytest.raises(Exception): - uninit_bond.is_datalad_clean() + uninit_cubids.is_datalad_clean() # initialize the datalad repository and try again - uninit_bond.init_datalad() - uninit_bond.datalad_save('Test save') - assert uninit_bond.is_datalad_clean() + uninit_cubids.init_datalad() + uninit_cubids.datalad_save('Test save') + assert uninit_cubids.is_datalad_clean() # Now, the datalad repository is initialized and saved. - # Make sure if we make a new BOnD object it recognizes that + # Make sure if we make a new CuBIDS object it recognizes that # the datalad status is OK - complete_bod = BOnD(data_root / "complete", use_datalad=True) + complete_bod = CuBIDS(data_root / "complete", use_datalad=True) assert complete_bod.datalad_ready assert complete_bod.is_datalad_clean() @@ -901,19 +901,19 @@ def test_datalad_integration(tmp_path): assert not original_binary_content == edited_binary_content # Check that datalad knows something has changed - assert not uninit_bond.is_datalad_clean() + assert not uninit_cubids.is_datalad_clean() assert not complete_bod.is_datalad_clean() # Attempt to undo a change before checking in changes with pytest.raises(Exception): - uninit_bond.datalad_undo_last_commit() + uninit_cubids.datalad_undo_last_commit() # Perform a save - uninit_bond.datalad_save(message="TEST SAVE!") - assert uninit_bond.is_datalad_clean() + uninit_cubids.datalad_save(message="TEST SAVE!") + assert uninit_cubids.is_datalad_clean() # Now undo the most recent save - uninit_bond.datalad_undo_last_commit() + uninit_cubids.datalad_undo_last_commit() # Unlock the restored files so we can access their content complete_bod.datalad_handle.unlock(test_binary) @@ -998,7 +998,7 @@ def test_docker(): assert return_status -def test_image(image='pennlinc/bond:latest'): +def test_image(image='pennlinc/cubids:latest'): """Check whether image is present on local system""" ret = subprocess.run(['docker', 'images', '-q', image], stdout=subprocess.PIPE)