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

[Configuration] Reading the user's configuration file, if it exists, in developer mode should not be possible #280

Closed
servoz opened this issue Jul 1, 2022 · 2 comments
Labels
enhancement New feature or request

Comments

@servoz
Copy link
Contributor

servoz commented Jul 1, 2022

If the configuration file exists in the ~/.populse_mia directory, it is this one that is read in developer mode, whereas in developer mode it should be the populse_mia/properties/config.yml file.

Indeed the interest to have a developer mode and a user mode is to be able to use on the same station, without virtual environment, mia from source and mia from pypi, if one wishes it. The two configurations must be isolated.

@servoz servoz changed the title Reading the user's configuration file, if it exists, in developer mode should not be possible [Configuration] Reading the user's configuration file, if it exists, in developer mode should not be possible Jul 1, 2022
@servoz servoz added the enhancement New feature or request label Oct 20, 2022
servoz added a commit that referenced this issue Nov 4, 2023
servoz added a commit that referenced this issue Nov 4, 2023
servoz added a commit that referenced this issue Nov 4, 2023
@servoz
Copy link
Contributor Author

servoz commented Nov 4, 2023

I had to do a history rebase ( then git push --force) because I changed some erroneous messages in already pushed commits. We may have to make a fresh populse_mia clone when I've finished processing this ticket and the branch is merged with master. Sorry about that.

@servoz
Copy link
Contributor Author

servoz commented Nov 28, 2023

The issues in this ticket now seems to have been fixed.

The configuration is now clearly separated between user and developer mode.

Please note that, as the history has been rewritten, it is necessary to start from a new populse_mia clone.

It is therefore strongly recommended to make a copy of the processes and properies directories before doing anything. In developer mode, these are the populse_mia/properties and populse_mia/processes directories (which is very dirty, ... putting data in the package). In user mode, this may depend on the chosen configuration, but in general it's the processes and properties directories in ~/.populse_mia.

Once these directories have been saved somewhere, the fresh populse_mia can be cloned from github. If they're not saved somewhere, the configuration will have to be completely redone by hand (which isn't a tragedy, just a waste of time), but especially if personal pipelines and processes have been created, they'll be lost. WARNING!

After installing the fresh clone.
Launch mia.
Mia will detect that no configuration exists and will automatically create a default configuration.
At the end of this procedure, exit Mia.
If you wish to use your old configuration, go to ~/.populse_mia/configuration_path.yml.
The properties_dev_path corresponds to the config root directory in developer mode. The properties_user_path corresponds to the config root directory in user mode.
From here, things are simple: simply replace the properties_dev_path/dev/processes and properties_dev_path/dev/properties directories with the directories you previously saved in developer mode, or properties_user_path/usr/processes and properties_user_path/usr/properties with the directories you previously saved in user mode.

The management of paths to personal processes was sub-optimal before this ticket. It might be worth modifying by hand the Paths part (end file) of properties_dev_path/dev/properties/process_config.yml (in the case of dev mode, use properties_user_path/usr/properties/process_config.yml in the case of user mode): delete all paths (which are more or less erroneous before this ticket) and keep only the absolute path to the process directory, for example :

Paths :
- /home/toto/.populse_mia/dev/processes

I am available to help if problems

@servoz servoz closed this as completed Nov 28, 2023
@servoz servoz mentioned this issue Nov 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant