Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 4dddd59

Browse files
docs: remove note on editable installs (#5)
1 parent ff52f3b commit 4dddd59

File tree

7 files changed

+140
-45
lines changed

7 files changed

+140
-45
lines changed

CONTRIBUTING.rst

-19
Original file line numberDiff line numberDiff line change
@@ -80,25 +80,6 @@ We use `nox <https://nox.readthedocs.io/en/latest/>`__ to instrument our tests.
8080

8181
.. nox: https://pypi.org/project/nox/
8282
83-
Note on Editable Installs / Develop Mode
84-
========================================
85-
86-
- As mentioned previously, using ``setuptools`` in `develop mode`_
87-
or a ``pip`` `editable install`_ is not possible with this
88-
library. This is because this library uses `namespace packages`_.
89-
For context see `Issue #2316`_ and the relevant `PyPA issue`_.
90-
91-
Since ``editable`` / ``develop`` mode can't be used, packages
92-
need to be installed directly. Hence your changes to the source
93-
tree don't get incorporated into the **already installed**
94-
package.
95-
96-
.. _namespace packages: https://www.python.org/dev/peps/pep-0420/
97-
.. _Issue #2316: https://github.com/GoogleCloudPlatform/google-cloud-python/issues/2316
98-
.. _PyPA issue: https://github.com/pypa/packaging-problems/issues/12
99-
.. _develop mode: https://setuptools.readthedocs.io/en/latest/setuptools.html#development-mode
100-
.. _editable install: https://pip.pypa.io/en/stable/reference/pip_install/#editable-installs
101-
10283
*****************************************
10384
I'm getting weird errors... Can you help?
10485
*****************************************

docs/conf.py

+1
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
"sphinx.ext.autosummary",
4040
"sphinx.ext.intersphinx",
4141
"sphinx.ext.coverage",
42+
"sphinx.ext.doctest",
4243
"sphinx.ext.napoleon",
4344
"sphinx.ext.todo",
4445
"sphinx.ext.viewcode",

google/cloud/workflows/executions_v1beta/services/executions/client.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from distutils import util
2020
import os
2121
import re
22-
from typing import Callable, Dict, Sequence, Tuple, Type, Union
22+
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
2323
import pkg_resources
2424

25-
import google.api_core.client_options as ClientOptions # type: ignore
25+
from google.api_core import client_options as client_options_lib # type: ignore
2626
from google.api_core import exceptions # type: ignore
2727
from google.api_core import gapic_v1 # type: ignore
2828
from google.api_core import retry as retries # type: ignore
@@ -153,9 +153,9 @@ def parse_execution_path(path: str) -> Dict[str, str]:
153153
def __init__(
154154
self,
155155
*,
156-
credentials: credentials.Credentials = None,
157-
transport: Union[str, ExecutionsTransport] = None,
158-
client_options: ClientOptions = None,
156+
credentials: Optional[credentials.Credentials] = None,
157+
transport: Union[str, ExecutionsTransport, None] = None,
158+
client_options: Optional[client_options_lib.ClientOptions] = None,
159159
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
160160
) -> None:
161161
"""Instantiate the executions client.
@@ -169,8 +169,8 @@ def __init__(
169169
transport (Union[str, ~.ExecutionsTransport]): The
170170
transport to use. If set to None, a transport is chosen
171171
automatically.
172-
client_options (ClientOptions): Custom options for the client. It
173-
won't take effect if a ``transport`` instance is provided.
172+
client_options (client_options_lib.ClientOptions): Custom options for the
173+
client. It won't take effect if a ``transport`` instance is provided.
174174
(1) The ``api_endpoint`` property can be used to override the
175175
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
176176
environment variable can also be used to override the endpoint:
@@ -196,9 +196,9 @@ def __init__(
196196
creation failed for any reason.
197197
"""
198198
if isinstance(client_options, dict):
199-
client_options = ClientOptions.from_dict(client_options)
199+
client_options = client_options_lib.from_dict(client_options)
200200
if client_options is None:
201-
client_options = ClientOptions.ClientOptions()
201+
client_options = client_options_lib.ClientOptions()
202202

203203
# Create SSL credentials for mutual TLS if needed.
204204
use_client_cert = bool(

google/cloud/workflows_v1beta/services/workflows/async_client.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@
2828
from google.auth import credentials # type: ignore
2929
from google.oauth2 import service_account # type: ignore
3030

31-
from google.api_core import operation
32-
from google.api_core import operation_async
31+
from google.api_core import operation # type: ignore
32+
from google.api_core import operation_async # type: ignore
3333
from google.cloud.workflows_v1beta.services.workflows import pagers
3434
from google.cloud.workflows_v1beta.types import workflows
3535
from google.protobuf import empty_pb2 as empty # type: ignore

google/cloud/workflows_v1beta/services/workflows/client.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@
1919
from distutils import util
2020
import os
2121
import re
22-
from typing import Callable, Dict, Sequence, Tuple, Type, Union
22+
from typing import Callable, Dict, Optional, Sequence, Tuple, Type, Union
2323
import pkg_resources
2424

25-
import google.api_core.client_options as ClientOptions # type: ignore
25+
from google.api_core import client_options as client_options_lib # type: ignore
2626
from google.api_core import exceptions # type: ignore
2727
from google.api_core import gapic_v1 # type: ignore
2828
from google.api_core import retry as retries # type: ignore
@@ -32,8 +32,8 @@
3232
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3333
from google.oauth2 import service_account # type: ignore
3434

35-
from google.api_core import operation
36-
from google.api_core import operation_async
35+
from google.api_core import operation # type: ignore
36+
from google.api_core import operation_async # type: ignore
3737
from google.cloud.workflows_v1beta.services.workflows import pagers
3838
from google.cloud.workflows_v1beta.types import workflows
3939
from google.protobuf import empty_pb2 as empty # type: ignore
@@ -155,9 +155,9 @@ def parse_workflow_path(path: str) -> Dict[str, str]:
155155
def __init__(
156156
self,
157157
*,
158-
credentials: credentials.Credentials = None,
159-
transport: Union[str, WorkflowsTransport] = None,
160-
client_options: ClientOptions = None,
158+
credentials: Optional[credentials.Credentials] = None,
159+
transport: Union[str, WorkflowsTransport, None] = None,
160+
client_options: Optional[client_options_lib.ClientOptions] = None,
161161
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
162162
) -> None:
163163
"""Instantiate the workflows client.
@@ -171,8 +171,8 @@ def __init__(
171171
transport (Union[str, ~.WorkflowsTransport]): The
172172
transport to use. If set to None, a transport is chosen
173173
automatically.
174-
client_options (ClientOptions): Custom options for the client. It
175-
won't take effect if a ``transport`` instance is provided.
174+
client_options (client_options_lib.ClientOptions): Custom options for the
175+
client. It won't take effect if a ``transport`` instance is provided.
176176
(1) The ``api_endpoint`` property can be used to override the
177177
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
178178
environment variable can also be used to override the endpoint:
@@ -198,9 +198,9 @@ def __init__(
198198
creation failed for any reason.
199199
"""
200200
if isinstance(client_options, dict):
201-
client_options = ClientOptions.from_dict(client_options)
201+
client_options = client_options_lib.from_dict(client_options)
202202
if client_options is None:
203-
client_options = ClientOptions.ClientOptions()
203+
client_options = client_options_lib.ClientOptions()
204204

205205
# Create SSL credentials for mutual TLS if needed.
206206
use_client_cert = bool(

synth.metadata

+116-3
Original file line numberDiff line numberDiff line change
@@ -3,21 +3,30 @@
33
{
44
"git": {
55
"name": ".",
6-
"remote": "sso://devrel/cloud/libraries/python/python-workflows"
6+
"remote": "https://github.com/googleapis/python-workflows.git",
7+
"sha": "ff52f3b063bdd0e84984c8256706b2a7eef59037"
8+
}
9+
},
10+
{
11+
"git": {
12+
"name": "googleapis",
13+
"remote": "https://github.com/googleapis/googleapis.git",
14+
"sha": "2987612c6aacc1857ee35468e7aeb1c393460799",
15+
"internalRef": "333583499"
716
}
817
},
918
{
1019
"git": {
1120
"name": "synthtool",
1221
"remote": "https://github.com/googleapis/synthtool.git",
13-
"sha": "538a68019eb4a36a0cdfa4021f324dd01b784395"
22+
"sha": "a651c5fb763c69a921aecdd3e1d8dc51dbf20f8d"
1423
}
1524
},
1625
{
1726
"git": {
1827
"name": "synthtool",
1928
"remote": "https://github.com/googleapis/synthtool.git",
20-
"sha": "538a68019eb4a36a0cdfa4021f324dd01b784395"
29+
"sha": "a651c5fb763c69a921aecdd3e1d8dc51dbf20f8d"
2130
}
2231
}
2332
],
@@ -40,5 +49,109 @@
4049
"generator": "bazel"
4150
}
4251
}
52+
],
53+
"generatedFiles": [
54+
".flake8",
55+
".github/CONTRIBUTING.md",
56+
".github/ISSUE_TEMPLATE/bug_report.md",
57+
".github/ISSUE_TEMPLATE/feature_request.md",
58+
".github/ISSUE_TEMPLATE/support_request.md",
59+
".github/PULL_REQUEST_TEMPLATE.md",
60+
".github/release-please.yml",
61+
".github/snippet-bot.yml",
62+
".gitignore",
63+
".kokoro/build.sh",
64+
".kokoro/continuous/common.cfg",
65+
".kokoro/continuous/continuous.cfg",
66+
".kokoro/docker/docs/Dockerfile",
67+
".kokoro/docker/docs/fetch_gpg_keys.sh",
68+
".kokoro/docs/common.cfg",
69+
".kokoro/docs/docs-presubmit.cfg",
70+
".kokoro/docs/docs.cfg",
71+
".kokoro/populate-secrets.sh",
72+
".kokoro/presubmit/common.cfg",
73+
".kokoro/presubmit/presubmit.cfg",
74+
".kokoro/publish-docs.sh",
75+
".kokoro/release.sh",
76+
".kokoro/release/common.cfg",
77+
".kokoro/release/release.cfg",
78+
".kokoro/samples/lint/common.cfg",
79+
".kokoro/samples/lint/continuous.cfg",
80+
".kokoro/samples/lint/periodic.cfg",
81+
".kokoro/samples/lint/presubmit.cfg",
82+
".kokoro/samples/python3.6/common.cfg",
83+
".kokoro/samples/python3.6/continuous.cfg",
84+
".kokoro/samples/python3.6/periodic.cfg",
85+
".kokoro/samples/python3.6/presubmit.cfg",
86+
".kokoro/samples/python3.7/common.cfg",
87+
".kokoro/samples/python3.7/continuous.cfg",
88+
".kokoro/samples/python3.7/periodic.cfg",
89+
".kokoro/samples/python3.7/presubmit.cfg",
90+
".kokoro/samples/python3.8/common.cfg",
91+
".kokoro/samples/python3.8/continuous.cfg",
92+
".kokoro/samples/python3.8/periodic.cfg",
93+
".kokoro/samples/python3.8/presubmit.cfg",
94+
".kokoro/test-samples.sh",
95+
".kokoro/trampoline.sh",
96+
".kokoro/trampoline_v2.sh",
97+
".trampolinerc",
98+
"CODE_OF_CONDUCT.md",
99+
"CONTRIBUTING.rst",
100+
"LICENSE",
101+
"MANIFEST.in",
102+
"docs/_static/custom.css",
103+
"docs/_templates/layout.html",
104+
"docs/conf.py",
105+
"docs/executions_v1beta/services.rst",
106+
"docs/executions_v1beta/types.rst",
107+
"docs/multiprocessing.rst",
108+
"docs/workflows_v1beta/services.rst",
109+
"docs/workflows_v1beta/types.rst",
110+
"google/cloud/workflows/__init__.py",
111+
"google/cloud/workflows/executions/__init__.py",
112+
"google/cloud/workflows/executions/py.typed",
113+
"google/cloud/workflows/executions_v1beta/__init__.py",
114+
"google/cloud/workflows/executions_v1beta/py.typed",
115+
"google/cloud/workflows/executions_v1beta/services/__init__.py",
116+
"google/cloud/workflows/executions_v1beta/services/executions/__init__.py",
117+
"google/cloud/workflows/executions_v1beta/services/executions/async_client.py",
118+
"google/cloud/workflows/executions_v1beta/services/executions/client.py",
119+
"google/cloud/workflows/executions_v1beta/services/executions/pagers.py",
120+
"google/cloud/workflows/executions_v1beta/services/executions/transports/__init__.py",
121+
"google/cloud/workflows/executions_v1beta/services/executions/transports/base.py",
122+
"google/cloud/workflows/executions_v1beta/services/executions/transports/grpc.py",
123+
"google/cloud/workflows/executions_v1beta/services/executions/transports/grpc_asyncio.py",
124+
"google/cloud/workflows/executions_v1beta/types/__init__.py",
125+
"google/cloud/workflows/executions_v1beta/types/executions.py",
126+
"google/cloud/workflows/py.typed",
127+
"google/cloud/workflows_v1beta/__init__.py",
128+
"google/cloud/workflows_v1beta/py.typed",
129+
"google/cloud/workflows_v1beta/services/__init__.py",
130+
"google/cloud/workflows_v1beta/services/workflows/__init__.py",
131+
"google/cloud/workflows_v1beta/services/workflows/async_client.py",
132+
"google/cloud/workflows_v1beta/services/workflows/client.py",
133+
"google/cloud/workflows_v1beta/services/workflows/pagers.py",
134+
"google/cloud/workflows_v1beta/services/workflows/transports/__init__.py",
135+
"google/cloud/workflows_v1beta/services/workflows/transports/base.py",
136+
"google/cloud/workflows_v1beta/services/workflows/transports/grpc.py",
137+
"google/cloud/workflows_v1beta/services/workflows/transports/grpc_asyncio.py",
138+
"google/cloud/workflows_v1beta/types/__init__.py",
139+
"google/cloud/workflows_v1beta/types/workflows.py",
140+
"mypy.ini",
141+
"noxfile.py",
142+
"renovate.json",
143+
"scripts/decrypt-secrets.sh",
144+
"scripts/readme-gen/readme_gen.py",
145+
"scripts/readme-gen/templates/README.tmpl.rst",
146+
"scripts/readme-gen/templates/auth.tmpl.rst",
147+
"scripts/readme-gen/templates/auth_api_key.tmpl.rst",
148+
"scripts/readme-gen/templates/install_deps.tmpl.rst",
149+
"scripts/readme-gen/templates/install_portaudio.tmpl.rst",
150+
"setup.cfg",
151+
"testing/.gitignore",
152+
"tests/unit/gapic/executions_v1beta/__init__.py",
153+
"tests/unit/gapic/executions_v1beta/test_executions.py",
154+
"tests/unit/gapic/workflows_v1beta/__init__.py",
155+
"tests/unit/gapic/workflows_v1beta/test_workflows.py"
43156
]
44157
}

tests/unit/gapic/workflows_v1beta/test_workflows.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
from google.api_core import gapic_v1
3232
from google.api_core import grpc_helpers
3333
from google.api_core import grpc_helpers_async
34-
from google.api_core import operation_async
34+
from google.api_core import operation_async # type: ignore
3535
from google.api_core import operations_v1
3636
from google.auth import credentials
3737
from google.auth.exceptions import MutualTLSChannelError

0 commit comments

Comments
 (0)