-
Notifications
You must be signed in to change notification settings - Fork 0
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
Need main functions or similar for entry points in conda #81
Comments
@blimlim if you want/need a post-processing script to be accessible as a command you should specify the requirements in this issue. |
It would be great to have the post-processing script available as a command. Specifically we'd want an entry point to the um2nc-standalone/umpost/conversion_driver_esm1p5.py Lines 298 to 328 in 8aa708d
Which hopefully should be pretty straightforward to adapt with the pattern in your example. Should I add a PR doing this? |
@aidanheerdegen are you happy this issue is complete with #83 and #86 ? |
Yep! Thanks. |
The conda deployment supports creating nice entry points, e.g. the ability to just call
um2nc
from the command line. For this to work e'll need main or similar functions defined, as entry points need to point at a function.See this related PR where entry points were removed because there were no suitable functions:
#74 (comment)
I started using the pattern shown below as a pretty standard approach in case it's useful
https://github.com/ACCESS-NRI/ncigrafana/blob/master/ncigrafana/parse_lquota.py#L146-L174
The corresponding entry point definition is
https://github.com/ACCESS-NRI/ncigrafana/blob/master/setup.cfg#L34
The point of this approach was to allow for the argument parsing to be tested independently of the call to
main
, and also allows for testingmain
directly inpytest
, without the need for an entrypoint script (though I don't believe I actually had those tests in this case ... )The text was updated successfully, but these errors were encountered: