From 9e0b12dfff1d1500db9c6000cedfeb3116c989d7 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Thu, 26 Sep 2024 11:48:16 +1000 Subject: [PATCH 1/6] added DicomImage to ImageIn union --- .../fileformats/fileformats/medimage_mrtrix3/in_out.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/related-packages/fileformats/fileformats/medimage_mrtrix3/in_out.py b/related-packages/fileformats/fileformats/medimage_mrtrix3/in_out.py index 20c77f7..3b1adb4 100644 --- a/related-packages/fileformats/fileformats/medimage_mrtrix3/in_out.py +++ b/related-packages/fileformats/fileformats/medimage_mrtrix3/in_out.py @@ -1,7 +1,7 @@ import sys import typing as ty -from fileformats.application import Dicom from fileformats.medimage import ( + DicomImage, DicomDir, NiftiGzX, NiftiGz, @@ -40,7 +40,7 @@ ImageFormatB, ImageFormatGzB, ImageHeaderB, - Dicom, + DicomImage, DicomDir, NiftiGzX, NiftiGz, From 9e34c3f6aed71709d3423d7aed0b0d85845e3d4d Mon Sep 17 00:00:00 2001 From: Tom Close Date: Sat, 28 Sep 2024 14:26:11 +1000 Subject: [PATCH 2/6] updated download artefact github action --- .github/workflows/ci-cd.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index eaf9af9..e4575db 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -36,7 +36,7 @@ jobs: SCCACHE_CACHE_SIZE: "2G" steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 with: submodules: true - name: Set Git User @@ -146,14 +146,14 @@ jobs: steps: - uses: actions/checkout@v2 - name: Download version file - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: VersionFile path: mrtrix3_version.txt - name: Extract Mrtrix version run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV - name: Download auto-gen pydra - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} @@ -202,14 +202,14 @@ jobs: - name: Fetch tags run: git fetch --prune --unshallow - name: Download version file - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: VersionFile path: mrtrix3_version.txt - name: Extract Mrtrix version run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV - name: Download auto-gen pydra - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} @@ -217,7 +217,7 @@ jobs: run: | sed -i '/\/pydra\/tasks\/mrtrix3\/${{ env.SUBPKG_NAME }}/d' .gitignore - name: Download MRtrix3 install - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: MRtrix3 path: ${{ env.MRTRIX_INSTALL}} @@ -242,7 +242,7 @@ jobs: -e '.[test]' - name: Test with pytest run: pytest -sv pydra/tasks/mrtrix3 --cov pydra.tasks.mrtrix3 --cov-report xml - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v2 if: ${{ always() }} deploy-fileformats: @@ -321,14 +321,14 @@ jobs: git config --local user.email "action@github.com" git config --local user.name "GitHub Action" - name: Download version file - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: VersionFile path: mrtrix3_version.txt - name: Extract Mrtrix version run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV - name: Download auto-gen pydra - uses: actions/download-artifact@v2 + uses: actions/download-artifact@v3 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} From 2f09500119e0ad0cc0097687d95e30a3da1510a2 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Mon, 14 Oct 2024 07:46:06 +1100 Subject: [PATCH 3/6] added mypy config to pyproject --- pyproject.toml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 23d4949..3aaa352 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -79,3 +79,12 @@ per-file-ignores = ["__init__.py:F401"] max-line-length = 88 select = "C,E,F,W,B,B950" extend-ignore = ['E203', 'E501', 'E129', 'W503'] + + +[tool.mypy] +python_version = "3.8" +ignore_missing_imports = true +strict = true +namespace_packages = true +explicit_package_bases = true +exclude = ["tests", "scripts", "docs", "build", "dist"] From 6aa2284280938fd4cfd152ea4d82a5a3b54867db Mon Sep 17 00:00:00 2001 From: Tom Close Date: Fri, 18 Oct 2024 17:01:46 +1100 Subject: [PATCH 4/6] fetch tags before building --- .github/workflows/ci-cd.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index e4575db..b2b83df 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -45,6 +45,12 @@ jobs: run: | git config --global user.email "dummy@email.com" git config --global user.name "Dummy User" + - name: Unset header + # checkout@v2 adds a header that makes branch protection report errors + # because the Github action bot is not a collaborator on the repo + run: git config --local --unset http.https://github.com/.extraheader + - name: Fetch tags + run: git fetch --prune --unshallow - name: install dependencies run: | sudo apt-get update @@ -253,6 +259,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Unset header + # checkout@v2 adds a header that makes branch protection report errors + # because the Github action bot is not a collaborator on the repo + run: git config --local --unset http.https://github.com/.extraheader + - name: Fetch tags + run: git fetch --prune --unshallow - name: Set up Python uses: actions/setup-python@v4 with: @@ -285,6 +297,12 @@ jobs: with: submodules: recursive fetch-depth: 0 + - name: Unset header + # checkout@v2 adds a header that makes branch protection report errors + # because the Github action bot is not a collaborator on the repo + run: git config --local --unset http.https://github.com/.extraheader + - name: Fetch tags + run: git fetch --prune --unshallow - name: Set up Python uses: actions/setup-python@v4 with: @@ -320,6 +338,12 @@ jobs: run: | git config --local user.email "action@github.com" git config --local user.name "GitHub Action" + - name: Unset header + # checkout@v2 adds a header that makes branch protection report errors + # because the Github action bot is not a collaborator on the repo + run: git config --local --unset http.https://github.com/.extraheader + - name: Fetch tags + run: git fetch --prune --unshallow - name: Download version file uses: actions/download-artifact@v3 with: From a73ad7f4316c560312248841e189a83c5e10ff30 Mon Sep 17 00:00:00 2001 From: Tom Close Date: Fri, 18 Oct 2024 19:15:49 +1100 Subject: [PATCH 5/6] upgraded download-artifact in gh to latest version --- .github/workflows/ci-cd.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index b2b83df..0804cbe 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -152,14 +152,14 @@ jobs: steps: - uses: actions/checkout@v2 - name: Download version file - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: VersionFile path: mrtrix3_version.txt - name: Extract Mrtrix version run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV - name: Download auto-gen pydra - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} @@ -208,14 +208,14 @@ jobs: - name: Fetch tags run: git fetch --prune --unshallow - name: Download version file - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: VersionFile path: mrtrix3_version.txt - name: Extract Mrtrix version run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV - name: Download auto-gen pydra - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} @@ -223,7 +223,7 @@ jobs: run: | sed -i '/\/pydra\/tasks\/mrtrix3\/${{ env.SUBPKG_NAME }}/d' .gitignore - name: Download MRtrix3 install - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: MRtrix3 path: ${{ env.MRTRIX_INSTALL}} @@ -345,14 +345,14 @@ jobs: - name: Fetch tags run: git fetch --prune --unshallow - name: Download version file - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: VersionFile path: mrtrix3_version.txt - name: Extract Mrtrix version run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV - name: Download auto-gen pydra - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} From dd83b815e2fafdb635989ef2288ebe4f29a7847e Mon Sep 17 00:00:00 2001 From: Tom Close Date: Fri, 18 Oct 2024 19:22:34 +1100 Subject: [PATCH 6/6] remove unshallow fetches of tags --- .github/workflows/ci-cd.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index 0804cbe..94ffe4c 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -263,8 +263,6 @@ jobs: # checkout@v2 adds a header that makes branch protection report errors # because the Github action bot is not a collaborator on the repo run: git config --local --unset http.https://github.com/.extraheader - - name: Fetch tags - run: git fetch --prune --unshallow - name: Set up Python uses: actions/setup-python@v4 with: @@ -301,8 +299,6 @@ jobs: # checkout@v2 adds a header that makes branch protection report errors # because the Github action bot is not a collaborator on the repo run: git config --local --unset http.https://github.com/.extraheader - - name: Fetch tags - run: git fetch --prune --unshallow - name: Set up Python uses: actions/setup-python@v4 with: @@ -342,8 +338,6 @@ jobs: # checkout@v2 adds a header that makes branch protection report errors # because the Github action bot is not a collaborator on the repo run: git config --local --unset http.https://github.com/.extraheader - - name: Fetch tags - run: git fetch --prune --unshallow - name: Download version file uses: actions/download-artifact@v4 with: