From b6d40dae75600dd14f5cde74313dcddf180b476c Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 31 Mar 2022 21:10:43 -0400 Subject: [PATCH 1/3] chore: set up CI on v0 branch (#80) --- .github/workflows/docs.yml | 22 +++++++++++++ .github/workflows/lint.yml | 25 +++++++++++++++ .github/workflows/unittest.yml | 57 ++++++++++++++++++++++++++++++++++ .kokoro/release.sh | 2 +- .kokoro/release/common.cfg | 12 ++++++- 5 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/unittest.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..e21acf6 --- /dev/null +++ b/.github/workflows/docs.yml @@ -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 \ No newline at end of file diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9a6016c --- /dev/null +++ b/.github/workflows/lint.yml @@ -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 diff --git a/.github/workflows/unittest.yml b/.github/workflows/unittest.yml new file mode 100644 index 0000000..aa2c769 --- /dev/null +++ b/.github/workflows/unittest.yml @@ -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=87 diff --git a/.kokoro/release.sh b/.kokoro/release.sh index 0427607..2f57a75 100755 --- a/.kokoro/release.sh +++ b/.kokoro/release.sh @@ -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_GFILE_DIR}/secret_manager/google-cloud-pypi-token") +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1") cd github/python-debugger-client python3 setup.py sdist bdist_wheel twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/* diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index 1532d91..2395e95 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,8 +23,18 @@ env_vars: { value: "github/python-debugger-client/.kokoro/release.sh" } +# Fetch PyPI password +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "google-cloud-pypi-token-keystore-1" + } + } +} + # 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,google-cloud-pypi-token" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" } From 9e542fe9aaf5e0cc570d54b60c1b76482f06d20c Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Mon, 11 Apr 2022 19:49:29 -0400 Subject: [PATCH 2/3] fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release (#79) * fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release * ci: use click <8.1.0 * update constraints file to reflect setup.py --- noxfile.py | 4 ++-- setup.py | 2 +- testing/constraints-3.6.txt | 3 +-- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/noxfile.py b/noxfile.py index 94ee6a8..7d480d5 100644 --- a/noxfile.py +++ b/noxfile.py @@ -55,7 +55,7 @@ def lint(session): Returns a failure if the linters find linting errors or sufficiently serious code quality issues. """ - session.install("flake8", BLACK_VERSION) + session.install("flake8", BLACK_VERSION, "click<8.1.0") session.run( "black", "--check", *BLACK_PATHS, ) @@ -65,7 +65,7 @@ def lint(session): @nox.session(python=DEFAULT_PYTHON_VERSION) def blacken(session): """Run black. Format code to uniform standard.""" - session.install(BLACK_VERSION) + session.install(BLACK_VERSION, "click<8.1.0") session.run( "black", *BLACK_PATHS, ) diff --git a/setup.py b/setup.py index ef43ed8..2e6cbfc 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ # NOTE: Maintainers, please do not require google-api-core>=2.x.x # Until this issue is closed # https://github.com/googleapis/google-cloud-python/issues/10566 - "google-api-core[grpc] >= 1.26.0, <3.0.0dev", + "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "proto-plus >= 1.15.0", "packaging >= 14.3", "google-cloud-source-context >= 0.1.0, < 1.0.0dev", diff --git a/testing/constraints-3.6.txt b/testing/constraints-3.6.txt index 392210e..9f29b78 100644 --- a/testing/constraints-3.6.txt +++ b/testing/constraints-3.6.txt @@ -4,8 +4,7 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.26.0 +google-api-core==1.31.5 proto-plus==1.15.0 packaging==14.3 google-cloud-source-context==0.1.0 -google-auth==1.24.0 # TODO: remove when google-auth>=1.25.0 si transitively required through google-api-core \ No newline at end of file From d0f1af32e6164f9ec8a4405fb71ee9702cabdaf9 Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 19 May 2022 10:29:21 -0400 Subject: [PATCH 3/3] chore(v0): release 0.1.4 (#90) Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ setup.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a692bab..d2988f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.1.4](https://github.com/googleapis/python-debugger-client/compare/v0.1.3...v0.1.4) (2022-04-11) + + +### Bug Fixes + +* **deps:** require google-api-core >= 1.31.5, >= 2.3.2 on v0 release ([#79](https://github.com/googleapis/python-debugger-client/issues/79)) ([9e542fe](https://github.com/googleapis/python-debugger-client/commit/9e542fe9aaf5e0cc570d54b60c1b76482f06d20c)) + ### [0.1.3](https://www.github.com/googleapis/python-debugger-client/compare/v0.1.2...v0.1.3) (2021-07-29) diff --git a/setup.py b/setup.py index 2e6cbfc..798fcce 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ name = "google-cloud-debugger-client" description = "Cloud Debugger API client library" -version = "0.1.3" +version = "0.1.4" release_status = "Development Status :: 4 - Beta" url = "https://github.com/googleapis/python-debugger-client" dependencies = [