Skip to main content

A python project task runner

Project description

werr

A simple, opinionated, python project task runner.

A task is a configured sequence of commands to run.

[project]
name = "appletree"
version = "0.1.0"
dependencies = [
    "pysunlight==24.1",
]

[tool.werr]
# 'check' is the default task if `werr` is run with no arguments.
task.check = [
    "black --check {project}",
    "isort --check {project}",
    "ruff check {project}",
    "mypy {project}",
    "pytest",
]
task.fix = [
    "black {project}",
    "isort {project}",
    "ruff fix {project}",
]

Running werr executes each check command in sequence, printing which failed and how. The tool returns a non-zero exit code if any command fails.

Running werr fix executes each fix command in sequence.

NOTE: All commands are run using uv (the only dependency of this project).

Command Variables

The following {...} variables are provided by werr to be used in task commands:

  • {project} - the absolute path to the directory containing the pyproject.toml file

Structured Output

werr         # interactive human readable output (default)
werr --json  # emit lines of JSON representing the result of each command
werr --xml   # print Junit XML for CI

Custom Tasks

Define a custom task with task.<name> = [ ... ]

[tool.werr]
# ...
task.docs = [
    "sphinx-build -b html {project}",
]

Running werr docs will build the documentation.

New Project

A suggested workflow for creating a new project is:

  1. uv init
  2. uv add --dev black ruff ty pytest
  3. add tasks to [tool.werr]
  4. uvx werr or add to dev group and in venv just werr

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

werr-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

werr-0.1.0-py3-none-any.whl (9.7 kB view details)

Uploaded Python 3

File details

Details for the file werr-0.1.0.tar.gz.

File metadata

  • Download URL: werr-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for werr-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b8da656ddd695e4e1a7e31690a5c908dd99a062bec7b571c8dd4035b08bbf758
MD5 211a3209a2c444bc8ecfd01b7a42f2d3
BLAKE2b-256 8d5b56921a8ef1f0a6b8fa7cf090e757f20c743a064ed32cd791edffde3b34cb

See more details on using hashes here.

File details

Details for the file werr-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: werr-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for werr-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 64b3f356512641bad256a9118a182908720523576044a5c595bf20940e24dd9c
MD5 19f6face77dd4adaf7a5e3aec6c3cf79
BLAKE2b-256 687bb8d1a067265ea7a9bccd087f6588a963400145a6d19e95eb19001a2ced34

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page