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

print path to config file in verdi status #3587

Merged
merged 2 commits into from
Mar 2, 2020

Conversation

ltalirz
Copy link
Member

@ltalirz ltalirz commented Nov 28, 2019

From time to time, the need arises to have a look inside the currently
active AiiDA configuration file.
While the path to the file repository is printed in the output of verdi status and verdi profile show, one needs to edit this path to get to
the config file (and, in principle, the repository can even be located
comepletely elsewhere).

Printing the location of the config file is helpful for daily use, also
as a reminder which configuration file is currently active.

@ltalirz ltalirz requested a review from sphuber November 28, 2019 15:17
@sphuber
Copy link
Contributor

sphuber commented Nov 29, 2019

I am not sure what you mean with "active" configuration file.
For each AiiDA instance there is only one configuration file which is always in the same place, namely the .aiida folder and its location is already printed using verdi profile list. In principle a user should never have to look in the configuration file manually. If they do, then there is probably a problem that should be fixed. I am not saying we should fully hide it (which is why it is already in verdi profile list) but I am not sure we should start adding all sorts of places where this info is printed.

@ltalirz
Copy link
Member Author

ltalirz commented Nov 30, 2019

I am not sure what you mean with "active" configuration file.
For each AiiDA instance there is only one configuration file which is always in the same place, namely the .aiida folder and its location is already printed using verdi profile list

I meant "active configuration file" as in "active configuration folder".
I think printing which configuration folder (or configuration file) is active is quite important, since it can easily lead to unintended consequences - e.g. you might not realize that AIIDA_PATH is set.
It is good that verdi profile list prints it, but I would suggest that verdi status and probably verdi profile show should display it as well.

In principle a user should never have to look in the configuration file manually. If they do, then there is probably a problem that should be fixed.

I would say in practice we are still quite some way from this goal - even with new AiiDA instances for newbies I often find myself looking at the configuration file, but I agree with the sentiment of directing people more towards verdi config.
Still, I would say, printing the path to the configuration folder is meaningful.

Do you agree?

@ramirezfranciscof
Copy link
Member

@sphuber are you still unconvinced of this? If so, we can add it for discussion in the next aiida meeting. Else if @ltalirz rebases it I can review and merge it.

@sphuber
Copy link
Contributor

sphuber commented Feb 26, 2020

I'd be fine with adding it to verdi status, but maybe we don't have to also add it to verdi profile show.

@ramirezfranciscof
Copy link
Member

ramirezfranciscof commented Feb 28, 2020

This path seems to be the same for all profiles, right? That being the case I agree that it doesn't need to be on the verdi profile show and verdi status would suffice. Do you agree @ltalirz ? If so, can you make the changes and update the PR? I could then review it.

From time to time, the need arises to have a look inside the currently
active AiiDA configuration file.
While the path to the file repository is printed in the output of `verdi
status` and `verdi profile show`, one needs to edit this path to get to
the config file (and, in principle, the repository can even be located
comepletely elsewhere).

Printing the location of the config file is helpful for daily use, also
as a reminder which configuration file is currently active.
Copy link
Contributor

@sphuber sphuber left a comment

Choose a reason for hiding this comment

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

Thanks a lot @ltalirz

@sphuber sphuber merged commit 9389a52 into aiidateam:develop Mar 2, 2020
@sphuber sphuber deleted the show-aiida-path branch March 2, 2020 15:50
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