You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See [Folder Location](#folder-location). Samples live in this repository, **python-docs-samples**,
30
+
or in a library repository.
31
+
32
+
### Where are the client libraries?
33
+
34
+
Python libraries repositories live in https://github.com/googleapis/ in repositories named **python-API**.
35
+
Each repository contains _one_ library. For example, https://github.com/googleapis/python-bigquery
36
+
contains the `google-cloud-bigquery` library.
37
+
38
+
### Who reviews my PR?
39
+
40
+
This is a work in progress - in **python-docs-samples**, your PR will
41
+
automatically be assigned to one of the owners in [@GoogleCloudPlatform/python-samples-owners](https://github.com/orgs/GoogleCloudPlatform/teams/python-samples-owners).
42
+
You can assign a new person using the `blunderbuss:assign` label if your assignee is OOO or busy.
43
+
You can (and probably should) also assign a teammate in addition to the auto-assigned
44
+
owner to review your code for product-specific needs.
45
+
46
+
In **library repositories** with pre-existing samples GitHub will automatically assign a reviewer
47
+
from python-samples-owners. If no reviewer is automatically assigned, contact [@googleapis/python-samples-owners](https://github.com/orgs/googleapis/teams/python-samples-owners).
48
+
49
+
Feel free to reach out to your assigned reviewer if it's been a few days and you haven't gotten a response!
50
+
51
+
### How do I set up my environment?
52
+
53
+
You should install the latest patch version of each minor version listed in [Python Versions](#python-versions).
54
+
55
+
We recommend using the Python version management tool [Pyenv](https://github.com/pyenv/pyenv) if you are using MacOS or Linux.
56
+
57
+
**Googlers:** See [the internal Python policies doc](https://g3doc.corp.google.com/company/teams/cloud-devrel/dpe/samples/python.md?cl=head).
58
+
59
+
**Using MacOS?:** See [Setting up a Mac development environment with pyenv and pyenv-virtualenv](MAC_SETUP.md).
60
+
61
+
Afterwards, see [Test Environment Setup](#test-environment-setup).
62
+
63
+
18
64
## Sample Guidelines
19
65
20
66
This section covers guidelines for Python samples. Note that
@@ -23,7 +69,7 @@ This section covers guidelines for Python samples. Note that
23
69
### Folder Location
24
70
25
71
Samples that primarily show the use of one client library should be placed in the
26
-
client library repository. Other samples should be placed in this repository
72
+
client library repository`googleapis/python-{api}`. Other samples should be placed in this repository
27
73
`python-docs-samples`.
28
74
29
75
**Library repositories:** Each sample should be in the top-level samples folder `samples`
@@ -54,7 +100,7 @@ folder.
54
100
If your sample is a quickstart — intended to demonstrate how to quickly get
55
101
started with using a service or API — it should be in a _quickstart_ folder.
Type hinting is enforced using [`flake8-annotations`](https://pypi.org/project/flake8-annotations/), which is enabled by setting the `enforce_type_hints` variable to `True`in the appropriate `noxfile_config.py`. Type hinting is expected inall new samples, and will gradually be added to all compatible existing samples.
276
+
Type hinting is enforced using [`flake8-annotations`](https://pypi.org/project/flake8-annotations/), which is enabled by setting the `enforce_type_hints` variable to `True`in the appropriate `noxfile_config.py`. Type hinting is expected inall new samples, and will gradually be added to all compatible existing samples.
231
277
232
278
If there is an `Args` section within the function's docstring, consider
233
279
documenting the argument types there as well. For example:
@@ -269,6 +315,24 @@ If a sample has testing requirements that differ from its runtime requirements
269
315
testing libraries), the testing requirements may be listed in a separate
270
316
`requirements-test.txt`file instead of the main `requirements.txt`file.
271
317
318
+
#### Developing samples for un-released changes
319
+
320
+
Pip has [VCS support](https://pip.pypa.io/en/stable/cli/pip_install/#vcs-support). Use the branch name or commit hash instead of the package name.
0 commit comments