-
Notifications
You must be signed in to change notification settings - Fork 1.7k
chore(bigframes): refactor "generate_bigframes_bigquery.py" #17904
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
sycai
wants to merge
39
commits into
main
Choose a base branch
from
sycai_generator_refactor
base: main
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 7 commits
Commits
Show all changes
39 commits
Select commit
Hold shift + click to select a range
b7e5a06
checkpoint: add logic for rendering signature template
sycai cc3288e
checkpoint: impl operator definition gen
sycai 8019f08
checkout: impl test generation
sycai 310a93a
checkpoint: refactor arg rendering
sycai 5ba9eb3
finish refactoring
sycai ab100cb
make old script still runnable
sycai f85141a
fix script reference
sycai 0e6d04a
fix lint
sycai 9353f35
Update packages/bigframes/scripts/bigquery_generator/__main__.py
sycai 78041aa
Update packages/bigframes/scripts/bigquery_generator/file_generator.py
sycai 4fd77b8
Update packages/bigframes/scripts/bigquery_generator/file_generator.py
sycai aa24eb9
Update packages/bigframes/scripts/bigquery_generator/file_generator.py
sycai 393010b
Update packages/bigframes/scripts/bigquery_generator/template_rendere…
sycai f1fea76
Update packages/bigframes/scripts/bigquery_generator/yaml_parser.py
sycai 70e9091
Update packages/bigframes/scripts/bigquery_generator/yaml_parser.py
sycai e1b8a37
Update packages/bigframes/scripts/bigquery_generator/yaml_parser.py
sycai aa1b51b
Update packages/bigframes/scripts/generate_bigframes_bigquery.py
sycai aa74300
Update packages/bigframes/scripts/bigquery_generator/template_rendere…
sycai dcbd2ea
Update packages/bigframes/scripts/bigquery_generator/template_rendere…
sycai a048b0c
fix lint
sycai e3fb8fd
fix import
sycai 3049a97
fix format
sycai 83b22f0
fix lint
sycai 4653ca0
Merge branch 'main' into sycai_generator_refactor
sycai 0eb0aef
Merge branch 'main' into sycai_generator_refactor
sycai ddc6d4c
update script path
sycai 8ef98b9
remove __main__.py from package
sycai bd136c6
update template loading and module-level docstrings
sycai 9ea30b8
fix format
sycai 844ffb8
Merge branch 'main' into sycai_generator_refactor
sycai 2a4e432
Merge branch 'main' into sycai_generator_refactor
sycai 404a8ce
update branch to keep up with main
sycai 844f444
simplify IR during yaml loading phase
sycai 7909506
reduce the size of constants.py
sycai 1a8d53c
update IR and jinja templates
sycai d8cb52f
refactor type checking and add examples in template_renderer
sycai c20ada7
make data classes immutable and polish logics
sycai 5313842
fix type hints
sycai 1ec747e
polish docstrings
sycai 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
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 |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. |
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 |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| # Copyright 2026 Google LLC | ||
| # | ||
| # Licensed under the Apache License, Version 2.0 (the "License"); | ||
| # you may not use this file except in compliance with the License. | ||
| # You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, software | ||
| # distributed under the License is distributed on an "AS IS" BASIS, | ||
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| # See the License for the specific language governing permissions and | ||
| # limitations under the License. | ||
|
|
||
|
|
||
| import constants | ||
| import file_generator | ||
| import yaml_parser | ||
|
sycai marked this conversation as resolved.
Outdated
|
||
|
|
||
|
|
||
| def main(): | ||
| modules = [] | ||
|
|
||
| for yaml_file in sorted(constants.DATA_DIR.glob("**/*.yaml")): | ||
| modules.append(yaml_parser.parse_yaml(yaml_file)) | ||
|
|
||
| file_generator.generate(modules) | ||
|
|
||
|
|
||
| if __name__ == "__main__": | ||
| main() | ||
Oops, something went wrong.
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.
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.
Since this is the main entrypoint for the script, please include instructions on how to run it in a docstring.
Optionally, when run with -h or --help, also display this newly created docstring.
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.
File removed. I will make this package un-executable on its own.