You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, interesting project! Thanks for using pypyr! I've got a couple of suggestions that I hope might make your life a little easier (I'm the creator/maintainer of pypyr 😄 )
The custom parser at parser/default.py is pretty much doing the same thing as the built-in pypyr.parser.keyvaluepairs parser, so this might save you having to worry about the custom code. . .
The pyrun step you can achieve the same thing with the built-in pypyr.steps.python step to get the current sys.executable, so your pipelines would look like:
steps:
- pypyr.steps.python
- name: pypyr.steps.cmddescription: --> whatever modules you want to invokein:
cmd: '"{python}" -m arbpackage.mymodule --myarg'
You can of course use further {formatting expressions} to inject different package/module/args into the cmd.
steps:
- pypyr.steps.python
- name: pypyr.steps.cmddescription: --> pass whatever is in args to python -m.in:
cmd: '"{python}" -m {args}'
For steps/entry.py you could use the built-in pypyr.steps.pype step to invoke child pipelines from a parent pipeline. You can use the args input on pype to initialise the child pipeline's context with specific values like MKDV_CACHEDIR and set groups to specify which groups to run (e.g ['setup', 'run']).
A couple of the custom steps work with environment variables. pypyr has builtin pypyr.steps.env and pypyr.steps.envget to allow you to get $VARs into context or set $VARS etc. This may or may not make your life easier, could also be that just doing it in custom step code is less laborious, depends on the particular circumstance.
Hope this helps! To be clear, nothing you're doing is "wrong" and of course it'll work and it could well even be necessary depending on longer term objectives you have in mind... I just thought to throw some casual suggestions your way in the hope that it might make your pypyr experience smooth as possible!
If you have feedback/suggestions/ideas for improvement on pypyr built-in functionality feel free to get in touch!
The text was updated successfully, but these errors were encountered:
Hi @yaythomas, thank you for reaching out, and thanks for your work on pypyr! I've been looking for an easily-extensible tool like this for some time, and was very excited to find pypyr.
Very much appreciate your analysis and suggestions for ways to use more 'built-in' mechanisms in pypyr vs creating custom extensions!
super, glad to hear it! just mentioned who I am so it doesn't look like I'm just a total rando just arbitrarily reviewing your code here 😆
feel free to get in touch if you have questions/suggestions! I frequently use feedback like this to prioritise what new things to include in the pypyr core, so it's very valuable to me to get real-world usage insights like this.
Hi, interesting project! Thanks for using pypyr! I've got a couple of suggestions that I hope might make your life a little easier (I'm the creator/maintainer of pypyr 😄 )
The custom parser at parser/default.py is pretty much doing the same thing as the built-in pypyr.parser.keyvaluepairs parser, so this might save you having to worry about the custom code. . .
The pyrun step you can achieve the same thing with the built-in pypyr.steps.python step to get the current sys.executable, so your pipelines would look like:
You can of course use further {formatting expressions} to inject different package/module/args into the cmd.
For steps/entry.py you could use the built-in pypyr.steps.pype step to invoke child pipelines from a parent pipeline. You can use the
args
input onpype
to initialise the child pipeline's context with specific values likeMKDV_CACHEDIR
and setgroups
to specify which groups to run (e.g['setup', 'run']
).A couple of the custom steps work with environment variables. pypyr has builtin pypyr.steps.env and pypyr.steps.envget to allow you to get $VARs into context or set $VARS etc. This may or may not make your life easier, could also be that just doing it in custom step code is less laborious, depends on the particular circumstance.
Hope this helps! To be clear, nothing you're doing is "wrong" and of course it'll work and it could well even be necessary depending on longer term objectives you have in mind... I just thought to throw some casual suggestions your way in the hope that it might make your pypyr experience smooth as possible!
If you have feedback/suggestions/ideas for improvement on pypyr built-in functionality feel free to get in touch!
The text was updated successfully, but these errors were encountered: