From e941240584861fa1be7dd4e62c2e2e1c3f762eb9 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Fri, 28 Mar 2025 18:39:17 +1100 Subject: [PATCH 1/7] updated syntax to match pydra refactor --- pydra/tasks/dcm2niix/utils.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pydra/tasks/dcm2niix/utils.py b/pydra/tasks/dcm2niix/utils.py index e7afe99..7b0051e 100644 --- a/pydra/tasks/dcm2niix/utils.py +++ b/pydra/tasks/dcm2niix/utils.py @@ -1,10 +1,8 @@ from pathlib import Path import typing as ty -from pydra.engine.specs import ShellDef, ShellOutputs from fileformats.application import Json from fileformats.medimage import DicomDir, Nifti1, NiftiGz, Bvec, Bval -from pydra.design import shell - +from pydra.compose import shell FS = ty.TypeVar("FS", bound=Nifti1 | NiftiGz | Json | Bval | Bvec) @@ -98,7 +96,7 @@ def dcm2niix_out_files(out_dir: Path, filename: str) -> list[str]: @shell.define -class Dcm2Niix(ShellDef["Dcm2Niix.Outputs"]): +class Dcm2Niix(shell.Task["Dcm2Niix.Outputs"]): """ Example ------- @@ -292,7 +290,7 @@ class Dcm2Niix(ShellDef["Dcm2Niix.Outputs"]): version: bool = shell.arg(default=False, argstr="--version", help="report version") xml: bool = shell.arg(default=False, argstr="--xml", help="Slicer format features") - class Outputs(ShellOutputs): + class Outputs(shell.Outputs): out_file: Nifti1 | NiftiGz = shell.out( help=( "output NIfTI image. If multiple nifti files are created (e.g. for " From 4bfafb4a9cd703165e2db3aa5fc0f0e187b84ad9 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Fri, 28 Mar 2025 18:42:15 +1100 Subject: [PATCH 2/7] pointed test build to development branches --- .github/workflows/ci-cd.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 43c5a35..2ba2904 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -40,8 +40,8 @@ jobs: - name: Install development Pydra and fileformats-medimage run: | pip uninstall pydra fileformats-medimage -y - pip install --no-deps git+https://github.com/nipype/pydra.git@new-syntax - pip install --no-deps git+https://github.com/arcanaframework/fileformats-medimage.git@pydra-syntax-changes + pip install --no-deps git+https://github.com/nipype/pydra.git@develop + pip install --no-deps git+https://github.com/arcanaframework/fileformats-medimage.git@updated-pydra-imports - name: Test with pytest run: | pytest -sv --cov pydra.tasks.$SUBPACKAGE --cov-report xml From a25394e7773e017e231fd4d8d8acbe90d723cc7e Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 7 Apr 2025 19:28:44 +1000 Subject: [PATCH 3/7] upped pydra dep and removed stray auto-gen _version.py --- .gitignore | 3 +++ pydra/tasks/dcm2niix/_version.py | 17 ----------------- pyproject.toml | 2 +- 3 files changed, 4 insertions(+), 18 deletions(-) delete mode 100644 pydra/tasks/dcm2niix/_version.py diff --git a/.gitignore b/.gitignore index f363079..2beefad 100644 --- a/.gitignore +++ b/.gitignore @@ -138,3 +138,6 @@ dmypy.json upload-token.txt .DS_Store + +# Created by hatch-vcs +/pydra/tasks/dcm2niix/_version.py diff --git a/pydra/tasks/dcm2niix/_version.py b/pydra/tasks/dcm2niix/_version.py deleted file mode 100644 index 19d066b..0000000 --- a/pydra/tasks/dcm2niix/_version.py +++ /dev/null @@ -1,17 +0,0 @@ -# file generated by setuptools_scm -# don't change, don't track in version control -TYPE_CHECKING = False -if TYPE_CHECKING: - from typing import Tuple, Union - - VERSION_TUPLE = Tuple[Union[int, str], ...] -else: - VERSION_TUPLE = object - -version: str -__version__: str -__version_tuple__: VERSION_TUPLE -version_tuple: VERSION_TUPLE - -__version__ = version = "1.2.2.dev1+ge5de395.d20250104" -__version_tuple__ = version_tuple = (1, 2, 2, "dev1", "ge5de395.d20250104") diff --git a/pyproject.toml b/pyproject.toml index 117832e..d321f5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "pydra-dcm2niix" description = "pydra-dcm2niix contains Pydra task specifications for the Dcm2niix converter" readme = "README.md" requires-python = ">=3.11" -dependencies = ["fileformats>=0.15a2", "pydra >=0.24"] +dependencies = ["fileformats>=0.15", "pydra >=1.0a"] license = { file = "LICENSE" } authors = [{ name = "Thomas G. Close", email = "tom.g.close@gmail.com" }] maintainers = [{ name = "Thomas G. Close", email = "tom.g.close@gmail.com" }] From d1005366da654e289ca34e54ddf8623d50db8713 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 7 Apr 2025 19:35:11 +1000 Subject: [PATCH 4/7] removed pydra develop from ci-cd --- .github/workflows/ci-cd.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 2ba2904..8f72e23 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -37,11 +37,6 @@ jobs: - name: Install task package run: | pip install ".[test]" - - name: Install development Pydra and fileformats-medimage - run: | - pip uninstall pydra fileformats-medimage -y - pip install --no-deps git+https://github.com/nipype/pydra.git@develop - pip install --no-deps git+https://github.com/arcanaframework/fileformats-medimage.git@updated-pydra-imports - name: Test with pytest run: | pytest -sv --cov pydra.tasks.$SUBPACKAGE --cov-report xml From 63988cb6991512ca9cc2519ba9568517cbaf881e Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 7 Apr 2025 20:25:34 +1000 Subject: [PATCH 5/7] added fileformats-medimage to list of dependecies --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d321f5f..f1c92e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "pydra-dcm2niix" description = "pydra-dcm2niix contains Pydra task specifications for the Dcm2niix converter" readme = "README.md" requires-python = ">=3.11" -dependencies = ["fileformats>=0.15", "pydra >=1.0a"] +dependencies = ["fileformats>=0.15", "fileformats-medimage >=0.10", "pydra >=1.0a"] license = { file = "LICENSE" } authors = [{ name = "Thomas G. Close", email = "tom.g.close@gmail.com" }] maintainers = [{ name = "Thomas G. Close", email = "tom.g.close@gmail.com" }] From 022d6098a4fecdd5e61eb521717ddbc6f9db66b7 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 7 Apr 2025 20:28:41 +1000 Subject: [PATCH 6/7] relaxed fileformats-medimage dep --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f1c92e2..1185544 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,7 +7,7 @@ name = "pydra-dcm2niix" description = "pydra-dcm2niix contains Pydra task specifications for the Dcm2niix converter" readme = "README.md" requires-python = ">=3.11" -dependencies = ["fileformats>=0.15", "fileformats-medimage >=0.10", "pydra >=1.0a"] +dependencies = ["fileformats>=0.15", "fileformats-medimage >=0.10a", "pydra >=1.0a"] license = { file = "LICENSE" } authors = [{ name = "Thomas G. Close", email = "tom.g.close@gmail.com" }] maintainers = [{ name = "Thomas G. Close", email = "tom.g.close@gmail.com" }] From 40009ee1eb701da1dc3866a699b87f33f4754524 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 7 Apr 2025 20:30:42 +1000 Subject: [PATCH 7/7] remove matrix from ci-cd --- .github/workflows/ci-cd.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 8f72e23..c4b623b 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -46,9 +46,6 @@ jobs: deploy: needs: [test] runs-on: ubuntu-latest - strategy: - matrix: - python-version: [3.9] steps: - uses: actions/checkout@v3 with: