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/create_venv.sh b/ci/linux/create_venv.sh index b6345ed..7fe9939 100755 --- a/ci/linux/create_venv.sh +++ b/ci/linux/create_venv.sh @@ -1,5 +1,8 @@ #!/usr/bin/env sh python3.11 -m venv ./.venv -. .venv/bin/activate +if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then + echo "Activating .venv first." + . .venv/bin/activate +fi pip3 install pip-tools diff --git a/ci/linux/install_dependencies.sh b/ci/linux/install_dependencies.sh index 1dbaade..e00b897 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 6605bf7..42f08eb 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_orchestrator ./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 b96b320..8535dbf 100755 --- a/ci/linux/typecheck.sh +++ b/ci/linux/typecheck.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/update_dependencies.sh b/ci/linux/update_dependencies.sh index e285b32..fea6566 100755 --- a/ci/linux/update_dependencies.sh +++ b/ci/linux/update_dependencies.sh @@ -1,8 +1,9 @@ -#!/bin/bash +#!/usr/bin/env bash if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then + echo "Activating .venv first." . .venv/bin/activate fi -pip-compile --output-file=requirements.txt pyproject.toml -pip-compile --extra=dev -c requirements.txt --output-file=dev-requirements.txt pyproject.toml +pip-compile --upgrade --output-file=requirements.txt pyproject.toml +pip-compile --upgrade --extra=dev -c requirements.txt --output-file=dev-requirements.txt pyproject.toml diff --git a/dev-requirements.txt b/dev-requirements.txt index 484c0c0..6b3a819 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -4,29 +4,31 @@ # # pip-compile --constraint=requirements.txt --extra=dev --output-file=dev-requirements.txt pyproject.toml # -aio-pika==9.4.2 +aio-pika==9.4.3 # via # -c requirements.txt # omotes-sdk-python -aiormq==6.8.0 +aiormq==6.8.1 # via # -c requirements.txt # aio-pika -alembic==1.13.1 +alembic==1.13.3 # via # -c requirements.txt # orchestrator (pyproject.toml) -amqp==5.2.0 +amqp==5.3.1 # via # -c requirements.txt # kombu -billiard==4.2.0 +attrs==24.2.0 + # via flake8-bugbear +billiard==4.2.1 # via # -c requirements.txt # celery -black==22.1.0 +black==24.10.0 # via orchestrator (pyproject.toml) -build==1.0.3 +build==1.2.2.post1 # via orchestrator (pyproject.toml) celery==5.3.6 # via @@ -41,7 +43,7 @@ click==8.1.7 # click-didyoumean # click-plugins # click-repl -click-didyoumean==0.3.0 +click-didyoumean==0.3.1 # via # -c requirements.txt # celery @@ -53,39 +55,49 @@ click-repl==0.3.0 # via # -c requirements.txt # celery -coverage[toml]==7.3.2 +coverage[toml]==7.6.9 # via pytest-cov dataclass-binder==0.3.4 # via # -c requirements.txt # orchestrator (pyproject.toml) -flake8==6.0.0 +flake8==7.1.1 # via + # flake8-bugbear # flake8-docstrings # flake8-pyproject # flake8-quotes + # flake8-tuple # orchestrator (pyproject.toml) +flake8-bugbear==24.10.31 + # via orchestrator (pyproject.toml) flake8-docstrings==1.7.0 # via orchestrator (pyproject.toml) +flake8-mock==0.4 + # via orchestrator (pyproject.toml) flake8-pyproject==1.2.3 # via orchestrator (pyproject.toml) -flake8-quotes==3.3.2 +flake8-quotes==3.4.0 + # via orchestrator (pyproject.toml) +flake8-tuple==0.4.1 # via orchestrator (pyproject.toml) future-fstrings==1.2.0 # via # -c requirements.txt # pyecore -greenlet==3.0.1 +greenlet==3.1.1 # via # -c requirements.txt # sqlalchemy -idna==3.6 +idna==3.10 # via # -c requirements.txt # yarl iniconfig==2.0.0 # via pytest -kombu==5.3.4 +isort==5.13.2 + # via orchestrator (pyproject.toml) +kombu==5.4.2 # via # -c requirements.txt # celery @@ -93,21 +105,21 @@ lxml==5.3.0 # via # -c requirements.txt # pyecore -mako==1.3.2 +mako==1.3.8 # via # -c requirements.txt # alembic -markupsafe==2.1.5 +markupsafe==3.0.2 # via # -c requirements.txt # mako mccabe==0.7.0 # via flake8 -multidict==6.0.5 +multidict==6.1.0 # via # -c requirements.txt # yarl -mypy==1.5.1 +mypy==1.13.0 # via # orchestrator (pyproject.toml) # sqlalchemy @@ -127,8 +139,9 @@ ordered-set==4.1.0 # via # -c requirements.txt # pyecore -packaging==23.2 +packaging==24.2 # via + # black # build # pytest # setuptools-git-versioning @@ -137,51 +150,55 @@ pamqp==3.3.0 # -c requirements.txt # aiormq # omotes-sdk-python -pathspec==0.11.2 +pathspec==0.12.1 # via black -platformdirs==4.1.0 +platformdirs==4.3.6 # via black -pluggy==1.3.0 +pluggy==1.5.0 # via pytest -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.48 # via # -c requirements.txt # click-repl -protobuf==4.25.2 +propcache==0.2.1 + # via + # -c requirements.txt + # yarl +protobuf==4.25.5 # via # -c requirements.txt # omotes-sdk-protocol -psycopg2-binary==2.9.9 +psycopg2-binary==2.9.10 # via # -c requirements.txt # orchestrator (pyproject.toml) -pycodestyle==2.10.0 +pycodestyle==2.12.1 # via flake8 pydocstyle==6.3.0 # via flake8-docstrings -pyecore==0.12.1 +pyecore==0.13.2 # via # -c requirements.txt # pyesdl -pyesdl==24.9.0 +pyesdl==24.11.2 # via # -c requirements.txt # omotes-sdk-python -pyflakes==3.0.1 +pyflakes==3.2.0 # via flake8 -pyproject-hooks==1.0.0 +pyproject-hooks==1.2.0 # via build -pytest==7.3.2 +pytest==8.3.4 # via # orchestrator (pyproject.toml) # pytest-cov -pytest-cov==4.0.0 +pytest-cov==6.0.0 # via orchestrator (pyproject.toml) -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via # -c requirements.txt # celery -python-dotenv==1.0.0 +python-dotenv==1.0.1 # via # -c requirements.txt # orchestrator (pyproject.toml) @@ -189,26 +206,25 @@ restrictedpython==7.4 # via # -c requirements.txt # pyecore -setuptools-git-versioning==1.13.5 +setuptools-git-versioning==2.0.0 # via orchestrator (pyproject.toml) -six==1.16.0 +six==1.17.0 # via # -c requirements.txt + # flake8-tuple # python-dateutil snowballstemmer==2.2.0 # via pydocstyle -sqlalchemy[mypy]==2.0.28 +sqlalchemy[mypy]==2.0.36 # via # -c requirements.txt # alembic # orchestrator (pyproject.toml) -streamcapture==1.2.4 +streamcapture==1.2.5 # via # -c requirements.txt # omotes-sdk-python -tomli==2.0.1 - # via black -types-protobuf==4.24.0.20240302 +types-protobuf==4.24.0.20240408 # via orchestrator (pyproject.toml) typing-extensions==4.11.0 # via @@ -217,21 +233,24 @@ typing-extensions==4.11.0 # mypy # omotes-sdk-python # sqlalchemy -tzdata==2023.3 +tzdata==2024.2 # via # -c requirements.txt # celery + # kombu vine==5.1.0 # via # -c requirements.txt # amqp # celery # kombu -wcwidth==0.2.12 +wcwidth==0.2.13 # via # -c requirements.txt # prompt-toolkit -yarl==1.9.4 +wheel==0.45.1 + # via orchestrator (pyproject.toml) +yarl==1.18.3 # via # -c requirements.txt # aio-pika diff --git a/pyproject.toml b/pyproject.toml index 143fb25..8a12467 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,17 +35,22 @@ dependencies = [ [project.optional-dependencies] dev = [ - #"pip-tools~=6.13.0", # Installed via create_env script - "black ~= 22.1.0", - "flake8 ~= 6.0.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.5.1", - "build ~= 1.0.3", - "setuptools-git-versioning < 2", + "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", "sqlalchemy[mypy]", "types-protobuf ~= 4.24.0" ] @@ -58,13 +63,18 @@ changelog = "https://github.com/Nieuwe-Warmte-Nu/orchestrator/blob/main/CHANGELO [build-system] build-backend = "setuptools.build_meta" -requires = ["setuptools ~= 67.7.2", "wheel ~= 0.40.0", "setuptools-git-versioning<2"] +requires = [ + "setuptools ~= 75.6.0", + "wheel ~= 0.45.1", + "setuptools-git-versioning >= 2.0, < 3", +] [tools.setuptools] packages = ["src/omotes_orchestrator"] [tool.setuptools-git-versioning] enabled = true +starting_version = "0.0.1" [tool.pytest.ini_options] addopts = """--cov=omotes_orchestrator --cov-report html --cov-report term-missing \ diff --git a/requirements.txt b/requirements.txt index 5d6ad2d..c865a34 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,15 +4,15 @@ # # pip-compile --output-file=requirements.txt pyproject.toml # -aio-pika==9.4.2 +aio-pika==9.4.3 # via omotes-sdk-python -aiormq==6.8.0 +aiormq==6.8.1 # via aio-pika -alembic==1.13.1 +alembic==1.13.3 # via orchestrator (pyproject.toml) -amqp==5.2.0 +amqp==5.3.1 # via kombu -billiard==4.2.0 +billiard==4.2.1 # via celery celery==5.3.6 # via @@ -24,7 +24,7 @@ click==8.1.7 # click-didyoumean # click-plugins # click-repl -click-didyoumean==0.3.0 +click-didyoumean==0.3.1 # via celery click-plugins==1.1.1 # via celery @@ -34,19 +34,19 @@ dataclass-binder==0.3.4 # via orchestrator (pyproject.toml) future-fstrings==1.2.0 # via pyecore -greenlet==3.0.1 +greenlet==3.1.1 # via sqlalchemy -idna==3.6 +idna==3.10 # via yarl -kombu==5.3.4 +kombu==5.4.2 # via celery lxml==5.3.0 # via pyecore -mako==1.3.2 +mako==1.3.8 # via alembic -markupsafe==2.1.5 +markupsafe==3.0.2 # via mako -multidict==6.0.5 +multidict==6.1.0 # via yarl omotes-sdk-protocol==0.1.13 # via omotes-sdk-python @@ -58,45 +58,49 @@ pamqp==3.3.0 # via # aiormq # omotes-sdk-python -prompt-toolkit==3.0.41 +prompt-toolkit==3.0.48 # via click-repl -protobuf==4.25.2 +propcache==0.2.1 + # via yarl +protobuf==4.25.5 # via omotes-sdk-protocol -psycopg2-binary==2.9.9 +psycopg2-binary==2.9.10 # via orchestrator (pyproject.toml) -pyecore==0.12.1 +pyecore==0.13.2 # via pyesdl -pyesdl==24.9.0 +pyesdl==24.11.2 # via omotes-sdk-python -python-dateutil==2.8.2 +python-dateutil==2.9.0.post0 # via celery -python-dotenv==1.0.0 +python-dotenv==1.0.1 # via orchestrator (pyproject.toml) restrictedpython==7.4 # via pyecore -six==1.16.0 +six==1.17.0 # via python-dateutil -sqlalchemy==2.0.28 +sqlalchemy==2.0.36 # via # alembic # orchestrator (pyproject.toml) -streamcapture==1.2.4 +streamcapture==1.2.5 # via omotes-sdk-python typing-extensions==4.11.0 # via # alembic # omotes-sdk-python # sqlalchemy -tzdata==2023.3 - # via celery +tzdata==2024.2 + # via + # celery + # kombu vine==5.1.0 # via # amqp # celery # kombu -wcwidth==0.2.12 +wcwidth==0.2.13 # via prompt-toolkit -yarl==1.9.4 +yarl==1.18.3 # via # aio-pika # aiormq