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

Commit 1c89731

Browse files
busunkim96parthearelease-please[bot]
authored
fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release (#162)
* fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release (#152) * chore(deps): allow google-api-core v2 on v0 release * chore: run blacken * ci: fix docs build Co-authored-by: Anthonios Partheniou <[email protected]> * chore: set up CI on v0 branch (#153) * chore: add basic CI for v0 branch * chore: drop 3.8 from matrix Co-authored-by: Anthonios Partheniou <[email protected]> * chore: format, udpate noxfile * chore: lower fail-under to 77 * chore: add 3.8 Co-authored-by: Anthonios Partheniou <[email protected]> * chore(v0): release 0.4.1 (#160) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> * chore: format Co-authored-by: Anthonios Partheniou <[email protected]> Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com>
1 parent 3e84c20 commit 1c89731

File tree

19 files changed

+340
-175
lines changed

19 files changed

+340
-175
lines changed

.github/workflows/docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- v0
5+
name: docs
6+
jobs:
7+
docs:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Setup Python
13+
uses: actions/setup-python@v3
14+
with:
15+
python-version: "3.8"
16+
- name: Install nox
17+
run: |
18+
python -m pip install --upgrade setuptools pip wheel
19+
python -m pip install nox
20+
- name: Run docs
21+
run: |
22+
nox -s docs

.github/workflows/lint.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- v0
5+
name: lint
6+
jobs:
7+
lint:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v3
12+
- name: Setup Python
13+
uses: actions/setup-python@v3
14+
with:
15+
python-version: "3.8"
16+
- name: Install nox
17+
run: |
18+
python -m pip install --upgrade setuptools pip wheel
19+
python -m pip install nox
20+
- name: Run lint
21+
run: |
22+
nox -s lint
23+
- name: Run lint_setup_py
24+
run: |
25+
nox -s lint_setup_py

.github/workflows/unittest.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
on:
2+
pull_request:
3+
branches:
4+
- v0
5+
name: unittest
6+
jobs:
7+
unit:
8+
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
python: ['3.6', '3.7', '3.8']
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
- name: Setup Python
16+
uses: actions/setup-python@v3
17+
with:
18+
python-version: ${{ matrix.python }}
19+
- name: Install nox
20+
run: |
21+
python -m pip install --upgrade setuptools pip wheel
22+
python -m pip install nox
23+
- name: Run unit tests
24+
env:
25+
COVERAGE_FILE: .coverage-${{ matrix.python }}
26+
run: |
27+
nox -s unit-${{ matrix.python }}
28+
- name: Upload coverage results
29+
uses: actions/upload-artifact@v3
30+
with:
31+
name: coverage-artifacts
32+
path: .coverage-${{ matrix.python }}
33+
34+
cover:
35+
runs-on: ubuntu-latest
36+
needs:
37+
- unit
38+
steps:
39+
- name: Checkout
40+
uses: actions/checkout@v3
41+
- name: Setup Python
42+
uses: actions/setup-python@v3
43+
with:
44+
python-version: "3.8"
45+
- name: Install coverage
46+
run: |
47+
python -m pip install --upgrade setuptools pip wheel
48+
python -m pip install coverage
49+
- name: Download coverage results
50+
uses: actions/download-artifact@v3
51+
with:
52+
name: coverage-artifacts
53+
path: .coverage-results/
54+
- name: Report coverage results
55+
run: |
56+
coverage combine .coverage-results/.coverage*
57+
coverage report --show-missing --fail-under=77

.kokoro/release.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools
2626
export PYTHONUNBUFFERED=1
2727

2828
# Move into the package, build the distribution and upload.
29-
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
29+
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1")
3030
cd github/python-grafeas
3131
python3 setup.py sdist bdist_wheel
32-
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
32+
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*

.kokoro/release/common.cfg

Lines changed: 5 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -23,42 +23,18 @@ env_vars: {
2323
value: "github/python-grafeas/.kokoro/release.sh"
2424
}
2525

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-
3626
# Fetch PyPI password
3727
before_action {
3828
fetch_keystore {
3929
keystore_resource {
4030
keystore_config_id: 73713
41-
keyname: "google_cloud_pypi_password"
31+
keyname: "google-cloud-pypi-token-keystore-1"
4232
}
4333
}
4434
}
4535

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-
}
36+
# Tokens needed to report release status back to GitHub
37+
env_vars: {
38+
key: "SECRET_MANAGER_KEYS"
39+
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
6440
}

docs/conf.py

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -62,9 +62,9 @@
6262
master_doc = "index"
6363

6464
# General information about the project.
65-
project = u"grafeas"
66-
copyright = u"2019, Google"
67-
author = u"Google APIs"
65+
project = "grafeas"
66+
copyright = "2019, Google"
67+
author = "Google APIs"
6868

6969
# The version info for the project you're documenting, acts as replacement for
7070
# |version| and |release|, also used in various other places throughout the
@@ -255,7 +255,13 @@
255255
# (source start file, target name, title,
256256
# author, documentclass [howto, manual, or own class]).
257257
latex_documents = [
258-
(master_doc, "grafeas.tex", u"grafeas Documentation", author, "manual",)
258+
(
259+
master_doc,
260+
"grafeas.tex",
261+
"grafeas Documentation",
262+
author,
263+
"manual",
264+
)
259265
]
260266

261267
# The name of an image file (relative to this directory) to place at the top of
@@ -283,7 +289,15 @@
283289

284290
# One entry per manual page. List of tuples
285291
# (source start file, name, description, authors, manual section).
286-
man_pages = [(master_doc, "grafeas", u"grafeas Documentation", [author], 1,)]
292+
man_pages = [
293+
(
294+
master_doc,
295+
"grafeas",
296+
"grafeas Documentation",
297+
[author],
298+
1,
299+
)
300+
]
287301

288302
# If true, show URL addresses after external links.
289303
# man_show_urls = False
@@ -298,7 +312,7 @@
298312
(
299313
master_doc,
300314
"grafeas",
301-
u"grafeas Documentation",
315+
"grafeas Documentation",
302316
author,
303317
"grafeas",
304318
"grafeas Library",
@@ -323,7 +337,10 @@
323337
intersphinx_mapping = {
324338
"python": ("http://python.readthedocs.org/en/latest/", None),
325339
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
326-
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
340+
"google.api_core": (
341+
"https://googleapis.dev/python/google-api-core/latest/",
342+
None,
343+
),
327344
"grpc": ("https://grpc.io/grpc/python/", None),
328345
}
329346

0 commit comments

Comments
 (0)