nat-n / poethepoet

A task runner that works well with poetry.
https://poethepoet.natn.io/
MIT License
1.46k stars 59 forks source link

Add ability to declare default values for env vars in pyproject.toml #30

Closed nat-n closed 3 years ago

nat-n commented 3 years ago

This is something I found necessary for my own use case. It allows similar semantics to ?= variable assignment in make.

Setting an env var to a table with key default means the variable will only be set if not already provided by a lower precedence source such as the host shell or an env file. e.g.

[tool.poe.env]
PORT.default = "9001"

This PR build on top of #29

Documentation done, feature test TODO.