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

Remove custom path management #3

Open
2 tasks
cmutel opened this issue Oct 22, 2023 · 1 comment
Open
2 tasks

Remove custom path management #3

cmutel opened this issue Oct 22, 2023 · 1 comment

Comments

@cmutel
Copy link

cmutel commented Oct 22, 2023

settings and settings_wizard has a lot of code around path management. bw2data now has projects.change_base_directories, and this should be used as much as possible.

  • change_bw_dir has code around switching to a new directory with a projects DB. This can be removed, we always create a projects DB with projects.change_base_directories
  • settings.get_default_directory() is remembering if an environment variable was set. This can be replaced with explicit remembering of the default directory when the AB was started (this will come from the envvar if available, but also work otherwise), and this function should be replaced with bw2data.projects._base_data_dir
@will7200
Copy link
Collaborator

This can be replaced with explicit remembering of the default directory when the AB was started

Would you clarify on this? get_default_directory returns either an env that is set by the user, named BRIGHTWAY2_DIR or the default data dir from bw2data. Not sure what needs to be remembered since it will default to bw2data default directory anyways.

@cmutel

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

No branches or pull requests

2 participants