forked from googleapis/google-cloud-python
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconf.py
More file actions
97 lines (81 loc) · 19 KB
/
conf.py
File metadata and controls
97 lines (81 loc) · 19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright 2016 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# google-cloud documentation build configuration file, created by
# sphinx-quickstart on Tue Jan 21 22:24:47 2014.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import email
import os
import pkg_resources
import shutil
from pathlib import Path
from sphinx.util import logging
logger = logging.getLogger(__name__)
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
# sys.path.insert(0, os.path.abspath('..'))
# -- General configuration -----------------------------------------------------
# If your documentation needs a minimal Sphinx version, state it here.
needs_sphinx = '1.6.3'
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.doctest',
'sphinx.ext.intersphinx',
'sphinx.ext.napoleon',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
# Allow markdown includes (so releases.md can include CHANGLEOG.md)
# http://www.sphinx-doc.org/en/master/markdown.html
source_parsers = {
'.md': 'recommonmark.parser.CommonMarkParser',
}
master_doc = 'index'
# The suffix of source filenames.
source_suffix = ['.rst', '.md']
# General information about the project.
project = u'google-cloud'
copyright = u'2014-2017, Google'
# Static HTML pages, e.g. to support redirects
# See: https://tech.signavio.com/2017/managing-sphinx-redirects
# HTML pages to be copied from source to target
# list obtained with glob.glob("**/*.html", recursive=True)
static_html_pages = ['404.html', 'versions.html', 'genindex.html', 'index.html', 'search.html', 'py-modindex.html', 'releases.html', 'datastore/transactions.html', 'datastore/client.html', 'datastore/changelog.html', 'datastore/entities.html', 'datastore/keys.html', 'datastore/usage.html', 'datastore/helpers.html', 'datastore/queries.html', 'datastore/batches.html', 'runtimeconfig/client.html', 'runtimeconfig/changelog.html', 'runtimeconfig/variable.html', 'runtimeconfig/config.html', 'runtimeconfig/usage.html', 'dataproc/changelog.html', 'dataproc/index.html', 'dataproc/gapic/v1/api.html', 'dataproc/gapic/v1/types.html', 'dlp/changelog.html', 'dlp/index.html', 'dlp/gapic/v2/api.html', 'dlp/gapic/v2/types.html', 'oslogin/changelog.html', 'oslogin/index.html', 'oslogin/gapic/v1/api.html', 'oslogin/gapic/v1/types.html', 'texttospeech/changelog.html', 'texttospeech/index.html', 'texttospeech/gapic/v1beta1/api.html', 'texttospeech/gapic/v1beta1/types.html', 'monitoring/resource.html', 'monitoring/client.html', 'monitoring/changelog.html', 'monitoring/timeseries.html', 'monitoring/query.html', 'monitoring/usage.html', 'monitoring/group.html', 'monitoring/label.html', 'monitoring/metric.html', 'translate/client.html', 'translate/changelog.html', 'translate/usage.html', 'logging/sink.html', 'logging/client.html', 'logging/changelog.html', 'logging/handlers-container-engine.html', 'logging/transports-sync.html', 'logging/transports-thread.html', 'logging/entries.html', 'logging/logger.html', 'logging/usage.html', 'logging/handlers-app-engine.html', 'logging/transports-base.html', 'logging/handlers.html', 'logging/stdlib-usage.html', 'logging/metric.html', 'spanner/database-api.html', 'spanner/changelog.html', 'spanner/session-api.html', 'spanner/advanced-session-pool-topics.html', 'spanner/snapshot-usage.html', 'spanner/client-api.html', 'spanner/instance-api.html', 'spanner/batch-api.html', 'spanner/streamed-api.html', 'spanner/usage.html', 'spanner/keyset-api.html', 'spanner/api-reference.html', 'spanner/snapshot-api.html', 'spanner/database-usage.html', 'spanner/instance-usage.html', 'spanner/batch-usage.html', 'spanner/transaction-usage.html', 'spanner/transaction-api.html', 'spanner/gapic/v1/transactions.html', 'spanner/gapic/v1/admin_database_api.html', 'spanner/gapic/v1/api.html', 'spanner/gapic/v1/admin_instance_types.html', 'spanner/gapic/v1/types.html', 'spanner/gapic/v1/admin_database_types.html', 'spanner/gapic/v1/admin_instance_api.html', 'core/client.html', 'core/page_iterator.html', 'core/path_template.html', 'core/exceptions.html', 'core/timeout.html', 'core/iam.html', 'core/api_core_changelog.html', 'core/config.html', 'core/operation.html', 'core/core_changelog.html', 'core/index.html', 'core/operations_client.html', 'core/helpers.html', 'core/retry.html', 'core/auth.html', 'bigquery_datatransfer/changelog.html', 'bigquery_datatransfer/index.html', 'bigquery_datatransfer/gapic/v1/api.html', 'bigquery_datatransfer/gapic/v1/types.html', 'storage/batch.html', 'storage/client.html', 'storage/changelog.html', 'storage/acl.html', 'storage/blobs.html', 'storage/buckets.html', 'storage/client_old.html', 'dns/client.html', 'dns/changelog.html', 'dns/usage.html', 'dns/resource-record-set.html', 'dns/changes.html', 'dns/zone.html', 'vision/changelog.html', 'vision/index.html', 'vision/gapic/v1/api.html', 'vision/gapic/v1/types.html', 'vision/gapic/v1p2beta1/api.html', 'vision/gapic/v1p2beta1/types.html', 'resource-manager/client.html', 'resource-manager/changelog.html', 'resource-manager/project.html', 'resource-manager/api.html', 'firestore/batch.html', 'firestore/client.html', 'firestore/changelog.html', 'firestore/constants.html', 'firestore/transaction.html', 'firestore/types.html', 'firestore/query.html', 'firestore/index.html', 'firestore/document.html', 'firestore/collection.html', 'bigquery/dbapi.html', 'bigquery/reference.html', 'bigquery/changelog.html', 'bigquery/usage.html', 'language/changelog.html', 'language/usage.html', 'language/gapic/v1/api.html', 'language/gapic/v1/types.html', 'language/gapic/v1beta2/api.html', 'language/gapic/v1beta2/types.html', 'videointelligence/changelog.html', 'videointelligence/index.html', 'videointelligence/gapic/v1/api.html', 'videointelligence/gapic/v1/types.html', 'videointelligence/gapic/v1beta2/api.html', 'videointelligence/gapic/v1beta2/types.html', 'videointelligence/gapic/v1p1beta1/api.html', 'videointelligence/gapic/v1p1beta1/types.html', 'videointelligence/gapic/v1beta1/api.html', 'videointelligence/gapic/v1beta1/types.html', 'container/changelog.html', 'container/index.html', 'container/gapic/v1/api.html', 'container/gapic/v1/types.html', 'pubsub/changelog.html', 'pubsub/types.html', 'pubsub/index.html', 'pubsub/subscriber/index.html', 'pubsub/subscriber/api/policy.html', 'pubsub/subscriber/api/client.html', 'pubsub/subscriber/api/message.html', 'pubsub/publisher/index.html', 'pubsub/publisher/api/batch.html', 'pubsub/publisher/api/client.html', 'trace/changelog.html', 'trace/apis.html', 'trace/starting.html', 'trace/index.html', 'speech/changelog.html', 'speech/index.html', 'speech/gapic/v1/api.html', 'speech/gapic/v1/types.html', 'speech/gapic/v1p1beta1/api.html', 'speech/gapic/v1p1beta1/types.html', 'error-reporting/client.html', 'error-reporting/changelog.html', 'error-reporting/usage.html', 'error-reporting/util.html', '_modules/index.html', '_modules/datetime.html', '_modules/google/api_core/page_iterator.html', '_modules/google/api_core/path_template.html', '_modules/google/api_core/exceptions.html', '_modules/google/api_core/timeout.html', '_modules/google/api_core/grpc_helpers.html', '_modules/google/api_core/operation.html', '_modules/google/api_core/general_helpers.html', '_modules/google/api_core/retry.html', '_modules/google/api_core/datetime_helpers.html', '_modules/google/api_core/operations_v1/operations_client.html', '_modules/google/protobuf/struct_pb2.html', '_modules/google/protobuf/descriptor_pb2.html', '_modules/google/cloud/videointelligence_v1p1beta1.html', '_modules/google/cloud/vision_v1.html', '_modules/google/cloud/bigquery_datatransfer_v1.html', '_modules/google/cloud/client.html', '_modules/google/cloud/dlp_v2.html', '_modules/google/cloud/vision_v1p2beta1.html', '_modules/google/cloud/container_v1.html', '_modules/google/cloud/iam.html', '_modules/google/cloud/speech_v1p1beta1.html', '_modules/google/cloud/videointelligence_v1beta1.html', '_modules/google/cloud/language_v1beta2.html', '_modules/google/cloud/texttospeech_v1beta1.html', '_modules/google/cloud/spanner_admin_database_v1.html', '_modules/google/cloud/speech_v1.html', '_modules/google/cloud/spanner_admin_instance_v1.html', '_modules/google/cloud/videointelligence_v1.html', '_modules/google/cloud/videointelligence_v1beta2.html', '_modules/google/cloud/language_v1.html', '_modules/google/cloud/oslogin_v1.html', '_modules/google/cloud/vision_helpers.html', '_modules/google/cloud/dataproc_v1.html', '_modules/google/cloud/vision_v1/types.html', '_modules/google/cloud/vision_v1/gapic/image_annotator_client.html', '_modules/google/cloud/vision_v1/proto/image_annotator_pb2.html', '_modules/google/cloud/vision_v1/proto/web_detection_pb2.html', '_modules/google/cloud/vision_v1/proto/text_annotation_pb2.html', '_modules/google/cloud/firestore_v1beta1/batch.html', '_modules/google/cloud/firestore_v1beta1/client.html', '_modules/google/cloud/firestore_v1beta1/transaction.html', '_modules/google/cloud/firestore_v1beta1/types.html', '_modules/google/cloud/firestore_v1beta1/query.html', '_modules/google/cloud/firestore_v1beta1/document.html', '_modules/google/cloud/firestore_v1beta1/collection.html', '_modules/google/cloud/firestore_v1beta1/_helpers.html', '_modules/google/cloud/firestore_v1beta1/proto/document_pb2.html', '_modules/google/cloud/firestore_v1beta1/proto/query_pb2.html', '_modules/google/cloud/firestore_v1beta1/proto/common_pb2.html', '_modules/google/cloud/firestore_v1beta1/proto/write_pb2.html', '_modules/google/cloud/firestore_v1beta1/proto/firestore_pb2.html', '_modules/google/cloud/datastore/batch.html', '_modules/google/cloud/datastore/client.html', '_modules/google/cloud/datastore/transaction.html', '_modules/google/cloud/datastore/key.html', '_modules/google/cloud/datastore/entity.html', '_modules/google/cloud/datastore/query.html', '_modules/google/cloud/datastore/helpers.html', '_modules/google/cloud/error_reporting/client.html', '_modules/google/cloud/error_reporting/util.html', '_modules/google/cloud/bigquery_datatransfer_v1/types.html', '_modules/google/cloud/bigquery_datatransfer_v1/gapic/data_transfer_service_client.html', '_modules/google/cloud/runtimeconfig/client.html', '_modules/google/cloud/runtimeconfig/variable.html', '_modules/google/cloud/runtimeconfig/config.html', '_modules/google/cloud/dataproc_v1/types.html', '_modules/google/cloud/dataproc_v1/gapic/cluster_controller_client.html', '_modules/google/cloud/dataproc_v1/gapic/job_controller_client.html', '_modules/google/cloud/dataproc_v1/proto/jobs_pb2.html', '_modules/google/cloud/dataproc_v1/proto/clusters_pb2.html', '_modules/google/cloud/dataproc_v1/proto/operations_pb2.html', '_modules/google/cloud/pubsub_v1/types.html', '_modules/google/cloud/pubsub_v1/gapic/subscriber_client.html', '_modules/google/cloud/pubsub_v1/gapic/publisher_client.html', '_modules/google/cloud/pubsub_v1/subscriber/client.html', '_modules/google/cloud/pubsub_v1/subscriber/message.html', '_modules/google/cloud/pubsub_v1/subscriber/policy/thread.html', '_modules/google/cloud/pubsub_v1/proto/pubsub_pb2.html', '_modules/google/cloud/pubsub_v1/publisher/client.html', '_modules/google/cloud/pubsub_v1/publisher/batch/base.html', '_modules/google/cloud/pubsub_v1/publisher/batch/thread.html', '_modules/google/cloud/videointelligence_v1p1beta1/types.html', '_modules/google/cloud/videointelligence_v1p1beta1/gapic/video_intelligence_service_client.html', '_modules/google/cloud/translate_v2/client.html', '_modules/google/cloud/speech_v1/types.html', '_modules/google/cloud/speech_v1/helpers.html', '_modules/google/cloud/speech_v1/gapic/speech_client.html', '_modules/google/cloud/resource_manager/client.html', '_modules/google/cloud/resource_manager/project.html', '_modules/google/cloud/container_v1/types.html', '_modules/google/cloud/container_v1/gapic/cluster_manager_client.html', '_modules/google/cloud/container_v1/proto/cluster_service_pb2.html', '_modules/google/cloud/videointelligence_v1beta2/types.html', '_modules/google/cloud/videointelligence_v1beta2/gapic/video_intelligence_service_client.html', '_modules/google/cloud/monitoring/resource.html', '_modules/google/cloud/monitoring/client.html', '_modules/google/cloud/monitoring/timeseries.html', '_modules/google/cloud/monitoring/query.html', '_modules/google/cloud/monitoring/group.html', '_modules/google/cloud/monitoring/label.html', '_modules/google/cloud/monitoring/metric.html', '_modules/google/cloud/language_v1/types.html', '_modules/google/cloud/language_v1/gapic/language_service_client.html', '_modules/google/cloud/language_v1/proto/language_service_pb2.html', '_modules/google/cloud/logging/sink.html', '_modules/google/cloud/logging/client.html', '_modules/google/cloud/logging/entries.html', '_modules/google/cloud/logging/logger.html', '_modules/google/cloud/logging/metric.html', '_modules/google/cloud/logging/handlers/app_engine.html', '_modules/google/cloud/logging/handlers/container_engine.html', '_modules/google/cloud/logging/handlers/handlers.html', '_modules/google/cloud/logging/handlers/transports/sync.html', '_modules/google/cloud/logging/handlers/transports/base.html', '_modules/google/cloud/logging/handlers/transports/background_thread.html', '_modules/google/cloud/videointelligence_v1/types.html', '_modules/google/cloud/videointelligence_v1/gapic/video_intelligence_service_client.html', '_modules/google/cloud/speech_v1p1beta1/types.html', '_modules/google/cloud/speech_v1p1beta1/gapic/speech_client.html', '_modules/google/cloud/storage/batch.html', '_modules/google/cloud/storage/client.html', '_modules/google/cloud/storage/bucket.html', '_modules/google/cloud/storage/blob.html', '_modules/google/cloud/storage/acl.html', '_modules/google/cloud/storage/_helpers.html', '_modules/google/cloud/dns/client.html', '_modules/google/cloud/dns/changes.html', '_modules/google/cloud/dns/zone.html', '_modules/google/cloud/dns/resource_record_set.html', '_modules/google/cloud/vision_v1p2beta1/types.html', '_modules/google/cloud/vision_v1p2beta1/gapic/image_annotator_client.html', '_modules/google/cloud/vision_v1p2beta1/proto/image_annotator_pb2.html', '_modules/google/cloud/vision_v1p2beta1/proto/web_detection_pb2.html', '_modules/google/cloud/vision_v1p2beta1/proto/text_annotation_pb2.html', '_modules/google/cloud/texttospeech_v1beta1/types.html', '_modules/google/cloud/texttospeech_v1beta1/gapic/text_to_speech_client.html', '_modules/google/cloud/bigquery/client.html', '_modules/google/cloud/bigquery/dataset.html', '_modules/google/cloud/bigquery/magics.html', '_modules/google/cloud/bigquery/schema.html', '_modules/google/cloud/bigquery/external_config.html', '_modules/google/cloud/bigquery/query.html', '_modules/google/cloud/bigquery/job.html', '_modules/google/cloud/bigquery/table.html', '_modules/google/cloud/bigquery/dbapi/connection.html', '_modules/google/cloud/bigquery/dbapi/cursor.html', '_modules/google/cloud/bigquery/dbapi/exceptions.html', '_modules/google/cloud/bigquery/dbapi/types.html', '_modules/google/cloud/language_v1beta2/types.html', '_modules/google/cloud/language_v1beta2/gapic/language_service_client.html', '_modules/google/cloud/language_v1beta2/proto/language_service_pb2.html', '_modules/google/cloud/spanner_admin_database_v1/types.html', '_modules/google/cloud/spanner_admin_database_v1/gapic/database_admin_client.html', '_modules/google/cloud/videointelligence_v1beta1/types.html', '_modules/google/cloud/videointelligence_v1beta1/gapic/video_intelligence_service_client.html', '_modules/google/cloud/vision_helpers/decorators.html', '_modules/google/cloud/spanner_admin_instance_v1/types.html', '_modules/google/cloud/spanner_admin_instance_v1/gapic/instance_admin_client.html', '_modules/google/cloud/oslogin_v1/types.html', '_modules/google/cloud/oslogin_v1/gapic/os_login_service_client.html', '_modules/google/cloud/oslogin_v1/proto/oslogin_pb2.html', '_modules/google/cloud/dlp_v2/types.html', '_modules/google/cloud/dlp_v2/gapic/dlp_service_client.html', '_modules/google/cloud/bigtable/cluster.html', '_modules/google/cloud/bigtable/client.html', '_modules/google/cloud/bigtable/row_data.html', '_modules/google/cloud/bigtable/instance.html', '_modules/google/cloud/bigtable/column_family.html', '_modules/google/cloud/bigtable/row_filters.html', '_modules/google/cloud/bigtable/row.html', '_modules/google/cloud/bigtable/table.html', '_modules/google/cloud/spanner_v1/batch.html', '_modules/google/cloud/spanner_v1/client.html', '_modules/google/cloud/spanner_v1/instance.html', '_modules/google/cloud/spanner_v1/streamed.html', '_modules/google/cloud/spanner_v1/transaction.html', '_modules/google/cloud/spanner_v1/pool.html', '_modules/google/cloud/spanner_v1/database.html', '_modules/google/cloud/spanner_v1/types.html', '_modules/google/cloud/spanner_v1/session.html', '_modules/google/cloud/spanner_v1/snapshot.html', '_modules/google/cloud/spanner_v1/keyset.html', '_modules/google/cloud/spanner_v1/proto/type_pb2.html', '_modules/google/cloud/spanner_v1/proto/spanner_pb2.html', '_modules/google/cloud/spanner_v1/proto/mutation_pb2.html', '_modules/google/cloud/spanner_v1/proto/transaction_pb2.html', '_modules/google/cloud/spanner_v1/proto/query_plan_pb2.html', 'bigtable/cluster.html', 'bigtable/client.html', 'bigtable/changelog.html', 'bigtable/column-family.html', 'bigtable/instance.html', 'bigtable/instance-api.html', 'bigtable/row-data.html', 'bigtable/row-filters.html', 'bigtable/data-api.html', 'bigtable/usage.html', 'bigtable/row.html', 'bigtable/table-api.html', 'bigtable/table.html', 'bigtable/client-intro.html']
def copy_static_html_pages(app, exception):
logger.info('Copying static html pages...')
if exception is None and (app.builder.name == 'html' or app.builder.name == 'readthedocs'):
for static_html_page in static_html_pages:
target_path = Path(app.outdir + '/' + static_html_page)
src_path = Path(app.srcdir + '/' + static_html_page)
if os.path.isfile(src_path):
logger.info(
'Copying static html: %s -> %s', src_path, target_path)
if not target_path.parent.exists():
target_path.parent.mkdir(parents=True)
shutil.copyfile(src_path, target_path)
def setup(app):
app.connect('build-finished', copy_static_html_pages)