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

Overwrite analysis inputs file #163

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GuiMacielPereira
Copy link
Collaborator

@GuiMacielPereira GuiMacielPereira commented Jan 15, 2025

Description of work:
This change improves the quality of life of scientists because in order to update their analysis inputs file following an update they no longer need to delete their entire config folder.

Running vesuvio config will now update the analysis_inputs.py file, even if the config folder ./mvesuvio already exists.

To test:

  • Checkout this branch and create the development environment by running mamba env create -f vesuvio-dev.yml
  • mamba activate vesuvio-dev
  • Install the vesuvio package by running pip install -e . (the only reason I use pip here is because it's faster than mamba build)
  • Run mvesuvio config
  • Open file ~/.mvesuvio/analysis_inputs.py and write anything to it (changes will be overwritten)
  • Run mvesuvio config
  • Open file ~/.mvesuvio/analysis_inputs.py and check that your changes were overwritten
  • Delete ~/.mvesuvio/
  • Run mvesuvio config
  • Check that a new folder ~/.mvesuvio was created

Fixes #156 .

This change quality of life of scientists because in order to update their analysis inputs file
following a version update they no longer need to delete their entire config folder.

The file will update in the existing config folder.
@GuiMacielPereira GuiMacielPereira force-pushed the update-config-minimal-overriding branch from af0485e to 3f4b98c Compare February 26, 2025 10:16
Copy link
Collaborator

@jhaigh0 jhaigh0 left a comment

Choose a reason for hiding this comment

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

Test and works well, but I bet you could add a unittest 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vesuvio-analysis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Command for vesuvio config should override .mvesuvio/ except IP files
2 participants