Skip to content

Commit b8c374d

Browse files
authored
Merge pull request #26 from nipype/unittest-fixes
added DicomImage to ImageIn union
2 parents ab62558 + dd83b81 commit b8c374d

File tree

3 files changed

+38
-11
lines changed

3 files changed

+38
-11
lines changed

.github/workflows/ci-cd.yml

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
SCCACHE_CACHE_SIZE: "2G"
3737

3838
steps:
39-
- uses: actions/checkout@v1
39+
- uses: actions/checkout@v2
4040
with:
4141
submodules: true
4242
- name: Set Git User
@@ -45,6 +45,12 @@ jobs:
4545
run: |
4646
git config --global user.email "[email protected]"
4747
git config --global user.name "Dummy User"
48+
- name: Unset header
49+
# checkout@v2 adds a header that makes branch protection report errors
50+
# because the Github action bot is not a collaborator on the repo
51+
run: git config --local --unset http.https://github.com/.extraheader
52+
- name: Fetch tags
53+
run: git fetch --prune --unshallow
4854
- name: install dependencies
4955
run: |
5056
sudo apt-get update
@@ -146,14 +152,14 @@ jobs:
146152
steps:
147153
- uses: actions/checkout@v2
148154
- name: Download version file
149-
uses: actions/download-artifact@v2
155+
uses: actions/download-artifact@v4
150156
with:
151157
name: VersionFile
152158
path: mrtrix3_version.txt
153159
- name: Extract Mrtrix version
154160
run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV
155161
- name: Download auto-gen pydra
156-
uses: actions/download-artifact@v2
162+
uses: actions/download-artifact@v4
157163
with:
158164
name: AutoGen
159165
path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }}
@@ -202,22 +208,22 @@ jobs:
202208
- name: Fetch tags
203209
run: git fetch --prune --unshallow
204210
- name: Download version file
205-
uses: actions/download-artifact@v2
211+
uses: actions/download-artifact@v4
206212
with:
207213
name: VersionFile
208214
path: mrtrix3_version.txt
209215
- name: Extract Mrtrix version
210216
run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV
211217
- name: Download auto-gen pydra
212-
uses: actions/download-artifact@v2
218+
uses: actions/download-artifact@v4
213219
with:
214220
name: AutoGen
215221
path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }}
216222
- name: Strip auto package from gitignore so it is included in package
217223
run: |
218224
sed -i '/\/pydra\/tasks\/mrtrix3\/${{ env.SUBPKG_NAME }}/d' .gitignore
219225
- name: Download MRtrix3 install
220-
uses: actions/download-artifact@v2
226+
uses: actions/download-artifact@v4
221227
with:
222228
name: MRtrix3
223229
path: ${{ env.MRTRIX_INSTALL}}
@@ -242,7 +248,7 @@ jobs:
242248
-e '.[test]'
243249
- name: Test with pytest
244250
run: pytest -sv pydra/tasks/mrtrix3 --cov pydra.tasks.mrtrix3 --cov-report xml
245-
- uses: codecov/codecov-action@v1
251+
- uses: codecov/codecov-action@v2
246252
if: ${{ always() }}
247253

248254
deploy-fileformats:
@@ -253,6 +259,10 @@ jobs:
253259
with:
254260
submodules: recursive
255261
fetch-depth: 0
262+
- name: Unset header
263+
# checkout@v2 adds a header that makes branch protection report errors
264+
# because the Github action bot is not a collaborator on the repo
265+
run: git config --local --unset http.https://github.com/.extraheader
256266
- name: Set up Python
257267
uses: actions/setup-python@v4
258268
with:
@@ -285,6 +295,10 @@ jobs:
285295
with:
286296
submodules: recursive
287297
fetch-depth: 0
298+
- name: Unset header
299+
# checkout@v2 adds a header that makes branch protection report errors
300+
# because the Github action bot is not a collaborator on the repo
301+
run: git config --local --unset http.https://github.com/.extraheader
288302
- name: Set up Python
289303
uses: actions/setup-python@v4
290304
with:
@@ -320,15 +334,19 @@ jobs:
320334
run: |
321335
git config --local user.email "[email protected]"
322336
git config --local user.name "GitHub Action"
337+
- name: Unset header
338+
# checkout@v2 adds a header that makes branch protection report errors
339+
# because the Github action bot is not a collaborator on the repo
340+
run: git config --local --unset http.https://github.com/.extraheader
323341
- name: Download version file
324-
uses: actions/download-artifact@v2
342+
uses: actions/download-artifact@v4
325343
with:
326344
name: VersionFile
327345
path: mrtrix3_version.txt
328346
- name: Extract Mrtrix version
329347
run: echo "MRTRIX_VERSION=$(cat mrtrix3_version.txt)" >> $GITHUB_ENV
330348
- name: Download auto-gen pydra
331-
uses: actions/download-artifact@v2
349+
uses: actions/download-artifact@v4
332350
with:
333351
name: AutoGen
334352
path: pydra/tasks/mrtrix3/${{ env.SUBPKG_NAME }}

pyproject.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,12 @@ per-file-ignores = ["__init__.py:F401"]
7979
max-line-length = 88
8080
select = "C,E,F,W,B,B950"
8181
extend-ignore = ['E203', 'E501', 'E129', 'W503']
82+
83+
84+
[tool.mypy]
85+
python_version = "3.8"
86+
ignore_missing_imports = true
87+
strict = true
88+
namespace_packages = true
89+
explicit_package_bases = true
90+
exclude = ["tests", "scripts", "docs", "build", "dist"]

related-packages/fileformats/fileformats/medimage_mrtrix3/in_out.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import sys
22
import typing as ty
3-
from fileformats.application import Dicom
43
from fileformats.medimage import (
4+
DicomImage,
55
DicomDir,
66
NiftiGzX,
77
NiftiGz,
@@ -40,7 +40,7 @@
4040
ImageFormatB,
4141
ImageFormatGzB,
4242
ImageHeaderB,
43-
Dicom,
43+
DicomImage,
4444
DicomDir,
4545
NiftiGzX,
4646
NiftiGz,

0 commit comments

Comments
 (0)