Skip to content

Commit 17b0fa7

Browse files
authored
Merge pull request #10 from effigies/doc/readme
DOC: Flesh out README
2 parents 288e227 + 4a8a860 commit 17b0fa7

File tree

1 file changed

+71
-11
lines changed

1 file changed

+71
-11
lines changed

README.md

Lines changed: 71 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,82 @@
11
# Intent of this template
22

3-
The intent of this repo is to help you get started with creating Pydra tasks.
4-
All tasks will be inserted into pydra.tasks.<yourtaskpackagename> namespace.
3+
The intent of this repository is to help you get started with creating Pydra tasks.
4+
All tasks will be inserted into the `pydra.tasks.<yourtaskpackagename>` namespace.
55

6-
# To use this template:
6+
# To use this template
77

88
1. Click on new repo.
9-
2. Select this template from the repository template drop down list.
10-
3. Give your repo a name.
11-
4. Once the repo is created and cloned, search for TODO (`grep -rn TODO . `) and
12-
replace with appropriate name.
13-
5. One of the folders is called TODO. This should also be renamed to your package
9+
1. Select this template from the repository template drop down list.
10+
1. Give your repo a name.
11+
1. Once the repo is created and cloned, search for TODO (`grep -rn TODO . `) and
12+
replace with appropriate name.
13+
1. One of the folders is called TODO. This should also be renamed to your package
1414
name.
15-
6. Add tasks to the pydra/tasks/<yourpackagename> folder.
16-
7. You may want to initialize a sphinx docs directory.
15+
1. Add tasks to the `pydra/tasks/<yourpackagename>` folder.
16+
1. You may want to initialize a [Sphinx] docs directory.
17+
1. **Update this README after creating the new repository.**
1718

18-
# TODO: Change this README after creating your new repo.
19+
[Sphinx]: https://www.sphinx-doc.org/en/master/usage/quickstart.html
1920

21+
# Features of this template
22+
23+
## Versioneer
24+
25+
The [versioneer](https://github.com/warner/python-versioneer) tool allows for versioning based
26+
on the most recent git tag. The release process can thus be:
27+
28+
```Shell
29+
git tag -a 1.0.0
30+
python setup.py sdist bdist_wheel
31+
twine upload dist/*
32+
```
33+
34+
Note that we assume tags will be version numbers and not be prefixed with `v` or some other
35+
string. See Versioneer documentation for alternative configurations.
36+
37+
## Namespace packages
38+
39+
[Namespace packages] allow multiple packages to be installed in such a way that they can be
40+
imported from a common namespace. In this case, the base namespace is `pydra.tasks`, and each
41+
task package installs a new module, such as `pydra.tasks.afni`.
42+
43+
To do correctly, task packages **must not** interfere with files higher in the hierarchy.
44+
This includes adding `__init__.py` files in either `pydra` or `pydra/tasks`.
45+
46+
[Namespace packages]: https://www.python.org/dev/peps/pep-0420/
47+
48+
## Tests
49+
50+
This package comes with a default set of test modules, and we encourage users to use pytest.
51+
Tests can be discovered and run using:
52+
53+
```
54+
pytest --doctest-modules pydra/tasks/*
55+
```
56+
57+
## Continuous integration
58+
59+
This template uses [GitHub Actions](https://docs.github.com/en/actions/) to run tests. To simulate
60+
several plausible development or installation environments, we test over all Python versions
61+
supported by Pydra, and install Pydra and the current package in both standard and
62+
[editable](https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs) modes.
63+
64+
The combination of standard/editable is in particular designed to ensure that namespace packaging
65+
does not break. We strongly recommend keeping these tests in place for this reason, as one
66+
non-compliant package can potentially affect Pydra or other task packages.
67+
68+
In addition to verifying installations do not break or conflict, pytest is run on the package,
69+
including all tests found in `test/` directories and [doctests].
70+
71+
[doctests]: https://docs.python.org/3/library/doctest.html
72+
73+
# Contributing to this template
74+
75+
This template repository is periodically updated as we establish and best practices for task
76+
packages. We welcome contributions from the community to help set a solid baseline for all
77+
task packages.
78+
79+
# Sample post-setup README contents
2080

2181
## For developers
2282

0 commit comments

Comments
 (0)