-
Notifications
You must be signed in to change notification settings - Fork 17
Updating environment variable handling #372
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
base: master
Are you sure you want to change the base?
Conversation
|
This is an excellent start @hina-shah and definitely the right direction for what we need. In general the thing I think we'll want to change while we're working on this, which will be slightly more complicated but I'm happy to help, is that not only do we not want to force users to set environment variables, we want to avoid relying on these directories and variables at all when they're not needed. So instead of making default directories as soon as the config is loaded, we want to defer that behavior until they are actually used. That way a user could use certain parts of ORION, like utilities or kgx file manipulation, without ever needing a STORAGE or GRAPHS directory. You could look at where these vars are actually accessed (load_manager.py and build_manager.py for example) and if they are not set by the user, we create the directory then as it is needed. Logs is a bit of a special case and for those it would be great if we could have the default be to write logs only to stdout and not even write to disc, so a logs directory is truly optional and is not generated unless the user specifies it. |
|
Alright, looking at this some more, there are some issues we need to resolve and some coding style things I would prefer but aren't as serious. In general, I think we are changing a bit too much here. We just wanted to remove the necessity of setting environment variables and create default directories as needed. This changes the way the directories are organized, the env var names, and other aspects of the config and how it's accessed in unnecessary ways. It's easy to break things, including on other branches, and now other projects that use ORION as a dependency, and the less we change for no reason the better. In order of importance:
Sorry, I know this is a lot and I should have caught some of these things sooner, but the number of breaking changes here is going to cause a lot of problems I want to avoid. Let me know if you have questions and/or we can meet to discuss next week. |
Creating a
Configclass to reduce reliance on environment variable availability in general, while setting reasonable defaults. This update also makes ORION specific directory generation to be not dependent on user input, and creates these directories under aStoragedirectory by default.