blob: 451f7c48517083c9e0dcfcd496d34f4310e5247f [file] [log] [blame]
Bu Sun Kime72202e2020-02-19 17:58:47 -08001# 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
Bu Sun Kime72202e2020-02-19 17:58:47 -080017import synthtool as s
18from synthtool import gcp
19
20common = gcp.CommonTemplates()
21
22# ----------------------------------------------------------------------------
23# Add templated files
24# ----------------------------------------------------------------------------
Tres Seavera30f0042021-08-03 13:59:25 -040025excludes = [
26 "noxfile.py", # pytype
27 "setup.cfg", # pytype
28 ".flake8", # flake8-import-order, layout
29 ".coveragerc", # layout
30 "CONTRIBUTING.rst", # no systests
31]
32templated_files = common.py_library(microgenerator=True, cov_level=100)
33s.move(templated_files, excludes=excludes)
Tres Seaver000d0a02020-10-06 15:47:28 -040034
35# Add pytype support
36s.replace(
37 ".gitignore",
38 """\
39.pytest_cache
40""",
41 """\
42.pytest_cache
43.pytype
44""",
45)
Tres Seaverfbf447c2021-06-16 13:45:41 -040046
47s.shell.run(["nox", "-s", "blacken"], hide_output=False)