Skip to content

Allow existing profile to be overriden in verdi setup#2244

Merged
sphuber merged 1 commit into
aiidateam:developfrom
sphuber:fix_2243_verdi_setup_non_interactive_override
Nov 27, 2018
Merged

Allow existing profile to be overriden in verdi setup#2244
sphuber merged 1 commit into
aiidateam:developfrom
sphuber:fix_2243_verdi_setup_non_interactive_override

Conversation

@sphuber
Copy link
Copy Markdown
Contributor

@sphuber sphuber commented Nov 27, 2018

Fixes #2243

With the --force flag a user can suppress the exception that is raised
when one tries to create an existing profile in non-interactive mode. With
the flag the existing profile will be overridden with the specified values
except for the profile UUID which will be kept the same as it is auto
generate and can also not be specified by the user on the command line.

@coveralls
Copy link
Copy Markdown

coveralls commented Nov 27, 2018

Coverage Status

Coverage increased (+0.9%) to 68.946% when pulling 1ea6e18 on sphuber:fix_2243_verdi_setup_non_interactive_override into 446ce15 on aiidateam:develop.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.007%) to 68.081% when pulling 57c5f023e37671bc9932b2e42a1492d1fad8c50d on sphuber:fix_2243_verdi_setup_non_interactive_override into 446ce15 on aiidateam:develop.

@ltalirz
Copy link
Copy Markdown
Member

ltalirz commented Nov 27, 2018

What about adding a test for the new option?
Looks fine to me otherwise.

@sphuber sphuber force-pushed the fix_2243_verdi_setup_non_interactive_override branch from 57c5f02 to 008a9fe Compare November 27, 2018 17:17
With the `--force` flag a user can suppress the exception that is raised
when one tries to create an existing profile in non-interactive mode. With
the flag the existing profile will be overriden with the specified values
except for the profile UUID which will be kept the same as it is auto
generate and can also not be specified by the user on the command line.
@sphuber sphuber force-pushed the fix_2243_verdi_setup_non_interactive_override branch from 008a9fe to 1ea6e18 Compare November 27, 2018 17:46
@sphuber
Copy link
Copy Markdown
Contributor Author

sphuber commented Nov 27, 2018

Didn't add a test at first, because there weren't any tests for verdi setup. Probably, because as I found it is a bit hacky. You have to reset the loaded profile and change the config folder and properly reset it, but I think it worked. Should be good to go

@ltalirz
Copy link
Copy Markdown
Member

ltalirz commented Nov 27, 2018

because there weren't any tests for verdi setup.

Yikes! Thanks a lot for taking the time to resolve this!

@sphuber sphuber merged commit 92651ee into aiidateam:develop Nov 27, 2018
@sphuber sphuber deleted the fix_2243_verdi_setup_non_interactive_override branch November 27, 2018 18:22
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