From 7577b0e08a81c6b62b410947fcd054f18f882e9f Mon Sep 17 00:00:00 2001 From: dvacca-onfido <134616519+dvacca-onfido@users.noreply.github.com> Date: Mon, 24 Jun 2024 07:37:40 +0000 Subject: [PATCH 1/2] Upgrade after onfido-openapi-spec change a34b6d8 --- .release.json | 8 ++++---- onfido/__init__.py | 2 +- onfido/api_client.py | 2 +- onfido/configuration.py | 2 +- pyproject.toml | 2 +- setup.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.release.json b/.release.json index 7d86609..c464f9d 100644 --- a/.release.json +++ b/.release.json @@ -1,9 +1,9 @@ { "source": { "repo_url": "https://github.com/onfido/onfido-openapi-spec", - "short_sha": "38a8740", - "long_sha": "38a87401552386cb0b17aae28385c5e2f4af7bfc", - "version": "" + "short_sha": "a34b6d8", + "long_sha": "a34b6d86714f7f74da2d60a33a76ec3a693d264a", + "version": "v3.0.0" }, - "release": "v3.0.0" + "release": "v3.1.0" } diff --git a/onfido/__init__.py b/onfido/__init__.py index 5cbcbde..57891ea 100644 --- a/onfido/__init__.py +++ b/onfido/__init__.py @@ -14,7 +14,7 @@ """ # noqa: E501 -__version__ = "3.0.0" +__version__ = "3.1.0" # import apis into sdk package from onfido.api.default_api import DefaultApi diff --git a/onfido/api_client.py b/onfido/api_client.py index bff7273..7209a2f 100644 --- a/onfido/api_client.py +++ b/onfido/api_client.py @@ -88,7 +88,7 @@ def __init__( self.default_headers[header_name] = header_value self.cookie = cookie # Set default User-Agent. - self.user_agent = 'onfido-python/3.0.0' + self.user_agent = 'onfido-python/3.1.0' self.client_side_validation = configuration.client_side_validation def __enter__(self): diff --git a/onfido/configuration.py b/onfido/configuration.py index c9fb754..35ab5c3 100644 --- a/onfido/configuration.py +++ b/onfido/configuration.py @@ -383,7 +383,7 @@ def to_debug_report(self): "OS: {env}\n"\ "Python Version: {pyversion}\n"\ "Version of the API: v3.6\n"\ - "SDK Package Version: 3.0.0".\ + "SDK Package Version: 3.1.0".\ format(env=sys.platform, pyversion=sys.version) def get_host_settings(self): diff --git a/pyproject.toml b/pyproject.toml index 43db472..36b060e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "onfido-python" -version = "3.0.0" +version = "3.1.0" description = "Python library for the Onfido API" authors = ["OpenAPI Generator Community "] license = "MIT" diff --git a/setup.py b/setup.py index 86dc6d1..616d472 100644 --- a/setup.py +++ b/setup.py @@ -21,7 +21,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "onfido-python" -VERSION = "3.0.0" +VERSION = "3.1.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", From 08789cebb2dc5395b836795612dc46ae527c5946 Mon Sep 17 00:00:00 2001 From: Davide Vacca Date: Mon, 24 Jun 2024 16:08:30 +0200 Subject: [PATCH 2/2] Update CHANGELOG (and remove step in charge of that from CI for now) --- .github/workflows/python.yml | 31 ------------------------------- CHANGELOG.md | 9 +++++++++ 2 files changed, 9 insertions(+), 31 deletions(-) diff --git a/.github/workflows/python.yml b/.github/workflows/python.yml index d0ec606..12eca37 100644 --- a/.github/workflows/python.yml +++ b/.github/workflows/python.yml @@ -68,12 +68,9 @@ jobs: publish: runs-on: ubuntu-latest needs: integration-tests - environment: delivery if: github.event_name == 'release' steps: - uses: actions/checkout@v4 - with: - token: ${{ secrets.GH_ACTION_ACCESS_TOKEN }} - name: Set up Python uses: actions/setup-python@v5 with: @@ -89,31 +86,3 @@ jobs: with: user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} - - name: Update CHANGELOG.md - run: | - TMP_FILE=$(mktemp) - - RELEASE_VERSION=$(jq -r '.release' .release.json) - RELEASE_DATE=`date +'%dth %B %Y' | sed -E 's/^0//;s/^([2,3]?)1th/\11st/;s/^([2]?)2th/\12nd/;s/^([2]?)3th/\13rd/'` - - SPEC_COMMIT_SHA=$(jq -r '.source.short_sha' .release.json) - SPEC_COMMIT_URL=$(jq -r '.source.repo_url + "/commit/" + .source.long_sha' .release.json) - SPEC_RELEASE_VERSION=$(jq -r '.source.version' .release.json) - SPEC_RELEASE_URL=$(jq -r '.source.repo_url + "/releases/tag/" + .source.version' .release.json) - - echo -e "# Changelog\n\n## $RELEASE_VERSION $RELEASE_DATE\n\n" >| $TMP_FILE - echo -en "${{ github.event.release.body }}\nBased on Onfido OpenAPI spec " >> $TMP_FILE - - if [ -z $SPEC_RELEASE_VERSION ]; then - echo "up to commit [$SPEC_COMMIT_SHA](${SPEC_COMMIT_URL})." >> $TMP_FILE - else - echo "version [$SPEC_RELEASE_VERSION](${SPEC_RELEASE_URL})." >> $TMP_FILE - fi - - grep -v "^# Changelog" CHANGELOG.md >> $TMP_FILE - mv $TMP_FILE CHANGELOG.md - - git config user.name "GitHub Actions Bot" - git config user.email "<>" - git commit -m "Update CHANGELOG.md after library release" CHANGELOG.md - git push diff --git a/CHANGELOG.md b/CHANGELOG.md index b1aae58..d7e4a45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## v3.1.0 24th June 2024 + +- Library has been rebuilt from scratch and automatically generated on [Onfido OpenAPI Spec](https://github.com/onfido/onfido-openapi-spec) (release [v3.0.0](https://github.com/onfido/onfido-openapi-spec/releases/tag/v3.0.0)) +- Integration tests have also been implemented + +## v3.0.0 13th June 2024 (pre-release) + +- Make library auto-generated and based on [Onfido OpenAPI spec](https://github.com/onfido/onfido-openapi-spec) + ## v2.10.0 24th November 2023 - Added core methods for [WorkflowRuns](https://documentation.onfido.com/#workflow-runs)