-
Notifications
You must be signed in to change notification settings - Fork 906
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
Add globals feature for OmegaConfigLoader
using a globals resolver
#2921
Merged
Merged
Changes from 5 commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
3e2e73e
Refactor load_and_merge_dir()
ankatiyar 9223f85
Try adding globals resolver
ankatiyar 44bc9e7
Minor change
ankatiyar f4ffa30
Add globals resolver
ankatiyar 5648999
Merge branch 'main' into feat/globals
ankatiyar ced46c5
Revert refactoring
ankatiyar ee285f4
Add test + remove self.globals
ankatiyar 7221a16
Allow for nested variables in globals
ankatiyar 6ad693f
Add documentation
ankatiyar e49f72f
Merge branch 'main' into feat/globals
ankatiyar 4fd5da0
Typo
ankatiyar 84bf3d1
Merge branch 'feat/globals' of https://github.com/kedro-org/kedro int…
ankatiyar bd84d0a
Add error message + test
ankatiyar b004b87
Apply suggestions from code review
ankatiyar c099422
Split test into multiple tests
ankatiyar 6cef54b
Restrict the globals config_patterns
ankatiyar 0d5d95d
Release notes
ankatiyar d159cdf
Update docs/source/configuration/advanced_configuration.md
ankatiyar 78793ef
Add helpful error message for keys starting with _
ankatiyar 17789a7
Enable setting default value for globals resolver
ankatiyar b8b066d
Merge branch 'main' into feat/globals
ankatiyar d76c022
Typo
ankatiyar 6e9c8b0
Merge branch 'feat/globals' of https://github.com/kedro-org/kedro int…
ankatiyar bed4106
Merge branch 'main' into feat/globals
astrojuanlu 4b1b6f4
Merge branch 'main' into feat/globals
noklam 01af470
Move test for keys starting with _ to the top
ankatiyar 92ab551
Merge branch 'main' into feat/globals
ankatiyar ed91395
Fix cross ref link in docs
ankatiyar ca622b7
Merge branch 'feat/globals' of https://github.com/kedro-org/kedro int…
ankatiyar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 suggest keep this pattern simple.
TemplatedConfigLoader
pattern, the above code block is copy from our templateglobals
, putting globals in folder should be minority, if so they should change the settings instead.**/globals*
is quite dangerous, as this could matchparameters/globals_parameters.yml
- although we usually suggest people usingparameter_globals
instead.I may even suggest a more conservative default
"globals": "globals.yml"
, forcing the default to be justglobals.yml
. If we change this after release it will be breaking change.WDYT? @ankatiyar @merelcht , cc @stichbury because I really think we should separate the terminology for
globals
, it's being overloaded a lot now and this can lead to weird bugs.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.
Offline conversation - agree with using default with
globals.yml
. Cc @merelcht @ankatiyar