Skip to content

Commit e751df7

Browse files
authored
chore(recommender): use artman for generation instead of bazel (#10356)
1 parent 71705da commit e751df7

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

recommender/synth.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from synthtool import gcp
2020
from synthtool.languages import python
2121

22-
gapic = gcp.GAPICBazel()
22+
gapic = gcp.GAPICGenerator()
2323
versions = ["v1beta1", "v1"]
2424
common = gcp.CommonTemplates()
2525

@@ -28,7 +28,11 @@
2828
# Generate Cloud Recommender
2929
# ----------------------------------------------------------------------------
3030
for version in versions:
31-
library = gapic.py_library("recommender", version)
31+
library = gapic.py_library(
32+
"recommender",
33+
version,
34+
config_path=f"/google/cloud/recommender/{version}/artman_recommender_{version}.yaml",
35+
)
3236
s.move(library, excludes=["nox.py", "docs/index.rst", "README.rst", "setup.py"])
3337

3438
# Fix docstring with regex pattern that breaks docgen
@@ -37,7 +41,12 @@
3741
# Fix more regex in docstrings
3842
s.replace("google/**/*_pb2.py", ":math:`(/)", "\g<1>")
3943
s.replace("google/**/*_pb2.py", "`/\.", "/.")
40-
s.replace("google/**/*_pb2.py", "(regex\s+)(/.*?/)\.", "\g<1>``\g<2>``.", flags=re.MULTILINE | re.DOTALL,)
44+
s.replace(
45+
"google/**/*_pb2.py",
46+
"(regex\s+)(/.*?/)\.",
47+
"\g<1>``\g<2>``.",
48+
flags=re.MULTILINE | re.DOTALL,
49+
)
4150

4251
# Fix docstring with JSON example by wrapping with backticks
4352
s.replace(

0 commit comments

Comments
 (0)