From 263ba52f28973d65ae0f428ce383b9daee703962 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 31 Mar 2022 20:13:28 -0400 Subject: [PATCH 1/5] chore: set up CI on v0 branch (#155) --- .github/workflows/docs.yml | 22 +++++++++++++ .github/workflows/lint.yml | 25 +++++++++++++++ .github/workflows/unittest.yml | 57 ++++++++++++++++++++++++++++++++++ .kokoro/release.sh | 4 +-- .kokoro/release/common.cfg | 18 +++++------ 5 files changed, 115 insertions(+), 11 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 ee38821..5131ab8 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_KEYSTORE_DIR}/73713_google_cloud_pypi_password") +TWINE_PASSWORD=$(cat "${KOKORO_KEYSTORE_DIR}/73713_google-cloud-pypi-token-keystore-1") cd github/python-memcache python3 setup.py sdist bdist_wheel -twine upload --username gcloudpypi --password "${TWINE_PASSWORD}" dist/* +twine upload --username __token__ --password "${TWINE_PASSWORD}" dist/* diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg index b4b40c4..aea3116 100644 --- a/.kokoro/release/common.cfg +++ b/.kokoro/release/common.cfg @@ -23,18 +23,18 @@ env_vars: { value: "github/python-memcache/.kokoro/release.sh" } -# Fetch PyPI password -before_action { - fetch_keystore { - keystore_resource { - keystore_config_id: 73713 - keyname: "google_cloud_pypi_password" - } - } +# 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" -} \ No newline at end of file +} From 56db16013211829bbddd19fd7fd68dd4c74ec6d3 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Thu, 31 Mar 2022 22:09:12 -0400 Subject: [PATCH 2/5] fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release (#156) * fix(deps): require google-api-core >= 1.31.5, >= 2.3.2 on v0 release * ci: use click<8.1.0 for lint/blacken session --- noxfile.py | 4 ++-- setup.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/noxfile.py b/noxfile.py index 9e90799..db108f7 100644 --- a/noxfile.py +++ b/noxfile.py @@ -49,7 +49,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, ) @@ -66,7 +66,7 @@ def blacken(session): That run uses an image that doesn't have 3.6 installed. Before updating this check the state of the `gcp_ubuntu_config` we use for that Kokoro run. """ - 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 70ec372..600ff44 100644 --- a/setup.py +++ b/setup.py @@ -40,7 +40,7 @@ platforms="Posix; MacOS X; Windows", include_package_data=True, install_requires=( - "google-api-core[grpc] >= 1.22.2, < 2.0.0dev", + "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", "proto-plus >= 1.4.0", ), python_requires=">=3.6", From bff4e958fb807d104c926638501cbc3390dd47ec 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:43:10 -0400 Subject: [PATCH 3/5] chore(v0): release 0.3.1 (#161) 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 1c6a712..a92823b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +### [0.3.1](https://github.com/googleapis/python-memcache/compare/v0.3.0...v0.3.1) (2022-04-01) + + +### Bug Fixes + +* **deps:** require google-api-core >= 1.31.5, >= 2.3.2 on v0 release ([#156](https://github.com/googleapis/python-memcache/issues/156)) ([56db160](https://github.com/googleapis/python-memcache/commit/56db16013211829bbddd19fd7fd68dd4c74ec6d3)) + ## [0.3.0](https://www.github.com/googleapis/python-memcache/compare/v0.2.0...v0.3.0) (2021-02-10) diff --git a/setup.py b/setup.py index 600ff44..72da45c 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import os import setuptools # type: ignore -version = "0.3.0" +version = "0.3.1" package_root = os.path.abspath(os.path.dirname(__file__)) From 5993a41fc8c90435653722ac4ef3ef2845659927 Mon Sep 17 00:00:00 2001 From: Anthonios Partheniou Date: Wed, 8 Jun 2022 18:22:32 -0400 Subject: [PATCH 4/5] fix(deps): require protobuf<4.0.0 on v0 branch (#188) * fix(deps): require protobuf<4.0.0 on v0 branch * chore: fix ci --- noxfile.py | 2 +- setup.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/noxfile.py b/noxfile.py index db108f7..729c61e 100644 --- a/noxfile.py +++ b/noxfile.py @@ -164,7 +164,7 @@ def docs(session): """Build the docs for this library.""" session.install("-e", ".") - session.install("sphinx", "alabaster", "recommonmark") + session.install("sphinx<3.0.0", "jinja2<3.1", "alabaster", "recommonmark") shutil.rmtree(os.path.join("docs", "_build"), ignore_errors=True) session.run( diff --git a/setup.py b/setup.py index 72da45c..6ef1645 100644 --- a/setup.py +++ b/setup.py @@ -41,7 +41,8 @@ include_package_data=True, install_requires=( "google-api-core[grpc] >= 1.31.5, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.0", - "proto-plus >= 1.4.0", + "proto-plus >= 1.4.0, <2.0.0dev", + "protobuf<4.0.0dev", ), python_requires=">=3.6", setup_requires=["libcst >= 0.2.5"], From 90a44d0c251893396a7f07f0b4235c42fb301c6f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 9 Jun 2022 12:27:43 -0400 Subject: [PATCH 5/5] chore(v0): release 0.3.2 (#191) 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 a92823b..3f28109 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.3.2](https://github.com/googleapis/python-memcache/compare/v0.3.1...v0.3.2) (2022-06-08) + + +### Bug Fixes + +* **deps:** require protobuf<4.0.0 on v0 branch ([#188](https://github.com/googleapis/python-memcache/issues/188)) ([5993a41](https://github.com/googleapis/python-memcache/commit/5993a41fc8c90435653722ac4ef3ef2845659927)) + ### [0.3.1](https://github.com/googleapis/python-memcache/compare/v0.3.0...v0.3.1) (2022-04-01) diff --git a/setup.py b/setup.py index 6ef1645..673a5a7 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ import os import setuptools # type: ignore -version = "0.3.1" +version = "0.3.2" package_root = os.path.abspath(os.path.dirname(__file__))