Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added DicomImage to ImageIn union #26

Merged
merged 6 commits into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 27 additions & 9 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -45,6 +45,12 @@ jobs:
run: |
git config --global user.email "[email protected]"
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
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -202,22 +208,22 @@ 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 }}
- name: Strip auto package from gitignore so it is included in package
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}}
Expand All @@ -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:
Expand All @@ -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:
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -320,15 +334,19 @@ jobs:
run: |
git config --local user.email "[email protected]"
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 }}
Expand Down
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import sys
import typing as ty
from fileformats.application import Dicom
from fileformats.medimage import (
DicomImage,
DicomDir,
NiftiGzX,
NiftiGz,
Expand Down Expand Up @@ -40,7 +40,7 @@
ImageFormatB,
ImageFormatGzB,
ImageHeaderB,
Dicom,
DicomImage,
DicomDir,
NiftiGzX,
NiftiGz,
Expand Down
Loading