8000 chore: update to reference main branch after default branch migration… · orossini/python-docs-samples@4fe345a · GitHub
[go: up one dir, main page]

Skip to content

Commit 4fe345a

Browse files
authored
chore: update to reference main branch after default branch migration (GoogleCloudPlatform#7166)
* chore: update to reference main branch * chore: update header * chore: update broken links * chore: fix GCP suffix
1 parent 51a2d7e commit 4fe345a

File tree

86 files changed

+228
-228
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+228
-228
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ Fixes #<ISSUE-NUMBER>
55
Note: It's a good idea to open an issue first for discussion.
66

77
## Checklist
8-
- [ ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md)
9-
- [ ] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#readme-file)
10-
- [ ] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup))
11-
- [ ] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#test-environment-setup))
8+
- [ ] I have followed [Sample Guidelines from AUTHORING_GUIDE.MD](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md)
9+
- [ ] README is updated to include [all relevant information](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#readme-file)
10+
- [ ] **Tests** pass: `nox -s py-3.6` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
11+
- [ ] **Lint** pass: `nox -s lint` (see [Test Environment Setup](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#test-environment-setup))
1212
- [ ] These samples need a new **API enabled** in testing projects to pass (let us know which ones)
1313
- [ ] These samples need a new/updated **env vars** in testing projects set to pass (let us know which ones)
1414
- [ ] Please **merge** this PR for me once it is approved.
15-
- [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/.github/CODEOWNERS) with the codeowners for this sample
15+
- [ ] This sample adds a new sample directory, and I updated the [CODEOWNERS file](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/.github/CODEOWNERS) with the codeowners for this sample

.github/sync-repo-settings.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ squashMergeAllowed: true
2424
# Defaults to `false`
2525
mergeCommitAllowed: false
2626

27-
# Rules for master branch protection
27+
# Rules for main branch protection
2828
branchProtectionRules:
2929
# Identifies the protection rule pattern. Name of the branch to be protected.
30-
# Defaults to `master`
31-
- pattern: master
30+
# Defaults to `main`
31+
- pattern: main
3232
# Can admins overwrite branch protection.
3333
# Defaults to `true`
3434
isAdminEnforced: false

AUTHORING_GUIDE.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ practices as covered below.
2222

2323
We recommend referencing the following samples and sample tests:
2424

25-
* [Storage client samples](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/storage/cloud-client)
25+
* [Storage client samples](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/storage/cloud-client)
2626

2727
### Where should I put my samples?
2828

@@ -79,22 +79,22 @@ for an example.
7979
**python-docs-samples:** Each sample should be in a folder under the top-level folder of
8080
[python-docs-samples](https://github.com/GoogleCloudPlatform/python-docs-samples)
8181
that corresponds to the Google Cloud service or API used by the sample.
82-
For example, a sample demonstrating how to work with BigTable should be
82+
For example, a sample demonstrating how to work with Composer should be
8383
in a subfolder under the
84-
[python-docs-samples/bigtable](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/bigtable)
84+
[python-docs-samples/composer](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/composer)
8585
folder.
8686

8787
Conceptually related samples under a service or API should be grouped into
8888
a subfolder. For example, App Engine Standard samples are under the
89-
[appengine/standard](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/standard)
89+
[appengine/standard](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/appengine/standard)
9090
folder, and App Engine Flex samples are under the
91-
[appengine/flexible](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/appengine/flexible)
91+
[appengine/flexible](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/main/appengine/flexible)
9292
folder.
9393

9494
If your sample is a set of discrete code snippets that each demonstrate a
9595
single operation, these should be grouped into a `snippets` folder. For
9696
example, see the snippets in the
97-
[bigtable/snippets/writes](https://github.com/GoogleCloudPlatform/python-docs-samples/tree/master/bigtable/snippets/writes)
97+
[bigtable/snippets/writes](https://github.com/googleapis/python-bigtable/tree/main/samples/snippets/writes)
9898
folder.
9999

100100
If your sample is a quickstart — intended to demonstrate how to quickly get
@@ -112,9 +112,9 @@ those requirements.
112112

113113
Source code files should always begin with an Apache 2.0 license header. See
114114
the instructions in the repo license file on [how to apply the Apache license
115-
to your work](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/LICENSE#L178-L201).
115+
to your work](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/LICENSE#L178-L201).
116116
For example, see the license header for the [Datastore client quickstart
117-
sample](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/datastore/cloud-client/quickstart.py#L1-L15).
117+
sample](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/datastore/cloud-client/quickstart.py#L1-L15).
118118

119119
### Shebang
120120

@@ -353,7 +353,7 @@ Sample code may be integrated into Google Cloud Documentation through the use
353353
of region tags, which are comments added to the source code to identify code
354354
blocks that correspond to specific topics covered in the documentation. For
355355
example, see
356-
[this sample](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/cloud-sql/mysql/sqlalchemy/main.py)
356+
[this sample](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/cloud-sql/mysql/sqlalchemy/main.py)
357357
— the region tags are the comments that begin with `[START` or `[END`.
358358
359359
The use of region tags is beyond the scope of this document, but if you’re
@@ -387,7 +387,7 @@ payload.
387387
* Samples that use App Engine Standard should use the [App Engine
388388
testbed](https://cloud.google.com/appengine/docs/standard/python/refdocs/google.appengine.ext.testbed)
389389
for system testing, as shown in [this
390-
example](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/localtesting/datastore_test.py).
390+
example](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard/localtesting/datastore_test.py).
391391
* All tests should be independent of one another and order-independent.
392392
* We use parallel processing for tests, so tests should be capable of running in parallel with one another.
393393
* Use pytest's fixture for resource setup and teardown, instead of
@@ -598,7 +598,7 @@ requires a Google Cloud project with billing enabled, as covered under
598598
Once you have your project created and configured, you'll need to set
599599
environment variables to identify the project and resources to be used
600600
by tests. See
601-
[testing/test-env.tmpl.sh](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/testing/test-env.tmpl.sh)
601+
[testing/test-env.tmpl.sh](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/testing/test-env.tmpl.sh)
602602
for a list of all environment variables that must be set manually. Not every
603603
test needs all of these variables. All required environment variables
604604
are listed in `testing/test-env.tmpl.sh`. If you need to add a new secret,
@@ -645,7 +645,7 @@ __Note:__
645645
**Library repositories:** If you are working on an existing project (meaning that a `samples` directory already exists), a `noxfile.py` will already exist within that `samples` directory.
646646
647647
For new samples, create a new `noxfile.py` and paste the contents of
648-
[noxfile-template.py](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile-template.py). Note - there may be a `noxfile.py` in the repo already in the root directory, but this is used for testing the libraries, not the samples, so you will still need to make a samples noxfile.
648+
[noxfile-template.py](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile-template.py). Note - there may be a `noxfile.py` in the repo already in the root directory, but this is used for testing the libraries, not the samples, so you will still need to make a samples noxfile.
649649
650650
**python-docs-samples:** As a temporary workaround, each project currently uses first
651651
`noxfile-template.py` found in a parent folder above the current sample. In

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,4 @@ See [AUTHORING_GUIDE.md](AUTHORING_GUIDE.md).
4545

4646
## Code Reviews
4747

48-
After meeting the above criteria, your code will need to be approved by two reviewers before it can be merged into master. One will be a [CODEOWNER](.github/CODEOWNERS) for the product you are contributing to, and the other will be a repo owner, there to double check for anything that might be detrimental to the overall repo health (things that could cause future tech debt, test flakiness, etc.). Both will automatically be assigned. Some product areas have mulitple folks who can act as the CODEOWNER, and you may be working more closely with a teammate who isn't the automatically assigned reviewer. In that case, it is perfectly fine to manually assign the teammate more familiar with this work as your CODEOWNER reviewer. If you do not hear from your repo owner reviewer within a day (and you know they are not OOO), send them a friendly ping so that you can better understand the review cadence for your PR. All the repo owners are juggling reviews alongside other work, and their velocities can vary, but they are happy to hear from you. If you see that your repo owner reviewer is OOO, you can use the "blunderbuss: assign" label to assign a new reviewer.
48+
After meeting the above criteria, your code will need to be approved by two reviewers before it can be merged into main. One will be a [CODEOWNER](.github/CODEOWNERS) for the product you are contributing to, and the other will be a repo owner, there to double check for anything that might be detrimental to the overall repo health (things that could cause future tech debt, test flakiness, etc.). Both will automatically be assigned. Some product areas have mulitple folks who can act as the CODEOWNER, and you may be working more closely with a teammate who isn't the automatically assigned reviewer. In that case, it is perfectly fine to manually assign the teammate more familiar with this work as your CODEOWNER reviewer. If you do not hear from your repo owner reviewer within a day (and you know they are not OOO), send them a friendly ping so that you can better understand the review cadence for your PR. All the repo owners are juggling reviews alongside other work, and their velocities can vary, but they are happy to hear from you. If you see that your repo owner reviewer is OOO, you can use the "blunderbuss: assign" label to assign a new reviewer.

MAC_SETUP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ created virtual environment. You can install this by running
172172
pyenv will make your virtualenv the default Python. Since you specified
173173
more than one version, it will also add binaries like `python36` and
174174
`python27` to your PATH, which
175-
[nox](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md#using-nox)
175+
[nox](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md#running-tests-with-nox)
176176
uses when picking Python interpreters.
177177
178178
1. Add `.python-version` to your
@@ -181,4 +181,4 @@ created virtual environment. You can install this by running
181181
182182
## More on authoring samples
183183
If you are looking for more information on how to author samples, please view
184-
the [Authoring Guide](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/AUTHORING_GUIDE.md)
184+
the [Authoring Guide](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/AUTHORING_GUIDE.md)

appengine/flexible/django_cloudsql/noxfile_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# the noxfile.py.
1919

2020
# The source of truth:
21-
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py
2222

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.

appengine/flexible/storage/noxfile_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# the noxfile.py.
1919

2020
# The source of truth:
21-
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py
2222

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.

appengine/standard/django/noxfile_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# the noxfile.py.
1919

2020
# The source of truth:
21-
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py
2222

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.

appengine/standard/migration/memorystore/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ with the [Memorystore for Redis offering](https://cloud.google.com/memorystore).
1111
This newer library can be used on App Engine with either Python 2.7
1212
or Python 3.
1313

14-
Code taken from the [Memcache sample](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/memcache/snippets/snippets.py)
14+
Code taken from the [Memcache sample](https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/appengine/standard/memcache/snippets/snippets.py)
1515
is included in this new sample, with each line commented out with two # marks.
1616
This allows the older solution's approach to be contrasted with the
1717
Memorystore for Redis approach.
@@ -32,4 +32,4 @@ To deploy and run this sample in App Engine standard for Python 2.7:
3232
To deploy and run this sample in App Engine standard for Python 3.7:
3333

3434
gcloud app deploy app3.yaml
35-
35+

appengine/standard_python3/bigquery/noxfile_config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
# the noxfile.py.
1919

2020
# The source of truth:
21-
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/noxfile_config.py
21+
# https://github.com/GoogleCloudPlatform/python-docs-samples/blob/main/noxfile_config.py
2222

2323
TEST_CONFIG_OVERRIDE = {
2424
# You can opt out from the test for specific Python versions.

0 commit comments

Comments
 (0)
0