From 04a5d5bd9f247ed8e4932583e1f87ac2c12f157d Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 9 Aug 2023 18:35:51 +0200 Subject: [PATCH 1/4] chore: fix semantic-release plugins order --- .releaserc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.releaserc b/.releaserc index bbd34613..06ea31ba 100644 --- a/.releaserc +++ b/.releaserc @@ -100,13 +100,13 @@ } ], "@semantic-release/changelog", - "semantic-release-pypi", [ "@semantic-release/exec", { "prepareCmd": "./generate.sh -v \"${nextRelease.version}\"" } ], + "semantic-release-pypi", [ "@semantic-release/git", { From d77e30af4aadac81cf145bff5abc746b885e6925 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 9 Aug 2023 19:07:17 +0200 Subject: [PATCH 2/4] chore: fix dev version format --- generate.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generate.sh b/generate.sh index 3fd31046..4f4e7262 100755 --- a/generate.sh +++ b/generate.sh @@ -14,7 +14,7 @@ done if [[ $VERSION =~ (.*-dev\.)([0-9]+) ]]; then BASE_VERSION=${BASH_REMATCH[1]} DEV_NUMBER=${BASH_REMATCH[2]} - VERSION="${BASE_VERSION%-dev.}dev${DEV_NUMBER}" + VERSION="${BASE_VERSION%-dev.}.dev${DEV_NUMBER}" fi # jar was downloaded from here https://repo1.maven.org/maven2/io/swagger/codegen/v3/swagger-codegen-cli/3.0.34/ From a02853d849bf5a22565c59c28f6a3d8fcb670676 Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Wed, 9 Aug 2023 19:38:22 +0200 Subject: [PATCH 3/4] chore: use analyze commits workflow from dx-toolkit --- .github/workflows/analyze-commits.yml | 61 ++------------------------- 1 file changed, 3 insertions(+), 58 deletions(-) diff --git a/.github/workflows/analyze-commits.yml b/.github/workflows/analyze-commits.yml index b5eb4474..ac5a464a 100644 --- a/.github/workflows/analyze-commits.yml +++ b/.github/workflows/analyze-commits.yml @@ -5,61 +5,6 @@ permissions: pull-requests: write contents: write jobs: - commitlint: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - uses: wagoid/commitlint-github-action@v5 - id: commitlint - - if: ${{ failure() && steps.commitlint.outcome == 'failure' }} - uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd - with: - header: Commitlint - recreate: true - message: | - ## Wrong commit message format detected - We use [Semantic Commit Messages](https://gist.github.com/joshbuchea/6f47e86d2510bce28f8e7f42ae84c716) in our project. - - > **Warning** - > Probably you forgot to activate local git hooks. - - Run the next command in the project root to activate local hooks: - ```sh - sh ./install_hooks.sh - ``` - - More info you can find in [job logs](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - - if: ${{ success() }} - uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd - with: - header: Commitlint - hide: true - hide_classify: "OUTDATED" - release-notes-comment: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Collect semantic-release-info - id: semantic_release_info - uses: fingerprintjs/action-semantic-release-info@v1 - - if: ${{ steps.semantic_release_info.outputs.no_release == 'false' }} - name: Add comment to the PR - uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd - with: - header: ReleasePreview - recreate: true - message: | - ## This PR will create a ${{steps.semantic_release_info.outputs.type}} release :rocket: - ${{steps.semantic_release_info.outputs.notes}} - - if: ${{ steps.semantic_release_info.outputs.no_release == 'true' }} - name: Add comment to the PR - uses: marocchino/sticky-pull-request-comment@3d60a5b2dae89d44e0c6ddc69dd7536aec2071cd - with: - header: ReleasePreview - recreate: true - message: | - ## This PR will not create a new release :rocket: + analyze-commits: + name: Generate docs and coverage report + uses: fingerprintjs/dx-team-toolkit/.github/workflows/analyze-commits.yml@v1 From 9373a9360bc6111fe362ea39ea1eea1a86d9bfcf Mon Sep 17 00:00:00 2001 From: Ilya Taratukhin Date: Thu, 10 Aug 2023 12:50:03 +0200 Subject: [PATCH 4/4] fix: fix `multiprocessing.pool` detection fro Lambda --- fingerprint_pro_server_api_sdk/api_client.py | 2 +- template/api_client.mustache | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fingerprint_pro_server_api_sdk/api_client.py b/fingerprint_pro_server_api_sdk/api_client.py index c81ed6e0..59299b6b 100644 --- a/fingerprint_pro_server_api_sdk/api_client.py +++ b/fingerprint_pro_server_api_sdk/api_client.py @@ -68,7 +68,7 @@ def __init__(self, configuration=None, header_name=None, header_value=None, try: from multiprocessing.pool import ThreadPool self.pool = ThreadPool() - except ImportError: + except (ImportError, OSError): from fingerprint_pro_server_api_sdk.dummy_pool import DummyPool self.pool = DummyPool() else: diff --git a/template/api_client.mustache b/template/api_client.mustache index ee01247f..bea3475f 100644 --- a/template/api_client.mustache +++ b/template/api_client.mustache @@ -63,7 +63,7 @@ class ApiClient(object): try: from multiprocessing.pool import ThreadPool self.pool = ThreadPool() - except ImportError: + except (ImportError, OSError): from {{packageName}}.dummy_pool import DummyPool self.pool = DummyPool() else: