Improved ab_settings to fix #607
- the AB_settings.json is now environment specific (if conda or virtualenv are installed otherwise not)
- the custom_bw2_dir of the aforementioned file is consistent with BRIGHTWAY2_DIR (i.e when changing one also the other is changed )
@cardosan It is a bit unclear to me what you'd like to achieve. I am not sure that we always want to keep the custom_bw_dir consistent with BRIGHTWAY2_DIR. Users may also want to point the AB to a different data directory than when working purely in python for example. If we implement it this way, you remove that choice for users, or not?
Hi @bsteubing , I see two issues in the current implementation
-
the settings file is AB and not environment specific. This means that if you have AB installed in multiple environment they all point to the same settings file, which is, at least to my view, not really useful (what is the sense of having environments then if you cannot have completely separated spaces?). Let's not talk about the case when you want to have a different brigthway directory for each environment, that is in any case not possible so far (you would need to change manually the dir every time you open AB in the different environment ). Also if you simply want to set persistently a different startup project for each environment this is not possible since, again, you would need to do this manually every time you open AB in a different enviro. For me once you define the setting for a certain environment the next time I open it the settings has to be the same of when I left....I took these 2 example cause are the info I know are stored in the
AB_settings.jsonfile, but the same issue applies to all the settings potentially stored in it. The need for an enviro specific approach are quite objective to me. -
at least in my opinion, if you are in the same environment AB and bw2 must have the same settings. The typical AB users (correct me if I am wrong) is not a sima-like user that uses the UI and that’s all, but it is a person with hybrid needs that wants to be able to streamline the more "standard" things in AB, being still able to use bw2 for the more complex works. This means also that he will often be switching between the two for the same work/project. Harmonizing the
custom_bw2_dirwith theBRIGHTWAY2_DIRallows this, if not once one of the two is changed in its respecting context, the other is different and has to be changed in the other context e.g. if one start with AB and changes thecustom_bw2_dir, then he needs to automatize some repetitive work with bw2 for the same work, he must change theBRIGHTWAY2_DIRthe first time he open bw2….provided he knows this caveat, otherwise (as it happened to me) the first time he will spend a lot of time understanding why when in the same enviro he cannot see the same db when swithings between AB and bw2. I personally cannot see any use case in which someone would have to keep the aforementioned 2 dir separated. If the goal is e.g. to have 2 different db, in my opinion, this should be achieved not by having 1 enviro with different custom_bw2_dir andBRIGHTWAY2_DIRbut rather 2 enviro with 2 differentBRIGHTWAY2_DIR(and in cascadecustom_bw2_dir)….I would probably not even use thecustom_bw2_dirat all but would just change directly theBRIGHTWAY2_DIRfrom AB when changing directory in the AB settings tabs.
Hope I made the point clearer
@bsteubing Could you please review the comments made and close/respond?
If we go through with this, @cardosan please rebase to the current master (though perhaps wait for reaction from @bsteubing).
@bsteubing if not clear the issue happy to further explain (also via phone if needed). Indeeed I would also need to move on with the project requiring this fix and decide how to move on based on this decision.
@bsteubing Another ping, please review comments from @cardosan so we can resolve this PR by either merging or closing.
Closing as outdated