Skip to content

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

Merged
sphuber merged 1 commit into
aiidateam:provenance_redesignfrom
sphuber:fix_2344_verdi_profile_param_type
Dec 12, 2018
Merged

Use ProfileParamType in verdi and expose in ctx.obj#2345
sphuber merged 1 commit into
aiidateam:provenance_redesignfrom
sphuber:fix_2344_verdi_profile_param_type

Conversation

@sphuber
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown

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.

3 participants