Skip to content
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

Use ProfileParamType in verdi and expose in ctx.obj #2345

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Dec 12, 2018

Fixes #2344

The verdi entry point now uses the ProfileParamType for its -p
option, which enables tab-completion for the profile option.
In addition, we add the loaded profile to the obj attribute of the
click context ctx. This way, when a verdi sub commands needs the
active profile, one can simply use the @click.pass_context decorator
to access the profile through ctx.obj.profile.

@sphuber sphuber force-pushed the fix_2344_verdi_profile_param_type branch from 554f04b to a32db9b Compare December 12, 2018 12:19
The `verdi` entry point now uses the `ProfileParamType` for its `-p`
option, which enables tab-completion for the profile option.
In addition, we add the loaded profile to the `obj` attribute of the
click context `ctx`. This way, when a `verdi` sub commands needs the
active profile, one can simply use the `@click.pass_context` decorator
to access the profile through `ctx.obj.profile`.
@sphuber sphuber force-pushed the fix_2344_verdi_profile_param_type branch from a32db9b to 809ae80 Compare December 12, 2018 12:41
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 68.136% when pulling 809ae80 on sphuber:fix_2344_verdi_profile_param_type into 11e6988 on aiidateam:provenance_redesign.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage increased (+0.03%) to 68.136% when pulling 809ae80 on sphuber:fix_2344_verdi_profile_param_type into 11e6988 on aiidateam:provenance_redesign.

@sphuber sphuber merged commit 7ff016d into aiidateam:provenance_redesign Dec 12, 2018
@sphuber sphuber deleted the fix_2344_verdi_profile_param_type branch December 12, 2018 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants