diff --git a/recommender/synth.py b/recommender/synth.py index 8279460b140b..f0241b381394 100644 --- a/recommender/synth.py +++ b/recommender/synth.py @@ -19,7 +19,7 @@ from synthtool import gcp from synthtool.languages import python -gapic = gcp.GAPICBazel() +gapic = gcp.GAPICGenerator() versions = ["v1beta1", "v1"] common = gcp.CommonTemplates() @@ -28,7 +28,11 @@ # Generate Cloud Recommender # ---------------------------------------------------------------------------- for version in versions: - library = gapic.py_library("recommender", version) + library = gapic.py_library( + "recommender", + version, + config_path=f"/google/cloud/recommender/{version}/artman_recommender_{version}.yaml", + ) s.move(library, excludes=["nox.py", "docs/index.rst", "README.rst", "setup.py"]) # Fix docstring with regex pattern that breaks docgen @@ -37,7 +41,12 @@ # Fix more regex in docstrings s.replace("google/**/*_pb2.py", ":math:`(/)", "\g<1>") s.replace("google/**/*_pb2.py", "`/\.", "/.") -s.replace("google/**/*_pb2.py", "(regex\s+)(/.*?/)\.", "\g<1>``\g<2>``.", flags=re.MULTILINE | re.DOTALL,) +s.replace( + "google/**/*_pb2.py", + "(regex\s+)(/.*?/)\.", + "\g<1>``\g<2>``.", + flags=re.MULTILINE | re.DOTALL, +) # Fix docstring with JSON example by wrapping with backticks s.replace(