-
Notifications
You must be signed in to change notification settings - Fork 909
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
Introduce a sentinel value _NO_VALUE to improve Global resolvers to support defaults 0
or None
#2976
Merged
Merged
Introduce a sentinel value _NO_VALUE to improve Global resolvers to support defaults 0
or None
#2976
Changes from 17 commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
5422c60
Add None support to globals
ankatiyar 4046fc8
Add warning when default value is used
ankatiyar 0812057
Check keys
ankatiyar 76a8259
Merge branch 'main' into fix-globals
ankatiyar e43e3ab
Nok's suggestions
ankatiyar c80437f
Create the test to check the non-existing keys
noklam b36ffbd
add more tests to catch case when global key is not a dict
noklam 0c845f5
Fix the null test
noklam 7334077
Introduce sentinel value _NO_VALUE
noklam a6df46a
rename test
noklam 5485361
Improve error mesasge and raise InterpolationResolutionError when key…
noklam 320a391
Fix non exist default test
noklam 93abb1c
Fix test
noklam 5ac78a0
Use omegaconf to replace the custom resolving logic
noklam 03b121b
uncommented some tests
noklam 75fc408
Remove dead code
ankatiyar eb797cc
Merge branch 'main' into fix-globals
ankatiyar 1917f29
Update error message
ankatiyar b297277
Merge branch 'fix-globals' of https://github.com/kedro-org/kedro into…
ankatiyar bf0d38c
Merge branch 'main' into fix-globals
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.
Is this error also thrown if the key isn't found? In that case the message should probably be as before: "Globals key '{variable}' not found and no default value provided. "
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.
Yes. Currently there are 3 paths it can take:
globals.yml
(take the global value as is)globals.yml
, but default providedglobals.yml
and not default provided - raiseInterpolationResolutionError
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.
Done