Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nipy/heudiconv
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v0.12.0
Choose a base ref
...
head repository: nipy/heudiconv
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 7,860 additions and 3,913 deletions.
  1. +2 −2 .codespellrc
  2. +0 −3 .coveragerc
  3. +2 −2 .github/ISSUE_TEMPLATE.md
  4. +0 −19 .github/workflows/codespell.yml
  5. +1 −1 .github/workflows/docker.yml
  6. +27 −0 .github/workflows/lint.yml
  7. +11 −7 .github/workflows/release.yml
  8. +11 −6 .github/workflows/test.yml
  9. +27 −0 .github/workflows/typing.yml
  10. +6 −4 .gitignore
  11. +25 −10 .mailmap
  12. +34 −0 .pre-commit-config.yaml
  13. +150 −0 .zenodo.json
  14. +384 −0 CHANGELOG.md
  15. +130 −0 CONTRIBUTING.rst
  16. +38 −3 Dockerfile
  17. +8 −1 LICENSE
  18. +50 −21 README.rst
  19. +1 −1 custom/dbic/singularity-env.def
  20. +1 −1 docs/Makefile
  21. +12 −0 docs/commandline.rst
  22. +33 −29 docs/conf.py
  23. +48 −0 docs/container.rst
  24. +318 −0 docs/custom-heuristic.rst
  25. +1 −0 docs/figs
  26. +51 −9 docs/heuristics.rst
  27. +4 −2 docs/index.rst
  28. +33 −21 docs/installation.rst
  29. +92 −0 docs/quickstart.rst
  30. +133 −0 docs/reproin.rst
  31. +16 −4 docs/tutorials.rst
  32. +0 −107 docs/usage.rst
  33. BIN figs/environment.png
  34. BIN figs/workflow.png
  35. +4 −8 heudiconv/__init__.py
  36. +501 −339 heudiconv/bids.py
  37. +99 −74 heudiconv/cli/monitor.py
  38. +165 −125 heudiconv/cli/run.py
  39. +459 −274 heudiconv/convert.py
  40. +460 −184 heudiconv/dicoms.py
  41. +13 −8 heudiconv/due.py
  42. +0 −27 heudiconv/external/dcmstack.py
  43. +102 −70 heudiconv/external/dlad.py
  44. +0 −11 heudiconv/external/pydicom.py
  45. +41 −16 heudiconv/external/tests/test_dlad.py
  46. +99 −52 heudiconv/heuristics/banda-bids.py
  47. +29 −12 heudiconv/heuristics/bids_ME.py
  48. +43 −13 heudiconv/heuristics/bids_PhoenixReport.py
  49. +72 −28 heudiconv/heuristics/bids_with_ses.py
  50. +85 −48 heudiconv/heuristics/cmrr_heuristic.py
  51. +20 −8 heudiconv/heuristics/convertall.py
  52. +32 −0 heudiconv/heuristics/convertall_custom.py
  53. +111 −77 heudiconv/heuristics/example.py
  54. +64 −42 heudiconv/heuristics/multires_7Tbold.py
  55. +292 −251 heudiconv/heuristics/reproin.py
  56. +5 −6 heudiconv/heuristics/reproin_validator.cfg
  57. +38 −25 heudiconv/heuristics/studyforrest_phase2.py
  58. +21 −8 heudiconv/heuristics/test_b0dwi_for_fmap.py
  59. +177 −144 heudiconv/heuristics/test_reproin.py
  60. +99 −33 heudiconv/heuristics/uc_bids.py
  61. +28 −29 heudiconv/info.py
  62. +234 −128 heudiconv/main.py
  63. +169 −106 heudiconv/parser.py
  64. 0 heudiconv/py.typed
  65. +22 −15 heudiconv/queue.py
  66. +11 −7 heudiconv/tests/anonymize_script.py
  67. +8 −5 heudiconv/tests/conftest.py
  68. BIN heudiconv/tests/data/MRI_102TD_PHA_S.MR.Chen_Matthews_1.3.1.2022.11.16.15.50.20.357.31204541.dcm
  69. +1 −0 heudiconv/tests/data/non_zeros.bval
  70. +1 −0 heudiconv/tests/data/zeros.bval
  71. +87 −0 heudiconv/tests/test_archives.py
  72. +779 −534 heudiconv/tests/test_bids.py
  73. +150 −92 heudiconv/tests/test_convert.py
  74. +174 −32 heudiconv/tests/test_dicoms.py
  75. +141 −104 heudiconv/tests/test_heuristics.py
  76. +193 −165 heudiconv/tests/test_main.py
  77. +90 −62 heudiconv/tests/test_monitor.py
  78. +77 −71 heudiconv/tests/test_queue.py
  79. +103 −52 heudiconv/tests/test_regression.py
  80. +16 −23 heudiconv/tests/test_tarballs.py
  81. +190 −66 heudiconv/tests/test_utils.py
  82. +44 −68 heudiconv/tests/utils.py
  83. +405 −177 heudiconv/utils.py
  84. +40 −0 mypy.ini
  85. +1 −1 pyproject.toml
  86. +0 −3 pytest.ini
  87. +31 −28 setup.py
  88. +65 −3 tox.ini
  89. +29 −5 utils/gen-docker-image.sh
  90. +90 −0 utils/sensor-dicoms
  91. +1 −1 utils/test-compare-two-versions.sh
4 changes: 2 additions & 2 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[codespell]
skip = .git,.venv,venvs,*.svg,_build
skip = .git,.venv,venvs,*.svg,_build,build
# te -- TE as codespell is case insensitive
ignore-words-list = te
ignore-words-list = bu,nd,te
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<!-- DO NOT DELETE THIS!
<!-- DO NOT DELETE THIS!
This template is used to facilitate issue resolution.
All text in <!-> tags will not be displayed.
-->
@@ -20,5 +20,5 @@ Choose one:
- [ ] Container
<!-- If selected, please provide container name and tag"-->

- Heudiconv version:
- Heudiconv version:
<!-- To check: run heudiconv with just the --version flag -->
19 changes: 0 additions & 19 deletions .github/workflows/codespell.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

27 changes: 27 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Linters

on:
- push
- pull_request

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Set up environment
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: Run linters
run: tox -e lint
18 changes: 11 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -12,31 +12,35 @@ jobs:
if: "!contains(github.event.head_commit.message, 'ci skip') && !contains(github.event.head_commit.message, 'skip ci')"
steps:
- name: Checkout source
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Download auto
run: |
#curl -vL -o - "$(curl -fsSL https://api.github.com/repos/intuit/auto/releases/latest | jq -r '.assets[] | select(.name == "auto-linux.gz") | .browser_download_url')" | gunzip > ~/auto
# Pin to 10.16.1 so we don't break if & when
# Pin so we don't break if & when
# <https://github.com/intuit/auto/issues/1778> is fixed.
wget -O- https://github.com/intuit/auto/releases/download/v10.16.1/auto-linux.gz | gunzip > ~/auto
# 11.0.5 is needed for <https://github.com/intuit/auto/issues/2432>
wget -O- https://github.com/intuit/auto/releases/download/v11.0.5/auto-linux.gz | gunzip > ~/auto
chmod a+x ~/auto
- name: Check whether a release is due
- name: Query 'auto' on type of the release
id: auto-version
run: |
version="$(~/auto version)"
# to be able to debug if something goes wrong
set -o pipefail
~/auto version -vv | tee /tmp/auto-version
version="$(sed -ne '/Calculated SEMVER bump:/s,.*: *,,p' /tmp/auto-version)"
echo "version=$version" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Python
if: steps.auto-version.outputs.version != ''
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '^3.7'
python-version: '^3.9'

- name: Install Python dependencies
if: steps.auto-version.outputs.version != ''
17 changes: 11 additions & 6 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -3,6 +3,9 @@ name: Test
on:
pull_request:
push:
schedule:
# run weekly to ensure that we are still good
- cron: '1 2 * * 3'

jobs:
test:
@@ -14,19 +17,20 @@ jobs:
fail-fast: false
matrix:
python-version:
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
# Seems needs work in traits: https://github.com/nipy/heudiconv/pull/799#issuecomment-2447298795
# - '3.13'
steps:
- name: Check out repository
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

@@ -35,7 +39,7 @@ jobs:
# The ultimate one-liner setup for NeuroDebian repository
bash <(wget -q -O- http://neuro.debian.net/_files/neurodebian-travis.sh)
sudo apt-get update -qq
sudo apt-get install git-annex-standalone
sudo apt-get install git-annex-standalone dcm2niix
- name: Install dependencies
run: |
@@ -54,8 +58,9 @@ jobs:
run: coverage run `which pytest` -s -v heudiconv

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}

# vim:set et sts=2:
27 changes: 27 additions & 0 deletions .github/workflows/typing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Type-check

on:
- push
- pull_request

jobs:
typing:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade tox
- name: Run type checker
run: tox -e typing
10 changes: 6 additions & 4 deletions .gitignore
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
*.egg-info/
*.pyc
.cache/
.coverage
*.egg-info/
.idea/
venvs/
.tox/
.vscode/
_build/
_version.py
build/
dist/
.vscode/
_version.py
sample_nifti.json
venvs/
35 changes: 25 additions & 10 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -1,11 +1,26 @@
Mathias Goncalves <goncalves.mathias@gmail.com> <mathiasg@mit.edu>
Matteo Visconti di Oleggio Castello <mvdoc@users.noreply.github.com>
Matteo Visconti di Oleggio Castello <matteo.visconti.gr@dartmouth.edu>
Matteo Visconti di Oleggio Castello <mvdoc.gr@dartmouth.edu>
Basile Pinsard <basile.pinsard@gmail.com>
Chris Filo Gorgolewski <krzysztof.gorgolewski@gmail.com> Chris Gorgolewski <krzysztof.gorgolewski@gmail.com>
Pablo Velasco <pablo.velasco@nyu.edu>
Pablo Velasco <pablovelasco@flywheel.io>
Dae Houlihan <daeda@mit.edu>
Dae Houlihan <daeh@users.noreply.github.com>
Mathias Goncalves <goncalves.mathias@gmail.com>
Mathias Goncalves <mathiasg@stanford.edu>
Christopher J. Markiewicz <markiewicz@stanford.edu>
Dae Houlihan <daeda@mit.edu> Dae <daeh@users.noreply.github.com>
Isaac To <candleindark@gmail.com> Isaac To <candleindark@users.noreply.github.com>
John Lee <johnleenimh@gmail.com>
John Lee <johnleenimh@gmail.com> <leej3@users.noreply.github.com>
John T. Wodder II <git@varonathe.org> <jwodder@users.noreply.github.com>
Jörg Stadler <joerg.stadler@lin-magdeburg.de> Joerg Stadler <joerg.stadler@lin-magdeburg.de>
Jörg Stadler <joerg.stadler@lin-magdeburg.de> Joerg Stadler <jstadler@lin-magdeburg.de>
Jörg Stadler <joerg.stadler@lin-magdeburg.de> Jörg Stadler <jstadler@lin-magdeburg.de>
Jörg Stadler <joerg.stadler@lin-magdeburg.de> Jörg Stadler <Stadler@lin-magdeburg.de>
Mathias Goncalves <goncalves.mathias@gmail.com> mathiasg <mathiasg@mit.edu>
Mathias Goncalves <goncalves.mathias@gmail.com> mathiasg <mathiasg@stanford.edu>
Mathias Goncalves <goncalves.mathias@gmail.com> Mathias Goncalves <mathiasg@mit.edu>
Mathias Goncalves <goncalves.mathias@gmail.com> Mathias Goncalves <mathiasg@stanford.edu>
Matteo Visconti di Oleggio Castello <matteo.visconti.gr@dartmouth.edu> Matteo Visconti dOC <matteo.visconti.gr@dartmouth.edu>
Matteo Visconti di Oleggio Castello <matteo.visconti.gr@dartmouth.edu> Matteo Visconti dOC <mvdoc.gr@dartmouth.edu>
Matteo Visconti di Oleggio Castello <matteo.visconti.gr@dartmouth.edu> <mvdoc@users.noreply.github.com>
Michael Dayan <michael.dayan@fcbg.ch> <79224807+neurorepro@users.noreply.github.com>
Michael Krause <krause@mpib-berlin.mpg.de> <mk@galax.is>
Pablo Velasco <pablo.velasco@nyu.edu> <pablovelasco@flywheel.io>
Pablo Velasco <pablo.velasco@nyu.edu> pvelasco <pablo.velasco@nyu.edu>
Satrajit Ghosh <satrajit.ghosh@gmail.com> Satrajit Ghosh <satra@mit.edu>
Steven Tilley <steve@steventilley.com> Steven Tilley <stilley2@jhmi.edu>
Steven Tilley <steve@steventilley.com> Steven Tilley <stilley2@localhost.localdomain>
34 changes: 34 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-added-large-files
- id: check-json
- id: check-toml
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace

- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell

- repo: https://github.com/psf/black
rev: 23.3.0
hooks:
- id: black

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
hooks:
- id: isort

- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
additional_dependencies:
- flake8-bugbear
- flake8-builtins
- flake8-unused-arguments
Loading