-
-
Notifications
You must be signed in to change notification settings - Fork 63
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
Importing tasks from external tasks file #44
Comments
Hi Kevin, I'm not sure I've understood what you're describing. But something I have been considering is allowing tasks to be defined in a separate toml file within the same project by specifying something like Would this work for your use case? Also in case it's relevant you can edit a toml file in place the same way that poetry does using tomlkit |
Awesome, yes, I believe it would! :-)
…Sent from my iPad
On Dec 19, 2021, at 12:54 PM, nat ***@***.***> wrote:
Hi Kevin,
@kghenderson
I'm not sure I've understood what you're describing.
But something I have been considering is allowing tasks to be defined in a separate toml file within the same project by specifying something like tool.poe.include = "tasks.toml". The use cases I had in mind were to better support having a large number of tasks, or sharing tasks between projects via a git submodule. I guess the other toml file could even be dynamically generated.
Would this work for your use case?
Also in case it's relevant you can edit a toml file in place the same way that poetry does using tomlkit
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you were mentioned.
|
This feature has just been released as part of 0.12.0 @kghenderson I hope it works well for you :) |
That's awesome @nat-n ! Thank you so much, can't wait to try it out! Kevin |
Not sure if this is already possible, but don't see it mentioned anywhere yet.
Ideally I'd like to include some tasks for my package (A) and be able to import them as local tasks (B).
Alternatively, it may be simpler to have a local tasks subdirectory (B) and copy/sync the mypackage.tasks (from A).
The challenge is that pyproject.toml is large and manually syncing these tasks can be error-prone and tedious.
This could also open the possibility of writing a script to generate those tasks based on the local configuration.
While it could probably be done by editing pyproject.toml directly, a separate file would be a lot safer.
Thanks for considering.
Kevin
The text was updated successfully, but these errors were encountered: