4
4
</p>
5
5
</a >
6
6
7
- ------------------------------------------------------------------------
7
+ ______________________________________________________________________
8
8
9
9
<!-- Keep in sync with docs/source/index.md -->
10
10
15
15
[ ![ PyPI - License] ( https://img.shields.io/pypi/l/pytask )] ( https://pypi.org/project/pytask )
16
16
[ ![ image] ( https://readthedocs.org/projects/pytask-dev/badge/?version=latest )] ( https://pytask-dev.readthedocs.io/en/stable )
17
17
[ ![ image] ( https://img.shields.io/github/workflow/status/pytask-dev/pytask/main/main )] ( https://github.com/pytask-dev/pytask/actions?query=branch%3Amain )
18
- [ ![ image] ( https://codecov.io/gh/pytask-dev/pytask/branch/main/graph/badge.svg )] ( https://codecov.io/gh/pytask-dev/pytask )
18
+ [ ![ image] ( https://codecov.io/gh/pytask-dev/pytask/branch/main/graph/badge.svg )] ( https://app. codecov.io/gh/pytask-dev/pytask )
19
19
[ ![ pre-commit.ci status] ( https://results.pre-commit.ci/badge/github/pytask-dev/pytask/main.svg )] ( https://results.pre-commit.ci/latest/github/pytask-dev/pytask/main )
20
20
[ ![ image] ( https://img.shields.io/badge/code%20style-black-000000.svg )] ( https://github.com/psf/black )
21
21
22
22
<!-- Keep in sync with docs/source/index.md -->
23
23
24
- In its highest aspirations, pytask tries to be pytest as a build system. It\' s main
25
- purpose is to facilitate reproducible research by automating workflows in research
26
- projects. Its features include:
24
+ pytask is a workflow management system which facilitates reproducible data analyses. Its
25
+ features include:
27
26
28
27
- ** Automatic discovery of tasks.**
29
28
- ** Lazy evaluation.** If a task, its dependencies, and its products have not changed,
30
29
do not execute it.
31
- - ** Debug mode.** [ Jump into the
32
- debugger] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/how_to_debug .html ) if
33
- a task fails, get feedback quickly, and be more productive.
34
- - ** Repeat a task with different inputs.** [ Loop over task
35
- functions] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/repeating_tasks_with_different_inputs.html )
30
+ - ** Debug mode.**
31
+ [ Jump into the debugger] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/debugging .html )
32
+ if a task fails, get feedback quickly, and be more productive.
33
+ - ** Repeat a task with different inputs.**
34
+ [ Loop over task functions] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/repeating_tasks_with_different_inputs.html )
36
35
to run the same task with different inputs.
37
- - ** Select tasks via expressions.** Run only a subset of tasks with [ expressions and
38
- marker
39
- expressions] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/selecting_tasks.html )
40
- known from pytest.
36
+ - ** Select tasks via expressions.** Run only a subset of tasks with
37
+ [ expressions and marker expressions] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/selecting_tasks.html ) .
41
38
- ** Easily extensible with plugins** . pytask is built on top of
42
39
[ pluggy] ( https://pluggy.readthedocs.io/en/latest/ ) , a plugin management framework,
43
40
which allows you to adjust pytask to your needs. Plugins are available for
44
41
[ parallelization] ( https://github.com/pytask-dev/pytask-parallel ) ,
45
42
[ LaTeX] ( https://github.com/pytask-dev/pytask-latex ) ,
46
43
[ R] ( https://github.com/pytask-dev/pytask-r ) , and
47
44
[ Stata] ( https://github.com/pytask-dev/pytask-stata ) and more can be found
48
- [ here] ( https://github.com/topics/pytask ) . Read in [ this
49
- tutorial] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/how_to_use_plugins.html )
50
- how to use and create plugins with a
51
- [ cookiecutter] ( https://github.com/pytask-dev/cookiecutter-pytask-plugin ) .
45
+ [ here] ( https://github.com/topics/pytask ) . Learn more about plungins in
46
+ [ this tutorial] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/plugins.html ) .
52
47
53
48
# Installation
54
49
@@ -73,8 +68,8 @@ installed via the [Microsoft Store](https://aka.ms/terminal).
73
68
74
69
To quickly set up a new project, use the
75
70
[ cookiecutter-pytask-project] ( https://github.com/pytask-dev/cookiecutter-pytask-project )
76
- template or start from [ other templates or example
77
- projects] ( https://pytask-dev.readthedocs.io/en/stable/how_to_guides/bp_templates_and_projects.html ) .
71
+ template or start from
72
+ [ other templates or example projects] ( https://pytask-dev.readthedocs.io/en/stable/how_to_guides/bp_templates_and_projects.html ) .
78
73
79
74
# Usage
80
75
@@ -94,13 +89,12 @@ def task_hello_earth(produces):
94
89
95
90
Here are some details:
96
91
97
- - Dependencies and products of a task are tracked via markers. For dependencies use
98
- ` @pytask.mark.depends_on ` and for products use ` @pytask.mark.produces ` . Use strings
99
- and ` pathlib.Path ` to specify the location. Pass multiple dependencies or products
100
- as a list or a dictionary for positional or key-based access.
101
- - With ` produces ` (and ` depends_on ` ) as function arguments, you get access to the
102
- dependencies and products inside the function via ` pathlib.Path ` objects. Here,
103
- ` produces ` holds the path to ` "hello_earth.txt" ` .
92
+ - Dependencies and products of a task are tracked via markers. For dependencies use
93
+ ` @pytask.mark.depends_on ` and for products use ` @pytask.mark.produces ` . Use strings
94
+ and ` pathlib.Path ` to specify the location.
95
+ - Use ` produces ` (and ` depends_on ` ) as function arguments to access the paths of the
96
+ dependencies and products inside the function. All values are converted to
97
+ ` pathlib.Path ` 's. Here, ` produces ` holds the path to ` "hello_earth.txt" ` .
104
98
105
99
To execute the task, enter ` pytask ` on the command-line
106
100
@@ -110,8 +104,8 @@ To execute the task, enter `pytask` on the command-line
110
104
111
105
The documentation can be found under < https://pytask-dev.readthedocs.io/en/stable > with
112
106
[ tutorials] ( https://pytask-dev.readthedocs.io/en/stable/tutorials/index.html ) and guides
113
- for [ best
114
- practices] ( https://pytask-dev.readthedocs.io/en/stable/how_to_guides/index.html ) .
107
+ for
108
+ [ best practices] ( https://pytask-dev.readthedocs.io/en/stable/how_to_guides/index.html ) .
115
109
116
110
# Changes
117
111
@@ -124,10 +118,19 @@ pytask is distributed under the terms of the [MIT license](LICENSE).
124
118
125
119
# Acknowledgment
126
120
127
- The license also includes a copyright and permission notice from pytest since some
128
- modules, classes, and functions are copied from pytest. Not to mention how pytest has
129
- inspired the development of pytask in general. Without the amazing work of Holger Krekel
130
- and pytest\' s many contributors, this project would not have been possible. Thank you!
121
+ The license also includes a copyright and permission notice from
122
+ [ pytest] ( https://github.com/pytest-dev/pytest ) since some modules, classes, and
123
+ functions are copied from pytest. Not to mention how pytest has inspired the development
124
+ of pytask in general. Without the amazing work of
125
+ [ Holger Krekel] ( https://github.com/hpk42 ) and pytest's many contributors, this project
126
+ would not have been possible. Thank you!
127
+
128
+ pytask ows its beautiful appearance on the command line to
129
+ [ rich] ( https://github.com/Textualize/rich ) written by
130
+ [ Will McGugan] ( https://github.com/willmcgugan ) .
131
+
132
+ Repeating tasks in loops is inspired by [ ward] ( https://github.com/darrenburns/ward )
133
+ written by [ Darren Burns] ( https://github.com/darrenburns ) .
131
134
132
135
# Citation
133
136
0 commit comments