pytask

pytask is a workflow management system that facilitates reproducible data analyses.

https://github.com/pytask-dev/pytask

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.0%) to scientific vocabulary

Keywords

pytask reproducible-research scientific-workflows

Keywords from Contributors

interface mesh standards interpretability energy-system-model animations parallel exoplanet hack energy-system
Last synced: 6 months ago · JSON representation

Repository

pytask is a workflow management system that facilitates reproducible data analyses.

Basic Info
Statistics
  • Stars: 125
  • Watchers: 4
  • Forks: 11
  • Open Issues: 15
  • Releases: 56
Topics
pytask reproducible-research scientific-workflows
Created over 5 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog License Citation

README.md

pytask


PyPI PyPI - Python Version image image PyPI - License image image image pre-commit.ci status Ruff

pytask is a workflow management system that facilitates reproducible data analyses. Its features include:

  • Automatic discovery of tasks.
  • Lazy evaluation. If a task, its dependencies, and its products have not changed, do not execute it.
  • Debug mode. Jump into the debugger if a task fails, get feedback quickly, and be more productive.
  • Repeat a task with different inputs. Loop over task functions to run the same task with different inputs.
  • Select tasks via expressions. Run only a subset of tasks with expressions and marker expressions.
  • Easily extensible with plugins. pytask is built on pluggy, a plugin management framework that allows you to adjust pytask to your needs. Plugins are available for parallelization, LaTeX, R, and Stata and more can be found here. Learn more about plugins in this tutorial.

Installation

pytask is available on PyPI and on conda-forge. Install the package with

console $ uv add pytask

or

console $ pixi add pytask

or use pip, conda, or mamba if you like.

Color support is automatically available on non-Windows platforms. On Windows, please, use Windows Terminal, which can be, for example, installed via the Microsoft Store.

To quickly set up a new project, use the cookiecutter-pytask-project template or start from other templates or example projects.

Usage

A task is a function that is detected if the module and the function name are prefixed with task_. Here is an example.

```python

Content of task_hello.py.

from pathlib import Path

from pytask import Product from typing import Annotated

def taskhelloearth(path: Annotated[Path, Product] = Path("helloearth.txt")): path.writetext("Hello, earth!") ```

  • The purpose of the task is to create the file hello_earth.txt and add some content.

  • To tell pytask that hello_earth.txt is a product and not an input, use the Product annotation.

(If you are not used to type annotations, do not worry. pytask also offers simpler interfaces without type annotations.)

  • Since you pass a pathlib.Path to the function, pytask will check whether the file exists after the function is executed.

To execute the task, enter pytask on the command-line

image

Documentation

You find the documentation https://pytask-dev.readthedocs.io/en/stable with tutorials and guides for best practices.

Changes

Consult the release notes to find out about what is new.

License

pytask is distributed under the terms of the MIT license.

Acknowledgment

The license also includes a copyright and permission notice from pytest since some modules, classes, and functions are copied from pytest. Not to mention how pytest has inspired the development of pytask in general. Without the excellent work of Holger Krekel and pytest's many contributors, this project would not have been possible. Thank you!

pytask owes its beautiful appearance on the command line to rich, written by Will McGugan.

Repeating tasks in loops is inspired by ward written by Darren Burns.

Citation

If you rely on pytask to manage your research project, please cite it with the following key to help others to discover the tool.

bibtex @Unpublished{Raabe2020, Title = {A Python tool for managing scientific workflows.}, Author = {Tobias Raabe}, Year = {2020}, Url = {https://github.com/pytask-dev/pytask} }

Owner

  • Name: pytask-dev
  • Login: pytask-dev
  • Kind: organization

GitHub Events

Total
  • Create event: 37
  • Release event: 2
  • Issues event: 17
  • Watch event: 15
  • Delete event: 39
  • Issue comment event: 18
  • Push event: 155
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 76
  • Fork event: 1
Last Year
  • Create event: 37
  • Release event: 2
  • Issues event: 17
  • Watch event: 15
  • Delete event: 39
  • Issue comment event: 18
  • Push event: 155
  • Pull request review event: 1
  • Pull request review comment event: 1
  • Pull request event: 76
  • Fork event: 1

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 562
  • Total Committers: 12
  • Avg Commits per committer: 46.833
  • Development Distribution Score (DDS): 0.278
Past Year
  • Commits: 56
  • Committers: 5
  • Avg Commits per committer: 11.2
  • Development Distribution Score (DDS): 0.571
Top Committers
Name Email Commits
Tobias Raabe r****e@p****e 406
pre-commit-ci[bot] 6****] 100
dependabot[bot] 4****] 27
github-actions[bot] 4****] 19
Nick Crews n****s@g****m 2
Ethan Rooke 4****e 2
Tim Mensinger t****m@m****m 1
Klara Röhrl k****l@g****m 1
Hans-Martin von Gaudecker h****r@g****m 1
Eric Gerlach e****c@t****m 1
Christian Zimpelmann z****n@i****g 1
Auguste Baum 5****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 61
  • Total pull requests: 368
  • Average time to close issues: 5 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 12
  • Total pull request authors: 11
  • Average comments per issue: 2.56
  • Average comments per pull request: 0.71
  • Merged pull requests: 341
  • Bot issues: 0
  • Bot pull requests: 126
Past Year
  • Issues: 9
  • Pull requests: 63
  • Average time to close issues: 22 days
  • Average time to close pull requests: 11 days
  • Issue authors: 7
  • Pull request authors: 4
  • Average comments per issue: 1.33
  • Average comments per pull request: 0.0
  • Merged pull requests: 50
  • Bot issues: 0
  • Bot pull requests: 40
Top Authors
Issue Authors
  • tobiasraabe (26)
  • hmgaudecker (9)
  • NickCrews (9)
  • augustebaum (6)
  • timmens (3)
  • noppelmax (2)
  • felixschmitz (1)
  • MDanialSyed (1)
  • Ostheer (1)
  • ChristianZimpelmann (1)
  • seblehner (1)
  • axtimhaus (1)
Pull Request Authors
  • tobiasraabe (277)
  • pre-commit-ci[bot] (93)
  • dependabot[bot] (42)
  • github-actions[bot] (25)
  • NickCrews (5)
  • erooke (4)
  • ChristianZimpelmann (2)
  • egerlach (2)
  • mj023 (1)
  • hmgaudecker (1)
  • augustebaum (1)
Top Labels
Issue Labels
enhancement (32) bug (15) documentation (6) question (4) good first issue (4) feedback-wanted (2) infrastructure (2) help wanted (2) wontfix (1) blocked (1)
Pull Request Labels
dependencies (42) github_actions (6) blocked (4)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 2,706 last-month
  • Total dependent packages: 14
    (may contain duplicates)
  • Total dependent repositories: 19
    (may contain duplicates)
  • Total versions: 119
  • Total maintainers: 1
pypi.org: pytask

pytask is a workflow management system that facilitates reproducible data analyses.

  • Versions: 46
  • Dependent Packages: 8
  • Dependent Repositories: 4
  • Downloads: 2,706 Last month
Rankings
Dependent packages count: 1.1%
Average: 5.3%
Downloads: 7.3%
Dependent repos count: 7.5%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/pytask-dev/pytask
  • Versions: 51
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
conda-forge.org: pytask

pytask’s main purpose is to facilitate reproducible research by automating workflows in research projects.

  • Versions: 22
  • Dependent Packages: 6
  • Dependent Repositories: 15
Rankings
Dependent packages count: 9.0%
Dependent repos count: 9.2%
Average: 27.6%
Stargazers count: 35.8%
Forks count: 56.5%
Last synced: 6 months ago

Dependencies

.github/workflows/main.yml actions
  • actions/checkout v2 composite
  • conda-incubator/setup-miniconda v2 composite
.github/workflows/publish-to-pypi.yml actions
  • actions/checkout master composite
  • actions/setup-python v1 composite
  • pypa/gh-action-pypi-publish master composite
.github/workflows/update-plugin-list.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • peter-evans/create-pull-request 2455e1596942c2902952003bbb574afbbe2ab2e6 composite
environment.yml conda
  • attrs >=21.3.0
  • black
  • click
  • click-default-group
  • furo
  • ipywidgets
  • jupyterlab
  • matplotlib
  • myst-parser
  • nbsphinx
  • nbval
  • networkx >=2.4
  • optree >=0.9
  • pip
  • pluggy >=1.0.0
  • pre-commit
  • pygraphviz
  • pytest
  • pytest-cov
  • pytest-xdist
  • python >=3.8
  • rich
  • setuptools_scm
  • sphinx
  • sphinx-click
  • sphinx-copybutton
  • sphinx-design >=0.3.0
  • sphinxext-opengraph
  • sqlalchemy >=1.4.36
  • tabulate
  • toml
  • tomli >=1.0.0
  • tox
  • typing_extensions
pyproject.toml pypi