diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index eaf9af9..94ffe4c 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 @@ -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 @@ -146,14 +152,14 @@ jobs: steps: - uses: actions/checkout@v2 - name: Download version file - uses: actions/download-artifact@v2 + 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@v2 + uses: actions/download-artifact@v4 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} @@ -202,14 +208,14 @@ jobs: - name: Fetch tags run: git fetch --prune --unshallow - name: Download version file - uses: actions/download-artifact@v2 + 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@v2 + uses: actions/download-artifact@v4 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} @@ -217,7 +223,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@v4 with: name: MRtrix3 path: ${{ env.MRTRIX_INSTALL}} @@ -242,7 +248,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: @@ -253,6 +259,10 @@ 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: Set up Python uses: actions/setup-python@v4 with: @@ -285,6 +295,10 @@ 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: Set up Python uses: actions/setup-python@v4 with: @@ -320,15 +334,19 @@ 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: Download version file - uses: actions/download-artifact@v2 + 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@v2 + uses: actions/download-artifact@v4 with: name: AutoGen path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }} 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"] 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,