This repository was archived by the owner on Mar 6, 2026. It is now read-only.
feat: add support for overriding context.engine by magic argument#60
Merged
feat: add support for overriding context.engine by magic argument#60
context.engine by magic argument#60Conversation
tswast
reviewed
Sep 24, 2024
bigquery_magics/bigquery.py
Outdated
Comment on lines
+396
to
+398
| use_bigframes_engine = args.engine or context.engine | ||
|
|
||
| if use_bigframes_engine == "bigframes": |
Contributor
There was a problem hiding this comment.
This name feels off to me. Like it would be a boolean but it's not. How about engine_or_default
Suggested change
| use_bigframes_engine = args.engine or context.engine | |
| if use_bigframes_engine == "bigframes": | |
| engine_or_default = args.engine or context.engine | |
| if engine_or_default == "bigframes": |
Contributor
Author
There was a problem hiding this comment.
Good catch. I named it simply"engine"
tswast
reviewed
Sep 24, 2024
tests/unit/test_bigquery.py
Outdated
|
|
||
| @pytest.mark.usefixtures("ipython_interactive", "mock_credentials", "bigframes_engine") | ||
| @pytest.mark.usefixtures("ipython_interactive", "mock_credentials") | ||
| def test_big_query_magic_bigframes_set_in_args(): |
Contributor
Author
There was a problem hiding this comment.
Right. Updated the name here and for other methods too.
tswast
approved these changes
Sep 24, 2024
Contributor
tswast
left a comment
There was a problem hiding this comment.
A few nits. Looks good once addressed.
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Fixes #16 🦕