From 37c1f9e5d1035b3d5a72fe2e36333af65b68ce0a Mon Sep 17 00:00:00 2001 From: Tres Seaver Date: Wed, 19 Sep 2018 16:26:23 -0400 Subject: [PATCH] runtimeconfig: prep docs for repo split. (#6023) - Move contents of 'docs/runtimeconfig/' to 'runtimeconfig/docs'. - Rename 'runtimeconfig/docs/usage.rst' to 'runtimeconfig/docs/index.rst', and add a static redirect page, 'runtimeconfig/docs/usage.html'. - Harmonize / DRY 'runtimeconfig/README.rst' / 'runtimeconfig/docs/index.rst'. Toward #5912 --- docs/conf.py | 1 + docs/index.rst | 2 +- docs/runtimeconfig | 1 + docs/runtimeconfig/changelog.md | 1 - docs/runtimeconfig/usage.rst | 37 -------- runtimeconfig/README.rst | 92 ++++++++++++------- runtimeconfig/docs/changelog.md | 1 + .../docs}/client.rst | 0 .../docs}/config.rst | 0 runtimeconfig/docs/index.rst | 22 +++++ runtimeconfig/docs/usage.html | 8 ++ .../docs}/variable.rst | 0 12 files changed, 92 insertions(+), 73 deletions(-) create mode 120000 docs/runtimeconfig delete mode 120000 docs/runtimeconfig/changelog.md delete mode 100644 docs/runtimeconfig/usage.rst create mode 120000 runtimeconfig/docs/changelog.md rename {docs/runtimeconfig => runtimeconfig/docs}/client.rst (100%) rename {docs/runtimeconfig => runtimeconfig/docs}/config.rst (100%) create mode 100644 runtimeconfig/docs/index.rst create mode 100644 runtimeconfig/docs/usage.html rename {docs/runtimeconfig => runtimeconfig/docs}/variable.rst (100%) diff --git a/docs/conf.py b/docs/conf.py index 8d5a573c03a8..9a087ca9b66c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -331,6 +331,7 @@ static_html_pages = [ 'datastore/usage.html', 'bigquery/usage.html', + 'runtimeconfig/usage.html', 'spanner/usage.html', ] diff --git a/docs/index.rst b/docs/index.rst index 1e7560c3db26..2ea8fe8e780e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,7 +21,7 @@ OSLogin Redis Resource Manager - Runtime Configuration + Runtime Configuration Security Scanner Spanner Speech diff --git a/docs/runtimeconfig b/docs/runtimeconfig new file mode 120000 index 000000000000..4a0a8ad2ddea --- /dev/null +++ b/docs/runtimeconfig @@ -0,0 +1 @@ +../runtimeconfig/docs \ No newline at end of file diff --git a/docs/runtimeconfig/changelog.md b/docs/runtimeconfig/changelog.md deleted file mode 120000 index 9ee227a4a6f8..000000000000 --- a/docs/runtimeconfig/changelog.md +++ /dev/null @@ -1 +0,0 @@ -../../runtimeconfig/CHANGELOG.md \ No newline at end of file diff --git a/docs/runtimeconfig/usage.rst b/docs/runtimeconfig/usage.rst deleted file mode 100644 index 4a1189224120..000000000000 --- a/docs/runtimeconfig/usage.rst +++ /dev/null @@ -1,37 +0,0 @@ -Runtimeconfig -============= - -.. toctree:: - :maxdepth: 2 - :hidden: - - client - config - variable - -Installation ------------- - -Install the ``google-cloud-runtimeconfig`` library using ``pip``: - -.. code-block:: console - - $ pip install google-cloud-runtimeconfig - -Modules -------- - -.. automodule:: google.cloud.runtimeconfig - :members: - :show-inheritance: - -Changelog ---------- - -For a list of all ``google-cloud-runtimeconfig`` releases: - -.. toctree:: - :maxdepth: 2 - - changelog - diff --git a/runtimeconfig/README.rst b/runtimeconfig/README.rst index 4c637cf320a1..f732b0ae0af1 100644 --- a/runtimeconfig/README.rst +++ b/runtimeconfig/README.rst @@ -1,59 +1,83 @@ Python Client for Google Cloud RuntimeConfig ============================================ - Python idiomatic client for `Google Cloud RuntimeConfig`_ - -.. _Google Cloud RuntimeConfig: https://cloud.google.com/deployment-manager/runtime-configurator/ - |alpha| |pypi| |versions| -- `Documentation`_ +The `Google Cloud RuntimeConfig`_ API enables developers to dynamically +configure and expose variables through Google Cloud Platform. In addition, you +can also set Watchers and Waiters that will watch for changes to your data and +return based on certain conditions. -.. _Documentation: http://googlecloudplatform.github.io/google-cloud-python/ +- `Client Library Documentation`_ +- `Product Documentation`_ .. |alpha| image:: https://img.shields.io/badge/status-alpha-orange.svg +.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-runtimeconfig.svg + :target: https://pypi.org/project/google-cloud-runtimeconfig/ +.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-runtimeconfig.svg + :target: https://pypi.org/project/google-cloud-runtimeconfig/ +.. _Google Cloud RuntimeConfig: https://cloud.google.com/deployment-manager/runtime-configurator/ +.. _Client Library Documentation: http://googlecloudplatform.github.io/google-cloud-python/runtimeconfig/index.html +.. _Product Documentation: https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/ **This client library is currently in alpha and may be subject to change.** Quick Start ----------- -:: +In order to use this library, you first need to go through the following steps: - $ pip install --upgrade google-cloud-runtimeconfig +1. `Select or create a Cloud Platform project.`_ +2. `Enable billing for your project.`_ +3. `Enable the Google Cloud Datastore API.`_ +4. `Setup Authentication.`_ -For more information on setting up your Python development environment, -such as installing ``pip`` and ``virtualenv`` on your system, please refer -to `Python Development Environment Setup Guide`_ for Google Cloud Platform. +.. _Select or create a Cloud Platform project.: https://console.cloud.google.com/project +.. _Enable billing for your project.: https://cloud.google.com/billing/docs/how-to/modify-project#enable_billing_for_a_project +.. _Enable the Google Cloud Datastore API.: https://cloud.google.com/runtimeconfig +.. _Setup Authentication.: https://googlecloudplatform.github.io/google-cloud-python/latest/core/auth.html -.. _Python Development Environment Setup Guide: https://cloud.google.com/python/setup +Installation +~~~~~~~~~~~~ -Authentication --------------- +Install this library in a `virtualenv`_ using pip. `virtualenv`_ is a tool to +create isolated Python environments. The basic problem it addresses is one of +dependencies and versions, and indirectly permissions. -With ``google-cloud-python`` we try to make authentication as painless as -possible. Check out the `Authentication section`_ in our documentation to -learn more. You may also find the `authentication document`_ shared by all -the ``google-cloud-*`` libraries to be helpful. +With `virtualenv`_, it's possible to install this library without needing system +install permissions, and without clashing with the installed system +dependencies. -.. _Authentication section: https://google-cloud-python.readthedocs.io/en/latest/core/auth.html -.. _authentication document: https://github.com/GoogleCloudPlatform/google-cloud-common/tree/master/authentication +.. _`virtualenv`: https://virtualenv.pypa.io/en/latest/ -Using the API -------------- -The Google Cloud `RuntimeConfig`_ (`RuntimeConfig API docs`_) API enables -developers to dynamically configure and expose variables through Google Cloud -Platform. In addition, you can also set Watchers and Waiters that will watch -for changes to your data and return based on certain conditions. +Mac/Linux +^^^^^^^^^ -.. _RuntimeConfig: https://cloud.google.com/deployment-manager/runtime-configurator/ -.. _RuntimeConfig API docs: https://cloud.google.com/deployment-manager/runtime-configurator/reference/rest/ +.. code-block:: console + + pip install virtualenv + virtualenv + source /bin/activate + /bin/pip install google-cloud-runtimeconfig + + +Windows +^^^^^^^ + +.. code-block:: console + + pip install virtualenv + virtualenv + \Scripts\activate + \Scripts\pip.exe install google-cloud-runtimeconfig + +Next Steps +~~~~~~~~~~ + +- Read the `Client Library Documentation`_ for Google Cloud RuntimeConfig + API to see other available methods on the client. +- Read the `Product documentation`_ to learn + more about the product and see How-to Guides. -See the ``google-cloud-python`` API runtimeconfig `Documentation`_ to learn -how to interact with Cloud RuntimeConfig using this Client Library. -.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-runtimeconfig.svg - :target: https://pypi.org/project/google-cloud-runtimeconfig/ -.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-runtimeconfig.svg - :target: https://pypi.org/project/google-cloud-runtimeconfig/ diff --git a/runtimeconfig/docs/changelog.md b/runtimeconfig/docs/changelog.md new file mode 120000 index 000000000000..04c99a55caae --- /dev/null +++ b/runtimeconfig/docs/changelog.md @@ -0,0 +1 @@ +../CHANGELOG.md \ No newline at end of file diff --git a/docs/runtimeconfig/client.rst b/runtimeconfig/docs/client.rst similarity index 100% rename from docs/runtimeconfig/client.rst rename to runtimeconfig/docs/client.rst diff --git a/docs/runtimeconfig/config.rst b/runtimeconfig/docs/config.rst similarity index 100% rename from docs/runtimeconfig/config.rst rename to runtimeconfig/docs/config.rst diff --git a/runtimeconfig/docs/index.rst b/runtimeconfig/docs/index.rst new file mode 100644 index 000000000000..365dadd2f921 --- /dev/null +++ b/runtimeconfig/docs/index.rst @@ -0,0 +1,22 @@ +.. include:: /../runtimeconfig/README.rst + +API Reference +============= + +.. toctree:: + :maxdepth: 2 + + client + config + variable + +Changelog +--------- + +For a list of all ``google-cloud-runtimeconfig`` releases: + +.. toctree:: + :maxdepth: 2 + + changelog + diff --git a/runtimeconfig/docs/usage.html b/runtimeconfig/docs/usage.html new file mode 100644 index 000000000000..9b81d6976cda --- /dev/null +++ b/runtimeconfig/docs/usage.html @@ -0,0 +1,8 @@ + + + + + + diff --git a/docs/runtimeconfig/variable.rst b/runtimeconfig/docs/variable.rst similarity index 100% rename from docs/runtimeconfig/variable.rst rename to runtimeconfig/docs/variable.rst