Skip to content

Commit f706cfd

Browse files
busunkim96mik-lajcrwilcox
authored
chore: use nox and release-please; drop 3.4 (#852)
Co-authored-by: Kamil Breguła <[email protected]> Co-authored-by: Christopher Wilcox <[email protected]>
1 parent 8ed729f commit f706cfd

21 files changed

+312
-77
lines changed

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,33 @@ Thanks for stopping by to let us know something could be better!
1111
Please run down the following list and make sure you've tried the usual "quick fixes":
1212

1313
- Search the issues already opened: https://github.com/googleapis/google-api-python-client/issues
14-
- If you have a question, post on Stackoverflow under the `google-api` tag.
15-
- If you are reporting an issue or requesting a feature for a G Suite API, please use their [public issue tracker](https://gsuite-developers.googleblog.com/2017/03/a-new-issue-tracker-for-g-suite.html)
14+
- Search StackOverflow: https://stackoverflow.com/questions/tagged/google-cloud-platform+python
1615

1716
If you are still having issues, please be sure to include as much information as possible:
1817

1918
#### Environment details
2019

21-
- OS:
22-
- Python version:
23-
- pip version:
24-
- `google-api-python-client` version:
20+
- OS type and version:
21+
- Python version: `python --version`
22+
- pip version: `pip --version`
23+
- `google-api-python-client` version: `pip show google-api-python-client`
2524

2625
#### Steps to reproduce
2726

2827
1. ?
2928
2. ?
3029

30+
#### Code example
31+
32+
```python
33+
# example
34+
```
35+
36+
#### Stack trace
37+
```
38+
# example
39+
```
40+
3141
Making sure to follow these steps will guarantee the quickest resolution possible.
3242

3343
Thanks!

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
2+
- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/google-api-python-client/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
3+
- [ ] Ensure the tests and linter pass
4+
- [ ] Code coverage does not decrease (if any source code was changed)
5+
- [ ] Appropriate docs were updated (if necessary)
6+
7+
Fixes #<issue_number_goes_here> 🦕

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
releaseType: python

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ build/
55
dist/
66

77
# Test files
8-
.tox/
8+
.nox/
99

1010
# Coverage files
1111
.coverage

.kokoro/build.sh

Lines changed: 29 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,17 @@
11
#!/bin/bash
2+
# Copyright 2018 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
215

316
set -eo pipefail
417

@@ -7,7 +20,20 @@ cd github/google-api-python-client
720
# Disable buffering, so that the logs stream through.
821
export PYTHONUNBUFFERED=1
922

10-
python3 -m pip install --upgrade tox
23+
# Debug: show build environment
24+
env | grep KOKORO
1125

12-
# Run tests
13-
tox
26+
# Setup service account credentials.
27+
export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json
28+
29+
# Setup project id.
30+
export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json")
31+
32+
# Remove old nox
33+
python3.6 -m pip uninstall --yes --quiet nox-automation
34+
35+
# Install nox
36+
python3.6 -m pip install --upgrade --quiet nox
37+
python3.6 -m nox --version
38+
39+
python3.6 -m nox

.kokoro/common.cfg

Lines changed: 0 additions & 19 deletions
This file was deleted.

.kokoro/continuous/continuous.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Format: //devtools/kokoro/config/proto/build.proto
1+
# Format: //devtools/kokoro/config/proto/build.proto

.kokoro/presubmit/presubmit.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
# Format: //devtools/kokoro/config/proto/build.proto
1+
# Format: //devtools/kokoro/config/proto/build.proto

.kokoro/release.sh

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/bash
2+
# Copyright 2020 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# https://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
16+
#!/bin/bash
17+
18+
set -eo pipefail
19+
20+
# Start the releasetool reporter
21+
python3 -m pip install gcp-releasetool
22+
python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script
23+
24+
# Ensure that we have the latest versions of Twine, Wheel, and Setuptools.
25+
python3 -m pip install --upgrade twine wheel setuptools
26+
27+
# Disable buffering, so that the logs stream through.
28+
export PYTHONUNBUFFERED=1
29+
30+
# Move into the package, build the distribution and upload.
31+
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
32+
cd github/google-api-python-client
33+
python3 setup.py sdist bdist_wheel
34+
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*

.kokoro/release/common.cfg

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# Format: //devtools/kokoro/config/proto/build.proto
2+
3+
# Build logs will be here
4+
action {
5+
define_artifacts {
6+
regex: "**/*sponge_log.xml"
7+
}
8+
}
9+
10+
# Download trampoline resources.
11+
gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline"
12+
13+
# Use the trampoline script to run in docker.
14+
build_file: "google-api-python-client/.kokoro/trampoline.sh"
15+
16+
# Configure the docker image for kokoro-trampoline.
17+
env_vars: {
18+
key: "TRAMPOLINE_IMAGE"
19+
value: "gcr.io/cloud-devrel-kokoro-resources/python-multi"
20+
}
21+
env_vars: {
22+
key: "TRAMPOLINE_BUILD_FILE"
23+
value: "github/google-api-python-client/.kokoro/release.sh"
24+
}
25+
26+
# Fetch the token needed for reporting release status to GitHub
27+
before_action {
28+
fetch_keystore {
29+
keystore_resource {
30+
keystore_config_id: 73713
31+
keyname: "yoshi-automation-github-key"
32+
}
33+
}
34+
}
35+
36+
# Fetch PyPI password
37+
before_action {
38+
fetch_keystore {
39+
keystore_resource {
40+
keystore_config_id: 73713
41+
keyname: "google_cloud_pypi_password"
42+
}
43+
}
44+
}
45+
46+
# Fetch magictoken to use with Magic Github Proxy
47+
before_action {
48+
fetch_keystore {
49+
keystore_resource {
50+
keystore_config_id: 73713
51+
keyname: "releasetool-magictoken"
52+
}
53+
}
54+
}
55+
56+
# Fetch api key to use with Magic Github Proxy
57+
before_action {
58+
fetch_keystore {
59+
keystore_resource {
60+
keystore_config_id: 73713
61+
keyname: "magic-github-proxy-api-key"
62+
}
63+
}
64+
}

0 commit comments

Comments
 (0)