-
-
Notifications
You must be signed in to change notification settings - Fork 59
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for poe_tasks.toml|yaml|json files
- Loading branch information
Showing
26 changed files
with
1,302 additions
and
898 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,7 +43,6 @@ | |
:language: python | ||
.. |V| unicode:: ✅ 0xA0 0xA0 | ||
:trim: | ||
""" | ||
|
||
linkcheck_ignore = [ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
Usage without poetry | ||
==================== | ||
|
||
Poe the Poet was originally intended as the missing task runner for |poetry_link|. But it works just as well with any other kind of virtualenv, or simply as a general purpose way to define handy tasks for use within a certain directory structure! This behaviour is configurable via the :ref:`tool.poe.executor global option<Change the executor type>`. | ||
|
||
By default poe will run tasks in the poetry managed virtual environment, if the pyproject.toml contains a :toml:`tool.poetry` section. If it doesn't then poe looks for a virtualenv to use at ``./.venv`` or ``./venv`` relative to the pyproject.toml. | ||
|
||
If no virtualenv is found then poe will run tasks without any special environment management. | ||
|
||
|
||
Usage without pyproject.toml | ||
---------------------------- | ||
|
||
When using Poe the Poet outside of a poetry (or other |pep518_link|) project, you can avoid the potential confusion of creating a `pyproject.toml` file and instead name the file ``poe_tasks.toml``. | ||
|
||
|
||
Usage with with json or yaml instead of toml | ||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
|
||
As an alternative to toml, poethepoet configuration can also be provided via yaml or json files. When searching for a tasks file to load within a certain directory poe will try the following file names in order: | ||
|
||
- pyproject.toml | ||
- poe_tasks.toml | ||
- poe_tasks.yaml | ||
- poe_tasks.json | ||
|
||
If `pyproject.toml` exists but does not contain the key prefix ``tool.poe`` then the search continues with `poe_tasks.toml`. If one of the listed ``poe_tasks.*`` files exist then the search is terminated, even if the file is empty. | ||
|
||
When config is loaded from a file other than `pyproject.toml` the ``tool.poe`` namespace for poe config is optional. So for example the following two poe_tasks.yaml files are equivalent and both valid: | ||
|
||
.. code-block:: yaml | ||
:caption: poe_tasks.yaml | ||
env: | ||
VAR0: FOO | ||
tasks: | ||
show-vars: | ||
cmd: "echo $VAR0 $VAR1 $VAR2" | ||
env: | ||
VAR1: BAR | ||
args: | ||
- name: VAR2 | ||
options: ["--var"] | ||
default: BAZ | ||
.. code-block:: yaml | ||
:caption: poe_tasks.yaml | ||
tool: | ||
poe: | ||
env: | ||
VAR0: FOO | ||
tasks: | ||
show-vars: | ||
cmd: "echo $VAR0 $VAR1 $VAR2" | ||
env: | ||
VAR1: BAR | ||
args: | ||
- name: VAR2 | ||
options: ["--var"] | ||
default: BAZ | ||
.. |poetry_link| raw:: html | ||
|
||
<a href="https://python-poetry.org/" target="_blank">poetry</a> | ||
|
||
.. |pep518_link| raw:: html | ||
|
||
<a href="https://peps.python.org/pep-0518/" target="_blank">PEP 518</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.