-
Notifications
You must be signed in to change notification settings - Fork 130
Python: Auto-gen Improvements #1320
Comments
/cc @landrito (I intend to ask you to give me a hand with these.) |
Couple of thoughts:
|
Affirmative re: the second two. What is your concern about the first one? I am not surfacing the term in the docs themselves, only in the docs' directory structure. The only difference is in the toctree, really: .. toctree::
:hidden:
usage
something_else
gapic/api
gapic/types But no reader of the docs would interact with that. |
That's fine. |
I think this has been resolved:
https://github.com/googleapis/googleapis/blob/master/gapic/packaging/api_defaults.yaml#L19 |
@lukesneeringer can you either mark this as resolved or create fine-grained issues for any little things that are left? |
@lukesneeringer Could you update this with what is still to do, and add a comment that you reviewed and updated? |
Whups, sorry. This is done. (Not going to do that last item.) |
This is a "catch-all ticket" of things I have identified that need doing in Python auto-gen.
Examples in this ticket will follow Vision (which I have hand-edited).
More important items are marked with⚠️ ; this ticket should be demoted to P2 once those are completed.
*_client.py (e.g. image_annotator_client.py)
string
should be spelledstr
.iterator
should be spelledIterable
.~.
prefix if a period is present in the class name....
for the prompt in hanging indents or continued statements (match the interpreter).pkg_resources.get_distribution
call needs to use the "manual" package name (e.g.google-cloud-vision
), not the GAPIC package name. We are moving away from publishing stand-alone GAPIC packages.*_client.json (e.g. image_annotator_client.json)
image_annotator_config.py
, and write the value to a variable in the top line. Alter the corresponding GAPIC Python file to import this rather than usingpkg_resources.resource_string
to load the JSON file.proto package
protoc-docs-plugin
to artman. (Add Python documentation artman#217)Partial Veneer
google.cloud
namespace (e.g.google.cloud.vision_v1
)types.py
file to thegoogle.cloud.api_vN
package which iterates over all the_pb2.py
files in the proto and makes the messages available in a consistent namespace (see Vision for a reference implementation).__init__.py
file to thegoogle.cloud.api_vN
package which imports (1) the client and (2) the enums module from the GAPIC, and (3) thetypes
module (above bullet). These should be exported wholesale in__all__
. See Vision for a reference implementation.vision.py
) in thegoogle.cloud
namespace that imports each of the names from the latest GA versioned package and exports them wholesale in__all__
. See Video Intelligence (not Vision) for a reference implementation.Docs
gapic
directory in the docs with anapi.rst
andtypes.rst
file. See Vision for a reference implementation.index.rst
file with the docs overview. See Vision for a reference implementation.setup.py and requirements.txt
requirements.txt
entirely.oauth2client
from the dependency list insetup.py
; addgoogle-auth
andrequests
.*
@jonparrott -- please verify that this is correct.Done.jjg+google-cloud-python@google.com
togoogleapis-packages@google.com
.proto-google-cloud-*
.google.cloud.gapic
,google.cloud.proto
,google.cloud.gapic.{api}
,google.cloud.proto.{api}
tonamespace_packages
.Tests
tests/gapic/vN
. Updated now that we have system tests: See Reorganize GAPIC tests #1401.tox.ini
, add appropriatenox.py
.Protos
ref/
directory with the rawproto
files; add this toMANIFEST.in
.The text was updated successfully, but these errors were encountered: