A task runner that works well with poetry.
Project description
A task runner that works well with poetry.
Features
Straight foward declaration of project tasks in your pyproject.toml (kind of like npm scripts)
Task are run in poetry’s virtualenv by default
Short and sweet commands with extra arguments passed to the task
poe [options] task [task_args]
tasks can reference environmental variables as if they were evaluated by a shell
Installation
pip install poethepoet
Usage
Define tasks in your pyproject.toml
[tool.poe.tasks]
test = pytest --cov=poethepoet
Run tasks with the poe cli
poe test
Additional argument are passed to the task so
poe test -v tests/favorite_test.py
results in
pytest --cov=poethepoet -v tests/favorite_test.py
You can also run it like so if you fancy
python -m poethepoet
Run poe from anywhere
By default poe will detect when you’re inside a project with a pyproject.toml in the root. However if you want to run it from elsewhere that is supported too by using the –root option to specify an alternate location for the toml file.
By default poe doesn’t set the current workind directory to run tasks, however the parent directory of the toml file can be accessed as $POE_ROOT within the command line and process.
Poe can also be configured to set the working directory to the project root for all
commands by setting tool.poe.run_in_project_root = true
withing the
pyproject.toml.
Contributing
Sure, why not?
TODO
make the cli more friendly with colors and supportive helpful messages
support running tasks outside of poetry’s virtualenv (or in another?)
support declaring specific arguments for a task
test better
task composition/aliases
validate tool.poe config in toml
maybe try work well without poetry too
Licence
MIT. Go nuts.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for poethepoet-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9527128ecf36f78801bc5de9e5e50034a035ce192a662e18dc1238ce0f15404 |
|
MD5 | abb2a72b304ff17c91ddf23c79b07541 |
|
BLAKE2b-256 | 207021bf418700621e3718f655debcfd59edbce6d2854be0aa30145b52d1f0b1 |