From 00e8579aa4a9e98341cafded0e7e477baab6e71c Mon Sep 17 00:00:00 2001 From: ohmayr Date: Thu, 10 Aug 2023 13:04:12 -0400 Subject: [PATCH] chore: remove experimental note from README (#1719) Co-authored-by: Omair Naveed --- README.rst | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 73 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index d5888edc5d..ef24297730 100644 --- a/README.rst +++ b/README.rst @@ -1,3 +1,5 @@ +.. _codingstyle: + API Client Generator for Python =============================== @@ -15,12 +17,81 @@ to generate a client library. Purpose ------- -This library primarily exists to facilitate experimentation, particularly -regarding: +This library replaces the `monolithic generator`_ +with some improvements: - An explicit normalized format for specifying APIs. - Light weight, in-language code generators. +.. _monolithic generator: https://github.com/googleapis/gapic-generator + + +Bazel +------------- +This generator can be called from Bazel, which is a recommended way of using it inside a continuous integration build or any other automated pipeline. + +Clone the googleapis repository +$ git clone https://github.com/googleapis/googleapis.git + +Create the targets +------------------ +You need to add the following targets to your BUILD.bazel file. + +.. code-block:: c + + load( + "@gapic_generator_python//rules_python_gapic:py_gapic.bzl", + "py_gapic_library" + ) + + load( + "@gapic_generator_python//rules_python_gapic:py_gapic_pkg.bzl", + "py_gapic_assembly_pkg" + ) + + py_gapic_library( + name = "documentai_py_gapic", + srcs = [":documentai_proto"], + ) + + py_gapic_assembly_pkg( + name = "documentai-v1beta2-py", + deps = [ + ":documentai_py_gapic", + ], + ) + + +Compiling an API +---------------- + +Using Bazel: + +.. code-block:: c + + bazel build //google/cloud/documentai/v1beta2:documentai-v1beta2-py + +Using Protoc: + +.. code-block:: c + + # This is assumed to be in the `googleapis` project root. + $ protoc google/cloud/vision/v1/*.proto \ + --python_gapic_out=/dest/ + +Development +------------- +`Development`_ + +.. _Development: https://github.com/googleapis/gapic-generator-python/blob/main/DEVELOPMENT.md + +Contributing +------------- +If you are looking to contribute to the project, please see `Contributing`_ +for guidlines. + +.. _Contributing: https://github.com/googleapis/gapic-generator-python/blob/main/CONTRIBUTING.md + Documentation -------------