-
-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow envars and shell commands usage in "include" path #203
Comments
Hi @jaklan, thanks for the feedback. I see how this would be useful. I'm currently working on a bit of a refactor of config management works, which adds support for referencing env vars in the include path. So maybe exposing something like Supporting sub-shell syntax would be a bit of a different story. |
@nat-n thanjs for the quick response! Afaik We would just like to avoid a situation when it's needed to rely on an envar which has to be set locally by all developers. |
Hi @jaklan, I was thinking about exactly how to implement this, as a lazily resolve environment variable set by poe, and I realised the problem isn't as it seemed. Firstly, how exactly should What do you think the logic should be to be robust? EDIT: maybe the way to be consistent despite submodules is |
I just thought about triggering About
If we have the structure like:
and define:
in |
Fixes #203 --------- Co-authored-by: Nat Noordanus <[email protected]>
This feature is not available in in 0.27.0 🚀 |
@nat-n that's so cool, thank you! |
Let's imagine a monorepo structure like:
In the root
pyproject.toml
we define monorepo-wide commands, which are imported in all project-levelpyproject.toml
s.To import the global commands, in
projects/foobar/pyproject.toml
we need to specify:which is pretty inconvenient and error-prone:
it's very easy to specify a wrong file when you refer to a parent directory a few levels up
a repo / project structure can change and you have to remember to update the path
it's tricky to notice a bug in such situation because of:
by coincidence you can even import a wrong file
reusing / templating the config across different projects is harder because they can be nested at different levels
I wish it could be possible to add a support for envars and shell commands in
include
, so we could rely on a more robust solution like:The text was updated successfully, but these errors were encountered: