This repository was archived by the owner on Mar 6, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 324
test: microgen - adds unit tests for utils.py
#2307
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
e3920e2
adds unit tests for utils.py
chalmerlowe 49776c6
Merge branch 'autogen' into test/test-utils-load_resource
chalmerlowe 782fd9e
Merge branch 'autogen' into test/test-utils-load_resource
chalmerlowe 4197086
updates test sessions in noxfile.py and adds init.py files
chalmerlowe 7965277
adds setup.py to support noxfile use and updates github workflow to e…
chalmerlowe fdc3dec
reduces python versions for alpha testing
chalmerlowe da4b177
Merge branch 'autogen' into test/test-utils-load_resource
chalmerlowe 1711d70
updates dependency list in setup.py
chalmerlowe bc0a7d7
Updates comments and names for unittest.yaml elements.
chalmerlowe 4fce165
Merge branch 'autogen' into test/test-utils-load_resource
chalmerlowe 22017bd
Merge branch 'autogen' into test/test-utils-load_resource
gcf-merge-on-green[bot] c4bfb09
Merge branch 'autogen' into test/test-utils-load_resource
chalmerlowe 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
Empty file.
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,63 @@ | ||
| # -*- coding: utf-8 -*- | ||
| # Copyright 2025 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 setuptools # type: ignore | ||
|
|
||
| name = "google-cloud-bigquery_v2-centralized-client" | ||
| description = "Google Cloud Bigquery V2 Centralized Client Microgenerator" | ||
| version = "0.1.0" | ||
|
|
||
| if version[0] == "0": | ||
| release_status = "Development Status :: 4 - Beta" | ||
| else: | ||
| release_status = "Development Status :: 5 - Production/Stable" | ||
|
|
||
| dependencies = [ # TODO: break out development reqs from generation requirements | ||
| "PyYAML", | ||
| "Jinja2", | ||
| ] | ||
| extras = {} | ||
|
|
||
| packages = [ | ||
| package | ||
| for package in setuptools.find_namespace_packages() | ||
| if package.startswith("google") | ||
| ] | ||
|
|
||
| setuptools.setup( | ||
| name=name, | ||
| version=version, | ||
| description=description, | ||
| author="Google LLC", | ||
| author_email="googleapis-packages@google.com", | ||
| license="Apache 2.0", | ||
| classifiers=[ | ||
| release_status, | ||
| "Intended Audience :: Developers", | ||
| "License :: OSI Approved :: Apache Software License", | ||
| "Programming Language :: Python", | ||
| "Programming Language :: Python :: 3", | ||
| "Programming Language :: Python :: 3.13", | ||
| "Operating System :: OS Independent", | ||
| "Topic :: Internet", | ||
| ], | ||
| platforms="Posix; MacOS X; Windows", | ||
| packages=packages, | ||
| python_requires=">=3.12", | ||
| install_requires=dependencies, | ||
| extras_require=extras, | ||
| include_package_data=True, | ||
| zip_safe=False, | ||
| ) |
Empty file.
Empty file.
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.
If you think microgenerator testing is sufficiently distinct from the normal testing, another strategy here would be to define it all in an addition, custom workflow rather than in unitttest.yml
Uh oh!
There was an error while loading. Please reload this page.
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.
You are correct, that is another strategy.
It seemed reasonable at first glance to put all unit tests into a unittests workflow to get us in a position to be able to test a unit test setup for the microgenerator with the minimum amount of fuss.
If I can't get this work, I may try that approach.
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.
For now, it looks like we are able to run two sets of tests AND when running the microgenerator tests, it runs the desired tests (18 total).
Breakout:
See the separate line items above.
The test summary: