-
Notifications
You must be signed in to change notification settings - Fork 6
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
Optional naming of subcommands #34
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #34 +/- ##
========================================
Coverage 89.40% 89.40%
========================================
Files 5 5
Lines 151 151
========================================
Hits 135 135
Misses 16 16 ☔ View full report in Codecov by Sentry. |
Co-authored-by: Jesper Dramsch <jesper.dramsch@ecmwf.int>
834c92e
to
10029d1
Compare
Following internal feedback, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This PR allows subcommands to have a different name than their file name via an optional attribute
command
Usage:
Will then become
anemoi-package fancy-command
instead ofanemoi-package mycommand
If the
command
attribute is not present in the class, the filename is used. I suggest we use that as the default, and only add acommand
if an explicit rename is required.