diff --git a/.github/workflows/BuildTest_win32.yml b/.github/workflows/BuildTest_win32.yml index de0398a..413c40b 100644 --- a/.github/workflows/BuildTest_win32.yml +++ b/.github/workflows/BuildTest_win32.yml @@ -9,8 +9,8 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: ["3.8", "3.11"] -# python-version: [3.8, 3.9, 3.10, 3.11] + python-version: ["3.9", "3.11"] +# python-version: [3.9, 3.10, 3.11, 3.12] steps: - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55bb38d..268e684 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.11" ] + python-version: [ "3.9", "3.11" ] name: Setup steps: - uses: actions/checkout@v3 @@ -35,7 +35,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.11" ] + python-version: [ "3.9", "3.11" ] steps: - uses: actions/checkout@v3 - name: Restore venv @@ -55,7 +55,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.11" ] + python-version: [ "3.9", "3.11" ] steps: - uses: actions/checkout@v3 - name: Restore venv @@ -98,7 +98,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.11" ] + python-version: [ "3.9", "3.11" ] steps: - uses: actions/checkout@v3 - name: Restore venv @@ -121,7 +121,7 @@ jobs: strategy: fail-fast: false matrix: - python-version: [ "3.8", "3.11" ] + python-version: [ "3.9", "3.11" ] steps: - uses: actions/checkout@v3 - name: Restore venv diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 22e3eb2..2a853fe 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ "3.8" ] + python-version: [ "3.9" ] # Specifying a GitHub environment is optional, but strongly encouraged environment: release permissions: diff --git a/ci/linux/_load_dot_env.sh b/ci/linux/_load_dot_env.sh new file mode 100644 index 0000000..434c067 --- /dev/null +++ b/ci/linux/_load_dot_env.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -a +source $1 +set +a diff --git a/ci/linux/build_python_package.sh b/ci/linux/build_python_package.sh index d283258..0d2d2af 100755 --- a/ci/linux/build_python_package.sh +++ b/ci/linux/build_python_package.sh @@ -1,7 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then echo "Activating .venv first." . .venv/bin/activate fi + python -m build diff --git a/ci/linux/create_venv.sh b/ci/linux/create_venv.sh index c4aa8e7..71fd104 100755 --- a/ci/linux/create_venv.sh +++ b/ci/linux/create_venv.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash python3 -m venv ./.venv if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then diff --git a/ci/linux/install_dependencies.sh b/ci/linux/install_dependencies.sh index 3017358..ebd6979 100755 --- a/ci/linux/install_dependencies.sh +++ b/ci/linux/install_dependencies.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then echo "Activating .venv first." diff --git a/ci/linux/lint.sh b/ci/linux/lint.sh index d732141..c2e91b5 100755 --- a/ci/linux/lint.sh +++ b/ci/linux/lint.sh @@ -1,7 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then echo "Activating .venv first." . .venv/bin/activate fi + flake8 ./src/omotes_sdk ./unit_test/ diff --git a/ci/linux/test_unit.sh b/ci/linux/test_unit.sh index 8fc2cdc..bff0c15 100755 --- a/ci/linux/test_unit.sh +++ b/ci/linux/test_unit.sh @@ -1,7 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then echo "Activating .venv first." . .venv/bin/activate fi + PYTHONPATH='$PYTHONPATH:src/' pytest --junit-xml=test-results.xml unit_test/ diff --git a/ci/linux/typecheck.sh b/ci/linux/typecheck.sh index 7f1dc63..7a64ecf 100755 --- a/ci/linux/typecheck.sh +++ b/ci/linux/typecheck.sh @@ -1,7 +1,8 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then echo "Activating .venv first." . .venv/bin/activate fi + python -m mypy ./src/omotes_sdk ./unit_test/ diff --git a/ci/win32/create_venv.cmd b/ci/win32/create_venv.cmd index 3806ef7..2d4b97e 100644 --- a/ci/win32/create_venv.cmd +++ b/ci/win32/create_venv.cmd @@ -3,7 +3,7 @@ rem @echo off pushd . cd /D "%~dp0" -py -3.8 -m venv ..\..\venv +py -3.9 -m venv ..\..\venv call ..\..\venv\Scripts\activate.bat python -m pip install pip-tools popd diff --git a/pyproject.toml b/pyproject.toml index bf92994..4124e98 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "omotes-sdk-python" -requires-python = ">=3.8.1" +requires-python = ">=3.9" dynamic = ["version"] authors = [ { name = "Sebastiaan la Fleur", email = "sebastiaan.lafleur@tno.nl" }, @@ -35,20 +35,23 @@ dependencies = [ [project.optional-dependencies] dev = [ - "pip-tools~=7.3.0", - "setuptools ~= 69.0.3", - "black ~= 22.1.0", - "flake8 ~= 6.1.0", - "Flake8-pyproject ~= 1.2.3", + "setuptools ~= 75.6.0", + "wheel ~= 0.45.1", + "setuptools-git-versioning >= 2.0, < 3", + "black ~= 24.10.0", + "flake8 == 7.1.1", + "flake8-pyproject ~= 1.2.3", "flake8-docstrings ~= 1.7.0", - "flake8-quotes ~= 3.3.2", - "pytest ~=7.3.1", - "pytest-cov ~=4.0.0", - "mypy ~= 1.8.0", - "isort ~= 5.13.2", - "build ~= 1.0.3", + "flake8-quotes ~= 3.4.0", + "flake8-bugbear ~= 24.10.31", + "flake8-mock ~= 0.4", + "flake8-tuple ~= 0.4.1", + "pytest ~= 8.3.4", + "pytest-cov ~= 6.0.0", + "mypy ~= 1.13.0", + "isort == 5.13.2", + "build ~= 1.2.2", "mypy-protobuf ~= 3.5.0", - "setuptools-git-versioning < 2", ] [project.urls] @@ -60,9 +63,9 @@ changelog = "https://github.com/Nieuwe-Warmte-Nu/omotes-sdk-python/blob/main/CHA [build-system] build-backend = "setuptools.build_meta" requires = [ - "setuptools ~= 69.0.3", - "wheel ~= 0.40.0", - "setuptools-git-versioning<2", + "setuptools ~= 75.6.0", + "wheel ~= 0.45.1", + "setuptools-git-versioning >= 2.0, < 3", ] [tool.setuptools.package-data] @@ -70,6 +73,7 @@ requires = [ [tool.setuptools-git-versioning] enabled = true +starting_version = "0.0.1" [tool.pytest.ini_options] addopts = "--cov=omotes_sdk --cov-report html --cov-report term-missing --cov-fail-under 62" diff --git a/src/omotes_sdk/omotes_interface.py b/src/omotes_sdk/omotes_interface.py index 28b6272..972a077 100644 --- a/src/omotes_sdk/omotes_interface.py +++ b/src/omotes_sdk/omotes_interface.py @@ -115,7 +115,7 @@ def __init__( self, rabbitmq_config: RabbitMQConfig, client_id: str, - timeout_on_initial_workflow_definitions: timedelta = timedelta(minutes=1), + timeout_on_initial_workflow_definitions: timedelta = timedelta(minutes=1), # noqa: B008 ): """Create the OMOTES interface.