Skip to content

Commit 7d84646

Browse files
committed
ENH: Conform skeleton to template
1 parent 7d8f09e commit 7d84646

File tree

5 files changed

+62
-18
lines changed

5 files changed

+62
-18
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33

44
name: Python package
55

6+
# Set once
7+
env:
8+
SUBPACKAGE: nipype1
9+
610
on:
711
push:
812
branches: [ master ]
@@ -11,22 +15,33 @@ on:
1115

1216
jobs:
1317
build:
14-
1518
runs-on: ubuntu-latest
1619
strategy:
1720
matrix:
1821
python-version: [3.7, 3.8]
22+
pip-flags: ['', '--editable']
23+
pydra:
24+
- 'pydra'
25+
- '--editable git+https://github.com/nipype/pydra.git#egg=pydra'
1926

2027
steps:
2128
- uses: actions/checkout@v2
2229
- name: Set up Python ${{ matrix.python-version }}
2330
uses: actions/setup-python@v2
2431
with:
2532
python-version: ${{ matrix.python-version }}
26-
- name: Install dependencies
33+
- name: Install build dependencies
2734
run: |
2835
python -m pip install --upgrade pip
29-
pip install ".[dev]"
36+
- name: Install Pydra
37+
run: |
38+
pip install ${{ matrix.pydra }}
39+
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
40+
- name: Install task package
41+
run: |
42+
pip install ${{ matrix.pip-flags }} ".[dev]"
43+
python -c "import pydra.tasks.$SUBPACKAGE as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
44+
python -c "import pydra as m; print(f'{m.__name__} {m.__version__} @ {m.__file__}')"
3045
- name: Test with pytest
3146
run: |
32-
pytest -sv --doctest-modules pydra/tasks/nipype1
47+
pytest -sv --doctest-modules pydra/tasks/$SUBPACKAGE

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright [yyyy] [name of copyright owner]
189+
Copyright 2020 Nipype developers
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## For developers
2+
3+
Install repo in developer mode from the source directory. It is also useful to
4+
install pre-commit to take care of styling via black:
5+
6+
```
7+
pip install -e .[dev]
8+
pre-commit install
9+
```

setup.cfg

Lines changed: 25 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
[DEFAULT]
2+
subpackage = nipype1
3+
14
[metadata]
25
author = Chris Markiewicz
36
author_email = [email protected]
@@ -6,21 +9,37 @@ description = Tools for importing nipype 1.x interfaces into Pydra
69
[options]
710
python_requires = >=3.7
811
install_requires =
9-
pydra >= 0.6.1
12+
pydra >= 0.6.2
1013
nipype
11-
packages = pydra.tasks.nipype1
12-
namespace_packages = pydra.tasks
14+
15+
packages = pydra.tasks.%(subpackage)s
1316

1417
[options.extras_require]
18+
doc =
19+
packaging
20+
sphinx >= 2.1.2
21+
sphinx_rtd_theme
22+
sphinxcontrib-apidoc ~= 0.3.0
23+
sphinxcontrib-napoleon
24+
sphinxcontrib-versioning
25+
docs =
26+
%(doc)s
1527
test =
16-
pytest
28+
pytest >= 4.4.0
29+
tests =
30+
%(test)s
1731
dev =
1832
%(test)s
33+
black
34+
pre-commit
35+
all =
36+
%(doc)s
37+
%(dev)s
1938

2039
[versioneer]
2140
VCS = git
2241
style = pep440
23-
versionfile_source = pydra/tasks/nipype1/_version.py
24-
versionfile_build = pydra/tasks/nipype1/_version.py
42+
versionfile_source = pydra/tasks/%(subpackage)s/_version.py
43+
versionfile_build = pydra/tasks/%(subpackage)s/_version.py
2544
tag_prefix =
2645
parentdir_prefix =

setup.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
#!/usr/bin/env python
22
import sys
3-
import os
43

54
from setuptools import setup
65
import versioneer
76

87
# Give setuptools a hint to complain if it's too old a version
98
# 30.3.0 allows us to put most metadata in setup.cfg
109
# Should match pyproject.toml
11-
SETUP_REQUIRES = ['setuptools >= 30.3.0']
10+
SETUP_REQUIRES = ["setuptools >= 30.3.0"]
1211
# This enables setuptools to install wheel on-the-fly
13-
SETUP_REQUIRES += ['wheel'] if 'bdist_wheel' in sys.argv else []
12+
SETUP_REQUIRES += ["wheel"] if "bdist_wheel" in sys.argv else []
1413

1514
if __name__ == "__main__":
16-
setup(name='pydra-nipype1',
17-
setup_requires=SETUP_REQUIRES,
18-
version=versioneer.get_version(),
19-
cmdclass=versioneer.get_cmdclass())
15+
setup(
16+
name="pydra-nipype1",
17+
setup_requires=SETUP_REQUIRES,
18+
version=versioneer.get_version(),
19+
cmdclass=versioneer.get_cmdclass(),
20+
)

0 commit comments

Comments
 (0)