Skip to content

Commit f8a1adb

Browse files
authored
Merge pull request #16 from nipype/new-syntax
Updates to match new pydra syntax
2 parents e5de395 + ebd360e commit f8a1adb

File tree

9 files changed

+407
-1094
lines changed

9 files changed

+407
-1094
lines changed

.github/workflows/pythonpackage.yml renamed to .github/workflows/ci-cd.yml

Lines changed: 21 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -18,40 +18,12 @@ on:
1818
branches: [ main ]
1919

2020
jobs:
21-
devcheck:
22-
runs-on: ubuntu-latest
23-
strategy:
24-
matrix:
25-
python-version: [3.7, 3.9] # Check oldest and newest versions
26-
pip-flags: ['', '--editable']
27-
pydra:
28-
- 'pydra'
29-
- '--editable git+https://github.com/nipype/pydra.git#egg=pydra'
30-
31-
steps:
32-
- uses: actions/checkout@v2
33-
- name: Set up Python ${{ matrix.python-version }}
34-
uses: actions/setup-python@v2
35-
with:
36-
python-version: ${{ matrix.python-version }}
37-
- name: Install build dependencies
38-
run: |
39-
python -m pip install --upgrade pip
40-
- name: Install Pydra
41-
run: |
42-
pip install ${{ matrix.pydra }}
43-
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
44-
- name: Install task package
45-
run: |
46-
pip install ${{ matrix.pip-flags }} ".[dev]"
47-
python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
48-
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
4921

5022
test:
5123
runs-on: ubuntu-latest
5224
strategy:
5325
matrix:
54-
python-version: [3.7, 3.8, 3.9]
26+
python-version: [3.11, 3.12, 3.13]
5527

5628
steps:
5729
- uses: actions/checkout@v2
@@ -65,41 +37,46 @@ jobs:
6537
- name: Install task package
6638
run: |
6739
pip install ".[test]"
68-
python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
69-
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
40+
- name: Install development Pydra and fileformats-medimage
41+
run: |
42+
pip uninstall pydra fileformats-medimage -y
43+
pip install --no-deps git+https://github.com/nipype/pydra.git@new-syntax
44+
pip install --no-deps git+https://github.com/arcanaframework/fileformats-medimage.git@pydra-syntax-changes
7045
- name: Test with pytest
7146
run: |
72-
pytest -sv --doctest-modules pydra/tasks/$SUBPACKAGE \
73-
--cov pydra.tasks.$SUBPACKAGE --cov-report xml
47+
pytest -sv --cov pydra.tasks.$SUBPACKAGE --cov-report xml
7448
- uses: codecov/codecov-action@v1
7549
if: ${{ always() }}
7650

77-
7851
deploy:
79-
needs: [devcheck, test]
52+
needs: [test]
8053
runs-on: ubuntu-latest
8154
strategy:
8255
matrix:
8356
python-version: [3.9]
8457
steps:
85-
- uses: actions/checkout@v2
58+
- uses: actions/checkout@v3
8659
with:
8760
submodules: recursive
8861
fetch-depth: 0
89-
- name: Set up Python ${{ matrix.python-version }}
90-
uses: actions/setup-python@v2
62+
- name: Unset header
63+
# checkout@v2 adds a header that makes branch protection report errors
64+
# because the Github action bot is not a collaborator on the repo
65+
run: git config --local --unset http.https://github.com/.extraheader
66+
- name: Set up Python
67+
uses: actions/setup-python@v3
9168
with:
92-
python-version: ${{ matrix.python-version }}
69+
python-version: '3.12'
9370
- name: Install build tools
94-
run: python -m pip install --upgrade pip setuptools wheel twine
71+
run: python3 -m pip install --break-system-packages build twine
9572
- name: Build source and wheel distributions
96-
run: python setup.py sdist bdist_wheel
73+
run: python3 -m build .
9774
- name: Check distributions
9875
run: twine check dist/*
99-
- uses: actions/upload-artifact@v2
76+
- uses: actions/upload-artifact@v4
10077
with:
101-
name: distributions
102-
path: dist/
78+
name: built
79+
path: /dist
10380
# Deploy on tags if PYPI_API_TOKEN is defined in the repository secrets.
10481
# Secrets are not accessible in the if: condition [0], so set an output variable [1]
10582
# [0] https://github.community/t/16928

pydra/tasks/dcm2niix/__init__.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
>>> import pydra.engine
66
>>> import pydra.tasks.dcm2niix
77
"""
8-
from ._version import get_versions
98

10-
__version__ = get_versions()["version"]
11-
del get_versions
9+
from ._version import __version__
1210

1311
from .utils import Dcm2Niix

0 commit comments

Comments
 (0)