Lines Matching +full:owlbot +full:- +full:py
7 # https://www.apache.org/licenses/LICENSE-2.0
29 …tps://github.com/google/google-java-format/releases/download/google-java-format-{version}/google-j…
38 * https://www.apache.org/licenses/LICENSE-2.0
54 \\* http://www.apache.org/licenses/LICENSE-2.0
67 ) -> None:
69 Runs the google-java-format jar against all .java files found within the
72 jar_name = f"google-java-format-{version}.jar"
83 shell.run(["java", "-jar", str(jar), "--replace"] + files)
86 def _download_formatter(version: str, dest: Path) -> None:
98 def _file_has_header(path: Path) -> bool:
107 def _filter_no_header(paths: Iterable[Path]) -> Iterable[Path]:
117 def fix_proto_headers(proto_root: Path) -> None:
129 # https://github.com/googleapis/gapic-generator/issues/3074
137 def fix_grpc_headers(grpc_root: Path, package_name: str = "unused") -> None:
149 def latest_maven_version(group_id: str, artifact_id: str) -> Optional[str]:
164 f"https://repo1.maven.org/maven2/{group_path}/{artifact_id}/maven-metadata.xml"
173 def version_from_maven_metadata(metadata: str) -> Optional[str]:
224 cloud_prefix = "cloud-" if cloud_api else ""
227 library / f"proto-google-{cloud_prefix}{service}-{version}{suffix}"
230 library / f"grpc-google-{cloud_prefix}{service}-{version}{suffix}", package_name
235 [library / f"gapic-google-{cloud_prefix}{service}-{version}{suffix}/src"],
236 f"gapic-google-{cloud_prefix}{destination_name}-{version}/src",
241 [library / f"gapic-google-{cloud_prefix}{service}-{version}{suffix}/src"],
242 f"google-{cloud_prefix}{destination_name}/src",
247 [library / f"grpc-google-{cloud_prefix}{service}-{version}{suffix}/src"],
248 f"grpc-google-{cloud_prefix}{destination_name}-{version}/src",
249 # For REST-only clients, like java-compute, gRPC artifact does not exist
253 [library / f"proto-google-{cloud_prefix}{service}-{version}{suffix}/src"],
254 f"proto-google-{cloud_prefix}{destination_name}-{version}/src",
259 format_code(f"gapic-google-{cloud_prefix}{destination_name}-{version}/src")
261 format_code(f"google-{cloud_prefix}{destination_name}/src")
262 format_code(f"grpc-google-{cloud_prefix}{destination_name}-{version}/src")
263 format_code(f"proto-google-{cloud_prefix}{destination_name}-{version}/src")
276 ) -> Path:
277 """Generate a Java library using the gapic-generator via artman via Docker.
335 ) -> Path:
336 """Generate a Java library using the gapic-generator via bazel.
366 library=library / f"google-cloud-{service}-{version}-java",
368 suffix="-java",
384 ) -> Path:
385 """Generate a Java library using the gapic-generator via bazel.
391 path (str): Path in googleapis-gen to un-versioned generated code.
404 cloud_prefix = "cloud-" if cloud_api else ""
408 library=library / f"google-{cloud_prefix}{service}-{version}-java",
410 suffix="-java",
433 ) -> str:
435 if file_path.match("pom.xml") or file_path.match("sync-repo-settings.yaml"):
436 logger.debug(f"existing pom file found ({file_path}) - keeping the existing")
439 if file_path.match("release-please.yml"):
446 def _common_template_metadata() -> Dict[str, Any]:
459 artifact_id="libraries-bom",
476 ) -> None:
479 Fetches information about the repository from the .repo-metadata.json file,
491 # to monorepo. The owlbot.py in the monorepo sets monorepo=True.
498 "java-translate",
499 "java-dns",
500 "java-notification",
501 "java-resourcemanager",
529 def custom_templates(files: List[str], **kwargs) -> None:
532 Fetches information about the repository from the .repo-metadata.json file,
550 Goes line-by-line to detect the start of the block. Determines
588 # not in a ignore block - preserve the line
611 Goes line-by-line to detect the start of the block. Determines
658 # not in a ignore block - preserve the line
684 Goes line-by-line to detect the start of the block.
723 leading_spaces = len(line) - len(line.lstrip())
763 lines.extend(annotations[::-1])
776 Goes line-by-line to detect the start of the block.
810 leading_spaces = len(line) - len(line.lstrip())
825 Goes line-by-line to detect the start of the block.