-
Notifications
You must be signed in to change notification settings - Fork 219
pick up on config.cfg EasyBuild configuration file in current working directory
#5054
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: develop
Are you sure you want to change the base?
Conversation
boegel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@j3mdamas Ideally we have an extra (dedicated) unit test for this, test/framework/config.py is the right place for that I think.
Do let us know if that's a bridge too far for you!
| '', | ||
| "[with $XDG_CONFIG_HOME: %s, $XDG_CONFIG_DIRS: %s]" % (xdg_config_home, xdg_config_dirs), | ||
| '', | ||
| "* local-level: %s" % os.path.join('.', 'config.cfg'), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would change this to avoid confusion:
| "* local-level: %s" % os.path.join('.', 'config.cfg'), | |
| "* current working directory: %s" % os.path.join('.', 'config.cfg'), |
| DEFAULT_SYS_CFGFILES = [sorted(glob.glob(os.path.join(d, 'easybuild.d', '*.cfg'))) | ||
| for d in XDG_CONFIG_DIRS] | ||
| DEFAULT_USER_CFGFILE = os.path.join(XDG_CONFIG_HOME, 'easybuild', 'config.cfg') | ||
| DEFAULT_LOCAL_CFGFILE = os.path.join(os.path.normpath(os.getcwd()), 'config.cfg') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to DEFAULT_CWD_CFGFILE, or DEFAULT_CURRENT_WORKING_DIR_CFGFILE if that's not clear enough?
I think "local" could be interpreted differently
config.cfg EasyBuild configuration file in current working directory
|
@boegel just wanted to note ahead of the EB conf call that this is not forgotten, I just didn't have the opportunity to address your questions. I'll come back to it. |
OK, thank you, no worries :) |
Closes #3965
I used git config as a reference: https://git-scm.com/docs/git-config#SCOPES
(there they call the easybuild user scope global scope, but we don't need to change that)
I ran some small tests locally with
eb --show-default-configfilesandeb --show-configand everything seems to work as expected, but I don't know if there are some unit tests I should create.tagging: @boegel