Skip to content

Commit 7ade266

Browse files
authored
Convert readme to markdown and pngs to svgs. (#255)
1 parent 14f01d3 commit 7ade266

Some content is hidden

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

51 files changed

+2217
-230
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ _generated
1919
build
2020
dist
2121
src/_pytask/_version.py
22+
*.pkl

.pre-commit-config.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,13 @@ repos:
7575
rev: v1.12.1
7676
hooks:
7777
- id: blacken-docs
78-
additional_dependencies: [black==22.1.0]
78+
additional_dependencies: [black==22.3.0]
7979
- repo: https://github.com/econchick/interrogate
8080
rev: 1.5.0
8181
hooks:
8282
- id: interrogate
8383
args: [-v, --fail-under=75]
84-
exclude: ^(tests/|docs/)
84+
exclude: ^(tests/|docs/|scripts/)
8585
- repo: https://github.com/codespell-project/codespell
8686
rev: v2.1.0
8787
hooks:

README.md

+144
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,144 @@
1+
<a href="https://pytask-dev.readthedocs.io/en/stable">
2+
<p align="center">
3+
<img src="https://raw.githubusercontent.com/pytask-dev/pytask/main/docs/source/_static/images/pytask_w_text.png" width=50% alt="pytask">
4+
</p>
5+
</a>
6+
7+
------------------------------------------------------------------------
8+
9+
<!-- Keep in sync with docs/source/index.md -->
10+
11+
[![PyPI](https://img.shields.io/pypi/v/pytask?color=blue)](https://pypi.org/project/pytask)
12+
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pytask)](https://pypi.org/project/pytask)
13+
[![image](https://img.shields.io/conda/vn/conda-forge/pytask.svg)](https://anaconda.org/conda-forge/pytask)
14+
[![image](https://img.shields.io/conda/pn/conda-forge/pytask.svg)](https://anaconda.org/conda-forge/pytask)
15+
[![PyPI - License](https://img.shields.io/pypi/l/pytask)](https://pypi.org/project/pytask)
16+
[![image](https://readthedocs.org/projects/pytask-dev/badge/?version=latest)](https://pytask-dev.readthedocs.io/en/stable)
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)
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+
[![image](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
21+
22+
<!-- Keep in sync with docs/source/index.md -->
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:
27+
28+
- **Automatic discovery of tasks.**
29+
- **Lazy evaluation.** If a task, its dependencies, and its products have not changed,
30+
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)
36+
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.
41+
- **Easily extensible with plugins**. pytask is built on top of
42+
[pluggy](https://pluggy.readthedocs.io/en/latest/), a plugin management framework,
43+
which allows you to adjust pytask to your needs. Plugins are available for
44+
[parallelization](https://github.com/pytask-dev/pytask-parallel),
45+
[LaTeX](https://github.com/pytask-dev/pytask-latex),
46+
[R](https://github.com/pytask-dev/pytask-r), and
47+
[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).
52+
53+
# Installation
54+
55+
<!-- Keep in sync with docs/source/tutorials/installation.md -->
56+
57+
pytask is available on [PyPI](https://pypi.org/project/pytask) and on
58+
[Anaconda.org](https://anaconda.org/conda-forge/pytask). Install the package with
59+
60+
```console
61+
$ pip install pytask
62+
```
63+
64+
or
65+
66+
```console
67+
$ conda install -c conda-forge pytask
68+
```
69+
70+
Color support is automatically available on non-Windows platforms. On Windows, please,
71+
use [Windows Terminal](https://github.com/microsoft/terminal) which can be, for example,
72+
installed via the [Microsoft Store](https://aka.ms/terminal).
73+
74+
To quickly set up a new project, use the
75+
[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).
78+
79+
# Usage
80+
81+
A task is a function which is detected if the module and the function name are prefixed
82+
with `task_`. Here is an example.
83+
84+
```python
85+
# Content of task_hello.py.
86+
87+
import pytask
88+
89+
90+
@pytask.mark.produces("hello_earth.txt")
91+
def task_hello_earth(produces):
92+
produces.write_text("Hello, earth!")
93+
```
94+
95+
Here are some details:
96+
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"`.
104+
105+
To execute the task, enter `pytask` on the command-line
106+
107+
![image](https://github.com/pytask-dev/pytask/raw/main/docs/source/_static/images/readme.svg)
108+
109+
# Documentation
110+
111+
The documentation can be found under <https://pytask-dev.readthedocs.io/en/stable> with
112+
[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).
115+
116+
# Changes
117+
118+
Consult the [release notes](https://pytask-dev.readthedocs.io/en/stable/changes.html) to
119+
find out about what is new.
120+
121+
# License
122+
123+
pytask is distributed under the terms of the [MIT license](LICENSE).
124+
125+
# Acknowledgment
126+
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!
131+
132+
# Citation
133+
134+
If you rely on pytask to manage your research project, please cite it with the following
135+
key to help others to discover the tool.
136+
137+
```bibtex
138+
@Unpublished{Raabe2020,
139+
Title = {A Python tool for managing scientific workflows.},
140+
Author = {Tobias Raabe},
141+
Year = {2020},
142+
Url = {https://github.com/pytask-dev/pytask}
143+
}
144+
```

README.rst

-192
This file was deleted.

0 commit comments

Comments
 (0)