Skip to content

Commit b1f8c3e

Browse files
committed
update testing integration, packages, precommit
1 parent c9ad3dd commit b1f8c3e

File tree

4 files changed

+96
-2
lines changed

4 files changed

+96
-2
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
#This workflow will install Python dependencies, run tests and lint with a variety of Python versions
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
3+
4+
name: Python package
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
pull_request:
10+
branches: [ master ]
11+
12+
jobs:
13+
build:
14+
15+
runs-on: ubuntu-latest
16+
strategy:
17+
matrix:
18+
python-version: [3.7, 3.8]
19+
20+
steps:
21+
- uses: actions/checkout@v2
22+
- name: Set up Python ${{ matrix.python-version }}
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: ${{ matrix.python-version }}
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install ".[dev]"
30+
- name: Test with pytest
31+
run: |
32+
pytest -sv --doctest-modules pydra/tasks/TODO

.pre-commit-config.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# See https://pre-commit.com for more information
2+
# See https://pre-commit.com/hooks.html for more hooks
3+
repos:
4+
- repo: https://github.com/pre-commit/pre-commit-hooks
5+
rev: v2.0.0
6+
hooks:
7+
- id: trailing-whitespace
8+
- id: end-of-file-fixer
9+
- id: check-yaml
10+
- id: check-added-large-files
11+
- repo: https://github.com/psf/black
12+
rev: 19.3b0
13+
hooks:
14+
- id: black

README.md

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ All tasks will be inserted into pydra.tasks.<yourtaskpackagename> namespace.
1111
4. Once the repo is created search for TODO and replace with appropriate name.
1212
4b. One of the folders is called TODO. This should be renamed to your package
1313
name.
14-
5. Add tasks to the pydra/tasks/<yourpackagename> folder
14+
5. Add tasks to the pydra/tasks/<yourpackagename> folder.
15+
6. You may want to initialize a sphinx docs directory.
1516

16-
# TODO: Change this README after creating your new repo.
17+
# TODO: Change this README after creating your new repo.
18+
19+
20+
## For developers
21+
22+
Install repo in developer mode from the source directory. It is also useful to
23+
install pre-commit to take care of styling via black:
24+
25+
```
26+
pip install -e .[dev]
27+
pre-commit install
28+
```

setup.cfg

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,44 @@ description = TODO
1010
python_requires = >=3.7
1111
install_requires =
1212
pydra
13+
14+
test_requires =
15+
pytest >= 4.4.0
16+
pytest-cov
17+
pytest-env
18+
pytest-xdist
19+
pytest-rerunfailures
20+
codecov
21+
1322
packages = pydra/tasks/%(subpackage)s
1423

24+
[options.extras_require]
25+
doc =
26+
packaging
27+
sphinx >= 2.1.2
28+
sphinx_rtd_theme
29+
sphinxcontrib-apidoc ~= 0.3.0
30+
sphinxcontrib-napoleon
31+
sphinxcontrib-versioning
32+
docs =
33+
%(doc)s
34+
test =
35+
pytest >= 4.4.0
36+
pytest-cov
37+
pytest-env
38+
pytest-xdist
39+
pytest-rerunfailures
40+
codecov
41+
tests =
42+
%(test)s
43+
dev =
44+
%(test)s
45+
black
46+
pre-commit
47+
all =
48+
%(doc)s
49+
%(dev)s
50+
1551
[versioneer]
1652
VCS = git
1753
style = pep440

0 commit comments

Comments
 (0)