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

verdi status: do not except when no profile is configured #4253

Merged
merged 1 commit into from Jul 14, 2020

Conversation

sphuber
Copy link
Contributor

@sphuber sphuber commented Jul 10, 2020

Fixes #4250

Instead, print that no profile could be found and suggest that one is
setup with verdi quicksetup or verdi setup.

To test this, a new pytest fixture is created that creates a completely
new and independent configuration folder, along with fixtures to create
profiles to add to the config and caching configuration files. Similar
code already exists for normal unittests, but this can be removed once
those have been refactored to pytests.

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks @sphuber

tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
@sphuber sphuber force-pushed the fix/4250/verdi-status-no-profile branch from d130083 to a56291d Compare July 14, 2020 07:52
@sphuber
Copy link
Contributor Author

sphuber commented Jul 14, 2020

Thanks @chrisjsewell . All comments are addressed.

Copy link
Member

@chrisjsewell chrisjsewell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

Instead, print that no profile could be found and suggest that one is
setup with `verdi quicksetup` or `verdi setup`.

To test this, a new pytest fixture is created that creates a completely
new and independent configuration folder, along with fixtures to create
profiles to add to the config and caching configuration files. Similar
code already exists for normal unittests, but this can be removed once
those have been refactored to pytests.
@sphuber sphuber force-pushed the fix/4250/verdi-status-no-profile branch from a56291d to 0fbc274 Compare July 14, 2020 08:06
@sphuber sphuber merged commit 18d2258 into aiidateam:develop Jul 14, 2020
@sphuber sphuber deleted the fix/4250/verdi-status-no-profile branch July 14, 2020 08:23
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.

verdi status shows error message if no profile is configured
2 participants