|
| 1 | +# Copyright 2020 Google LLC |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | +# you may not use this file except in compliance with the License. |
| 5 | +# You may obtain a copy of the License at |
| 6 | +# |
| 7 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | +# |
| 9 | +# Unless required by applicable law or agreed to in writing, software |
| 10 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | +# See the License for the specific language governing permissions and |
| 13 | +# limitations under the License. |
| 14 | + |
| 15 | +"""This script is used to synthesize generated parts of this library.""" |
| 16 | +import os |
| 17 | + |
| 18 | +import synthtool as s |
| 19 | +import synthtool.gcp as gcp |
| 20 | +from synthtool.languages import python |
| 21 | + |
| 22 | +gapic = gcp.GAPICBazel() |
| 23 | +common = gcp.CommonTemplates() |
| 24 | + |
| 25 | +# ---------------------------------------------------------------------------- |
| 26 | +# Generate area120 tables GAPIC layer |
| 27 | +# ---------------------------------------------------------------------------- |
| 28 | +library = gapic.py_library( |
| 29 | + service="tables", |
| 30 | + version="v1alpha1", |
| 31 | + bazel_target="//google/area120/tables/v1alpha1:area120-tables-v1alpha1-py", |
| 32 | + |
| 33 | +) |
| 34 | + |
| 35 | +s.move(library) |
| 36 | + |
| 37 | +# ---------------------------------------------------------------------------- |
| 38 | +# Add templated files |
| 39 | +# ---------------------------------------------------------------------------- |
| 40 | +templated_files = common.py_library(cov_level=99, microgenerator=True) |
| 41 | +s.move( |
| 42 | + templated_files, excludes=[".coveragerc"] |
| 43 | +) # the microgenerator has a good coveragerc file |
| 44 | + |
| 45 | + |
| 46 | +s.shell.run(["nox", "-s", "blacken"], hide_output=False) |
| 47 | + |
0 commit comments