-
Notifications
You must be signed in to change notification settings - Fork 134
fix: read source-level meta.elementary config in tests #1002
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
Open
joostboon
wants to merge
5
commits into
master
Choose a base branch
from
fix/source-level-meta-elementary-config
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9ccf2da
fix: read source-level meta.elementary config in tests
joostboon 0e3fe4b
refactor + test: extract helper, add source_meta integration tests
joostboon fe26f1f
style: apply sqlfmt formatting to get_anomaly_config.sql
joostboon ce65e58
fix: wrap source_meta_config under elementary key in mock
joostboon a8aa951
style: fix formatting in files introduced by master commit 91d04fd
joostboon 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,25 +1,24 @@ | ||
| {% macro get_elementary_config_from_node(node) %} | ||
| {% set res = {} %} | ||
| {% set node_config = node.get("config") %} | ||
| {% if node_config %} | ||
| {% set elementary_config = node.config.get("elementary") %} | ||
| {% macro _merge_elementary_from_meta(res, meta_dict) %} | ||
| {% if meta_dict and meta_dict is mapping %} | ||
| {% set elementary_config = meta_dict.get("elementary") %} | ||
| {% if elementary_config and elementary_config is mapping %} | ||
| {% do res.update(elementary_config) %} | ||
| {% endif %} | ||
| {% set config_meta = node.config.get("meta") %} | ||
| {% if config_meta and config_meta is mapping %} | ||
| {% set elementary_config = config_meta.get("elementary") %} | ||
| {% if elementary_config and elementary_config is mapping %} | ||
| {% do res.update(elementary_config) %} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% endif %} | ||
| {% set node_meta = node.get("meta") %} | ||
| {% if node_meta and node_meta is mapping %} | ||
| {% set elementary_config = node_meta.get("elementary") %} | ||
| {% if elementary_config and elementary_config is mapping %} | ||
| {% do res.update(elementary_config) %} | ||
| {% endmacro %} | ||
|
|
||
| {% macro get_elementary_config_from_node(node) %} | ||
| {% set res = {} %} | ||
| {% set node_config = node.get("config") %} | ||
| {% if node_config %} | ||
| {# config.elementary is already the elementary config dict itself (not nested) #} | ||
| {% set config_elementary = node.config.get("elementary") %} | ||
| {% if config_elementary and config_elementary is mapping %} | ||
| {% do res.update(config_elementary) %} | ||
| {% endif %} | ||
| {% do elementary._merge_elementary_from_meta(res, node.config.get("meta")) %} | ||
| {% endif %} | ||
| {% do elementary._merge_elementary_from_meta(res, node.get("source_meta")) %} | ||
| {% do elementary._merge_elementary_from_meta(res, node.get("meta")) %} | ||
| {{ return(res) }} | ||
| {% endmacro %} |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.