Skip to content

Commit 7965277

Browse files
committed
adds setup.py to support noxfile use and updates github workflow to enable microgen unit tests
1 parent 4197086 commit 7965277

File tree

2 files changed

+70
-2
lines changed

2 files changed

+70
-2
lines changed

.github/workflows/unittest.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,18 @@ jobs:
4040
env:
4141
COVERAGE_FILE: .coverage-${{ matrix.python }}
4242
BUILD_TYPE: presubmit
43-
TEST_TYPE: unit
43+
TEST_TYPE: unit xxx
4444
PY_VERSION: ${{ matrix.python }}
4545
run: |
4646
nox -s unit-${{ matrix.python }}
47+
- name: Run microgenerator unit tests
48+
env:
49+
COVERAGE_FILE: .coverage-microgenerator-${{ matrix.python }}
50+
BUILD_TYPE: presubmit
51+
TEST_TYPE: unit μgen
52+
PY_VERSION: ${{ matrix.python }}
53+
run: |
54+
nox -f scripts/microgenerator/noxfile.py -s unit-${{ matrix.python }}
4755
- name: Upload coverage results
4856
uses: actions/upload-artifact@v4
4957
with:
@@ -84,4 +92,4 @@ jobs:
8492
run: |
8593
find .coverage-results -type f -name '*.zip' -exec unzip {} \;
8694
coverage combine .coverage-results/**/.coverage*
87-
coverage report --show-missing --fail-under=100
95+
coverage report --show-missing --fail-under=100

scripts/microgenerator/setup.py

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2025 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
import setuptools # type: ignore
17+
18+
name = "google-cloud-bigquery_v2-centralized-client"
19+
description = "Google Cloud Bigquery V2 Centralized Client Microgenerator"
20+
version = "0.1.0"
21+
22+
if version[0] == "0":
23+
release_status = "Development Status :: 4 - Beta"
24+
else:
25+
release_status = "Development Status :: 5 - Production/Stable"
26+
27+
dependencies = []
28+
extras = {}
29+
30+
packages = [
31+
package
32+
for package in setuptools.find_namespace_packages()
33+
if package.startswith("google")
34+
]
35+
36+
setuptools.setup(
37+
name=name,
38+
version=version,
39+
description=description,
40+
author="Google LLC",
41+
author_email="[email protected]",
42+
license="Apache 2.0",
43+
classifiers=[
44+
release_status,
45+
"Intended Audience :: Developers",
46+
"License :: OSI Approved :: Apache Software License",
47+
"Programming Language :: Python",
48+
"Programming Language :: Python :: 3",
49+
"Programming Language :: Python :: 3.13",
50+
"Operating System :: OS Independent",
51+
"Topic :: Internet",
52+
],
53+
platforms="Posix; MacOS X; Windows",
54+
packages=packages,
55+
python_requires=">=3.12",
56+
install_requires=dependencies,
57+
extras_require=extras,
58+
include_package_data=True,
59+
zip_safe=False,
60+
)

0 commit comments

Comments
 (0)