Skip to content

Commit 9cd69f6

Browse files
authored
Add more svgs and improve the documentation. (#256)
1 parent 2bd6e55 commit 9cd69f6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+1712
-984
lines changed

.pre-commit-config.yaml

+31-7
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,39 @@ repos:
6767
pydocstyle,
6868
Pygments,
6969
]
70-
- repo: https://github.com/PyCQA/doc8
71-
rev: 0.11.1
70+
- repo: https://github.com/executablebooks/mdformat
71+
rev: 0.7.14
7272
hooks:
73-
- id: doc8
74-
- repo: https://github.com/asottile/blacken-docs
75-
rev: v1.12.1
73+
- id: mdformat
74+
additional_dependencies: [
75+
mdformat-gfm,
76+
mdformat-black,
77+
]
78+
args: [--wrap, "88"]
79+
files: (README\.md)
80+
- repo: https://github.com/executablebooks/mdformat
81+
rev: 0.7.14
7682
hooks:
77-
- id: blacken-docs
78-
additional_dependencies: [black==22.3.0]
83+
- id: mdformat
84+
additional_dependencies: [
85+
mdformat-myst,
86+
mdformat-black,
87+
]
88+
args: [--wrap, "88"]
89+
files: (docs/.)
90+
exclude: |
91+
(?x)^(
92+
docs/source/how_to_guides/bp_structure_of_task_files.md|
93+
docs/source/how_to_guides/how_to_influence_build_order.md|
94+
docs/source/how_to_guides/repeating_tasks_with_different_inputs_the_pytest_way.md|
95+
docs/source/reference_guides/hookspecs.md|
96+
docs/source/tutorials/configuration.md|
97+
docs/source/tutorials/defining_dependencies_products.md|
98+
docs/source/tutorials/making_tasks_persist.md|
99+
docs/source/tutorials/repeating_tasks_with_different_inputs.md|
100+
docs/source/tutorials/selecting_tasks.md|
101+
docs/source/tutorials/set_up_a_project.md
102+
)$
79103
- repo: https://github.com/econchick/interrogate
80104
rev: 1.5.0
81105
hooks:

README.md

+36-33
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
</p>
55
</a>
66

7-
------------------------------------------------------------------------
7+
______________________________________________________________________
88

99
<!-- Keep in sync with docs/source/index.md -->
1010

@@ -15,40 +15,35 @@
1515
[![PyPI - License](https://img.shields.io/pypi/l/pytask)](https://pypi.org/project/pytask)
1616
[![image](https://readthedocs.org/projects/pytask-dev/badge/?version=latest)](https://pytask-dev.readthedocs.io/en/stable)
1717
[![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)
1919
[![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)
2020
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
2121

2222
<!-- Keep in sync with docs/source/index.md -->
2323

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:
2726

2827
- **Automatic discovery of tasks.**
2928
- **Lazy evaluation.** If a task, its dependencies, and its products have not changed,
3029
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)
3635
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).
4138
- **Easily extensible with plugins**. pytask is built on top of
4239
[pluggy](https://pluggy.readthedocs.io/en/latest/), a plugin management framework,
4340
which allows you to adjust pytask to your needs. Plugins are available for
4441
[parallelization](https://github.com/pytask-dev/pytask-parallel),
4542
[LaTeX](https://github.com/pytask-dev/pytask-latex),
4643
[R](https://github.com/pytask-dev/pytask-r), and
4744
[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).
5247

5348
# Installation
5449

@@ -73,8 +68,8 @@ installed via the [Microsoft Store](https://aka.ms/terminal).
7368

7469
To quickly set up a new project, use the
7570
[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).
7873

7974
# Usage
8075

@@ -94,13 +89,12 @@ def task_hello_earth(produces):
9489

9590
Here are some details:
9691

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"`.
10498

10599
To execute the task, enter `pytask` on the command-line
106100

@@ -110,8 +104,8 @@ To execute the task, enter `pytask` on the command-line
110104

111105
The documentation can be found under <https://pytask-dev.readthedocs.io/en/stable> with
112106
[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).
115109

116110
# Changes
117111

@@ -124,10 +118,19 @@ pytask is distributed under the terms of the [MIT license](LICENSE).
124118

125119
# Acknowledgment
126120

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).
131134

132135
# Citation
133136

docs/rtd_environment.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ channels:
33
- nodefaults
44

55
dependencies:
6-
- python >= 3.7
6+
- python >=3.7
77
- pip
88
- setuptools_scm
99
- toml
@@ -14,7 +14,6 @@ dependencies:
1414
- nbsphinx
1515
- myst-parser
1616
- sphinx
17-
- sphinx-autoapi
1817
- sphinx-click
1918
- sphinx-copybutton
2019
- sphinx-panels

docs/source/_static/images/capture.svg

+1-1
Loading

docs/source/_static/images/collect-nodes.svg

+8-8
Loading

docs/source/_static/images/collect.svg

+1-1
Loading

0 commit comments

Comments
 (0)