Skip to content

Commit 2cf8953

Browse files
committed
updated tasks template to include v1 and latest sub-packages
1 parent 7f8ef49 commit 2cf8953

File tree

5 files changed

+11
-5
lines changed

5 files changed

+11
-5
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,4 +135,4 @@ dmypy.json
135135
.vscode
136136

137137
# Mac garbarge
138-
.DS_store
138+
.DS_store

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,14 @@ All tasks will be inserted into the `pydra.tasks.<yourtaskpackagename>` namespac
1212
replace with appropriate name.
1313
1. One of the folders is called CHANGEME. This should also be renamed to your package
1414
name.
15-
1. Add tasks to the `pydra/tasks/<yourpackagename>` folder.
16-
1. An example subpackage is found in `pydra/tasks/<yourpackagename>/utils`.
17-
You may wish to add tools to it or delete it.
15+
1. Under the newly renamed package (i.e. formerly CHANGME) there is a directory named "v1",
16+
`pydra/tasks/<package-name>/v1`, change this to valid Python package name starting with
17+
'v' to indicate the version of the tool the Pydra interfaces will be designed for,
18+
e.g. FSL v6.0.2 could be `pydra/tasks/fsl/v6` or `pydra/tasks/fsl/v6_0` depending on
19+
how stable the CLI of the tool is between minor versions.
20+
1. Edit `pydra/tasks/<package-name>/latest`, change the line `from .v1 import *` to refer
21+
to the `v<package-version>` module, e.g. `from .v6 import *`
22+
1. Add tasks to the `pydra/tasks/<package-name>/v<package-version>` folder.
1823
1. You may want to initialize a [Sphinx] docs directory.
1924
1. Review the workflow in `.github/workflows/pythonpackage.yml`. Testing editable installations
2025
is probably not useful unless you are reconfiguring namespace packages.

pydra/tasks/CHANGEME/latest.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
from .v1 import * # noqa

pydra/tasks/CHANGEME/v1/__init__.py

Whitespace-only changes.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ignore-words = ".codespell-ignorewords"
6666
[tool.flake8]
6767
doctests = true
6868
per-file-ignores = [
69-
"__init__.py:F401"
69+
"__init__.py:F401,F403"
7070
]
7171
max-line-length = 88
7272
select = "C,E,F,W,B,B950"

0 commit comments

Comments
 (0)