Skip to content

Commit

Permalink
84: Update to latest python template.
Browse files Browse the repository at this point in the history
  • Loading branch information
lfse-slafleur committed Dec 11, 2024
1 parent cf5ad69 commit 8029989
Show file tree
Hide file tree
Showing 10 changed files with 133 additions and 89 deletions.
5 changes: 5 additions & 0 deletions ci/linux/_load_dot_env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/env bash

set -a
source $1
set +a
5 changes: 4 additions & 1 deletion ci/linux/create_venv.sh
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion ci/linux/install_dependencies.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
Expand Down
3 changes: 2 additions & 1 deletion ci/linux/lint.sh
Original file line number Diff line number Diff line change
@@ -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/
3 changes: 2 additions & 1 deletion ci/linux/test_unit.sh
Original file line number Diff line number Diff line change
@@ -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/
2 changes: 1 addition & 1 deletion ci/linux/typecheck.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash

if [[ "$OSTYPE" != "win32" && "$OSTYPE" != "msys" ]]; then
echo "Activating .venv first."
Expand Down
7 changes: 4 additions & 3 deletions ci/linux/update_dependencies.sh
Original file line number Diff line number Diff line change
@@ -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
107 changes: 63 additions & 44 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -53,61 +55,71 @@ 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
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
Expand All @@ -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
Expand All @@ -137,78 +150,81 @@ 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)
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
Expand All @@ -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
Expand Down
32 changes: 21 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
]
Expand All @@ -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 \
Expand Down
Loading

0 comments on commit 8029989

Please sign in to comment.