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

Commit

Permalink
fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release (#…
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
3 people authored Apr 6, 2022
1 parent 3e84c20 commit 1c89731
Show file tree
Hide file tree
Showing 19 changed files with 340 additions and 175 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
on:
pull_request:
branches:
- v0
name: docs
jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run docs
run: |
nox -s docs
25 changes: 25 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
pull_request:
branches:
- v0
name: lint
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run lint
run: |
nox -s lint
- name: Run lint_setup_py
run: |
nox -s lint_setup_py
57 changes: 57 additions & 0 deletions .github/workflows/unittest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
on:
pull_request:
branches:
- v0
name: unittest
jobs:
unit:
runs-on: ubuntu-latest
strategy:
matrix:
python: ['3.6', '3.7', '3.8']
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install nox
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install nox
- name: Run unit tests
env:
COVERAGE_FILE: .coverage-${{ matrix.python }}
run: |
nox -s unit-${{ matrix.python }}
- name: Upload coverage results
uses: actions/upload-artifact@v3
with:
name: coverage-artifacts
path: .coverage-${{ matrix.python }}

cover:
runs-on: ubuntu-latest
needs:
- unit
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v3
with:
python-version: "3.8"
- name: Install coverage
run: |
python -m pip install --upgrade setuptools pip wheel
python -m pip install coverage
- name: Download coverage results
uses: actions/download-artifact@v3
with:
name: coverage-artifacts
path: .coverage-results/
- name: Report coverage results
run: |
coverage combine .coverage-results/.coverage*
coverage report --show-missing --fail-under=77
4 changes: 2 additions & 2 deletions .kokoro/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ python3 -m pip install --upgrade twine wheel setuptools
export PYTHONUNBUFFERED=1

# Move into the package, build the distribution and upload.
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google_cloud_pypi_password")
TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1")
cd github/python-grafeas
python3 setup.py sdist bdist_wheel
twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/*
twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/*
34 changes: 5 additions & 29 deletions .kokoro/release/common.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,42 +23,18 @@ env_vars: {
value: "github/python-grafeas/.kokoro/release.sh"
}

# Fetch the token needed for reporting release status to GitHub
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "yoshi-automation-github-key"
}
}
}

# Fetch PyPI password
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "google_cloud_pypi_password"
keyname: "google-cloud-pypi-token-keystore-1"
}
}
}

# Fetch magictoken to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "releasetool-magictoken"
}
}
}

# Fetch api key to use with Magic Github Proxy
before_action {
fetch_keystore {
keystore_resource {
keystore_config_id: 73713
keyname: "magic-github-proxy-api-key"
}
}
# Tokens needed to report release status back to GitHub
env_vars: {
key: "SECRET_MANAGER_KEYS"
value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem"
}
31 changes: 24 additions & 7 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@
master_doc = "index"

# General information about the project.
project = u"grafeas"
copyright = u"2019, Google"
author = u"Google APIs"
project = "grafeas"
copyright = "2019, Google"
author = "Google APIs"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down Expand Up @@ -255,7 +255,13 @@
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, "grafeas.tex", u"grafeas Documentation", author, "manual",)
(
master_doc,
"grafeas.tex",
"grafeas Documentation",
author,
"manual",
)
]

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

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [(master_doc, "grafeas", u"grafeas Documentation", [author], 1,)]
man_pages = [
(
master_doc,
"grafeas",
"grafeas Documentation",
[author],
1,
)
]

# If true, show URL addresses after external links.
# man_show_urls = False
Expand All @@ -298,7 +312,7 @@
(
master_doc,
"grafeas",
u"grafeas Documentation",
"grafeas Documentation",
author,
"grafeas",
"grafeas Library",
Expand All @@ -323,7 +337,10 @@
intersphinx_mapping = {
"python": ("http://python.readthedocs.org/en/latest/", None),
"google-auth": ("https://google-auth.readthedocs.io/en/stable", None),
"google.api_core": ("https://googleapis.dev/python/google-api-core/latest/", None,),
"google.api_core": (
"https://googleapis.dev/python/google-api-core/latest/",
None,
),
"grpc": ("https://grpc.io/grpc/python/", None),
}

Expand Down
Loading

0 comments on commit 1c89731

Please sign in to comment.