You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(python): make Python cleaning more selective (#4108)
Take a more selective approach to cleaning, removing files that are
*expected* to be generated, rather than removing everything except
explicitly-listed "keep" files. Files *can* still be listed to be kept,
but don't have to be unless they're expected to be generated. This will
allow libraries with a mixture of handwritten and generated code to add
new handwritten files without the configuration file being updated,
except for the (hopefully rare) cases where a new handwritten file
"looks like" a generated file (in terms of which directory it's in and
its name).
This change does not modify the migration tool to reduce the size of the
"keep" list yet, but that can happen later if and when we want it to.
(There's a balance between removing unnecessary entries by hand, and
putting the work into figuring out what's unnecessary automatically.)
@@ -136,10 +137,17 @@ This document describes the schema for the librarian.yaml.
136
137
|`module_path_version`| string | ModulePathVersion is the version of the Go module path. |
137
138
|`nested_module`| string | NestedModule is the name of a nested module directory. |
138
139
140
+
## PythonDefault Configuration
141
+
142
+
| Field | Type | Description |
143
+
| :--- | :--- | :--- |
144
+
|`common_gapic_paths`| list of string | CommonGAPICPaths contains paths which are generated for any package containing a GAPIC API. These are relative to the package's output directory, and the string "{neutral-source}" is replaced with the path to the version-neutral source code (e.g. "google/cloud/run"). If a library defines its own common_gapic_paths, they will be appended to the defaults. |
|`opt_args`| list of string | OptArgs contains additional options passed to the generator, where the options are common to all apis. Example: ["warehouse-package-name=google-cloud-batch"]|
144
152
|`opt_args_by_api`| map[string][]string | OptArgsByAPI contains additional options passed to the generator, where the options vary by api. In each entry, the key is the api (API path) and the value is the list of options to pass when generating that API. Example: {"google/cloud/secrets/v1beta": ["python-gapic-name=secretmanager"]} |
145
153
|`proto_only_apis`| list of string | ProtoOnlyAPIs contains the list of API paths which are proto-only, so should use regular protoc Python generation instead of GAPIC. |
0 commit comments