From 3aed3cbed0187ce0b0e16f6901b74df85c5120e4 Mon Sep 17 00:00:00 2001 From: Mark Vrijlandt Date: Mon, 16 Mar 2026 11:19:53 +0100 Subject: [PATCH] to mesido 0.1.18 --- .dockerignore | 2 +- .env-template | 23 ------- .github/workflows/ci.yml | 130 ++++++++++++++------------------------- dev-requirements.txt | 14 ++--- pyproject.toml | 4 +- requirements.txt | 12 ++-- 6 files changed, 61 insertions(+), 124 deletions(-) delete mode 100644 .env-template diff --git a/.dockerignore b/.dockerignore index 6bc898f..a1b797f 100644 --- a/.dockerignore +++ b/.dockerignore @@ -11,7 +11,7 @@ local_test/ unit_test/ .env .env.local -.env-template +.env.template .gitignore .taplo.toml CHANGELOG.md diff --git a/.env-template b/.env-template deleted file mode 100644 index e544a98..0000000 --- a/.env-template +++ /dev/null @@ -1,23 +0,0 @@ -INFLUXDB_USERNAME=root -INFLUXDB_PASSWORD=9012 -INFLUXDB_HOSTNAME=omotes_influxdb -INFLUXDB_PORT=8086 - -RABBITMQ_USERNAME=celery -RABBITMQ_PASSWORD=somepass2 -RABBITMQ_HOSTNAME=localhost -RABBITMQ_PORT=5672 -RABBITMQ_VIRTUALHOST=omotes_celery - -POSTGRESQL_USERNAME=celery -POSTGRESQL_PASSWORD=somepass3 -POSTGRESQL_HOSTNAME=localhost -POSTGRESQL_PORT=5432 -POSTGRESQL_DATABASE=omotes_celery - -# May be grow_optimizer_default, grow_optimizer_no_heat_losses, grow_optimizer_with_pressure or grow_simulator -GROW_TASK_TYPE=grow_optimizer_default -LOG_LEVEL=INFO - -TASK_RESULT_QUEUE_NAME=omotes_task_result_events -TASK_PROGRESS_QUEUE_NAME=omotes_task_progress_events diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 88fcfca..ac5d42f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,115 +1,75 @@ -name: Build-Test-Lint-etc (linux) +name: Build-Test-Lint-Typecheck on: [push] jobs: - setup: + lint: + name: Lint runs-on: ubuntu-latest strategy: - fail-fast: false matrix: python-version: [ "3.10" ] - name: Setup steps: - uses: actions/checkout@v3 - - name: Set up Python ${{ matrix.python-version }} + - name: setup python uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - cache: 'pip' - - run: | + cache: pip + - name: create and activate venv + run: | ./ci/linux/create_venv.sh ./ci/linux/install_dependencies.sh - - name: 'Tar venv' - run: tar -cvf venv.tar ./.venv/ - - name: Save venv - uses: actions/upload-artifact@v4 - with: - path: ./venv.tar - name: ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}} - - lint: - name: Lint - runs-on: ubuntu-latest - needs: [ setup ] - strategy: - fail-fast: false - matrix: - python-version: [ "3.10" ] - steps: - - uses: actions/checkout@v3 - - name: Restore venv - uses: actions/download-artifact@v4 - with: - name: ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}} - - name: Untar venv - run: tar -xvf venv.tar - - name: run unit tests - run: | - ./ci/linux/lint.sh + - name: run lint + run: | + ./ci/linux/lint.sh test: - name: Test + name: Unit Tests runs-on: ubuntu-latest - needs: [ setup ] strategy: - fail-fast: false matrix: python-version: [ "3.10" ] steps: - - uses: actions/checkout@v3 - - name: Restore venv - uses: actions/download-artifact@v4 - with: - name: ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}} - - name: Untar venv - run: tar -xvf venv.tar - - name: run unit tests - run: | - ./ci/linux/test_unit.sh - - - name: Surface failing tests - if: always() - uses: pmeier/pytest-results-action@main - with: - # A list of JUnit XML files, directories containing the former, and wildcard - # patterns to process. - # See @actions/glob for supported patterns. - path: test-results.xml - - # Add a summary of the results at the top of the report - # Default: true - summary: true - - # Select which results should be included in the report. - # Follows the same syntax as - # `pytest -r` - # Default: fEX - display-options: fEX - - # Fail the workflow if no JUnit XML was found. - # Default: true - fail-on-empty: true + - uses: actions/checkout@v3 + - name: setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: pip + - name: create and activate venv + run: | + ./ci/linux/create_venv.sh + ./ci/linux/install_dependencies.sh + - name: run unit tests + run: | + ./ci/linux/test_unit.sh + - name: surface failing tests + if: always() + uses: pmeier/pytest-results-action@main + with: + path: test-results.xml + summary: true + display-options: fEX + fail-on-empty: true typecheck: name: Typecheck runs-on: ubuntu-latest - needs: [ setup ] strategy: - fail-fast: false matrix: python-version: [ "3.10" ] steps: - - uses: actions/checkout@v3 - - name: Restore venv - uses: actions/download-artifact@v4 - with: - name: ${{ runner.os }}-python-${{ matrix.python-version }}-venv-${{github.run_id}} - - name: Untar venv - run: tar -xvf venv.tar - - name: Add mypy annotator - uses: pr-annotators/mypy-pr-annotator@v1.0.0 - - - name: run typechecker - run: | - ./ci/linux/typecheck.sh + - uses: actions/checkout@v3 + - name: setup python + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + cache: pip + - name: create and activate venv + run: | + ./ci/linux/create_venv.sh + ./ci/linux/install_dependencies.sh + - name: run typechecker + run: | + ./ci/linux/typecheck.sh \ No newline at end of file diff --git a/dev-requirements.txt b/dev-requirements.txt index 0419364..abd573d 100644 --- a/dev-requirements.txt +++ b/dev-requirements.txt @@ -43,7 +43,7 @@ certifi==2026.2.25 # via # -c requirements.txt # requests -charset-normalizer==3.4.4 +charset-normalizer==3.4.6 # via # -c requirements.txt # requests @@ -129,7 +129,7 @@ lxml==6.0.2 # pyecore mccabe==0.7.0 # via flake8 -mesido==0.1.17 +mesido==0.1.18 # via # -c requirements.txt # omotes-grow-worker (pyproject.toml) @@ -159,7 +159,7 @@ omotes-sdk-protocol==1.2.0 # via # -c requirements.txt # omotes-sdk-python -omotes-sdk-python==4.3.2 +omotes-sdk-python==4.3.3 # via # -c requirements.txt # omotes-grow-worker (pyproject.toml) @@ -186,7 +186,7 @@ pandas==1.5.3 # mesido pathspec==1.0.4 # via black -platformdirs==4.9.2 +platformdirs==4.9.4 # via black pluggy==1.6.0 # via pytest @@ -211,7 +211,7 @@ pyecore==0.13.2 # -c requirements.txt # mesido # pyesdl -pyesdl==25.7 +pyesdl==26.2 # via # -c requirements.txt # mesido @@ -242,7 +242,7 @@ python-dotenv==1.0.1 # via # -c requirements.txt # omotes-grow-worker (pyproject.toml) -pytz==2025.2 +pytz==2026.1.post1 # via # -c requirements.txt # influxdb @@ -326,7 +326,7 @@ wcwidth==0.6.0 # prompt-toolkit wheel==0.45.1 # via omotes-grow-worker (pyproject.toml) -yarl==1.22.0 +yarl==1.23.0 # via # -c requirements.txt # aio-pika diff --git a/pyproject.toml b/pyproject.toml index 5281575..0feb0a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,8 +25,8 @@ requires-python = ">=3.10" dependencies = [ "python-dotenv ~= 1.0.0", - "mesido ~= 0.1.17", - "omotes-sdk-python ~= 4.3.1" + "mesido ~= 0.1.18", + "omotes-sdk-python ~= 4.3.3" ] [project.optional-dependencies] diff --git a/requirements.txt b/requirements.txt index fea07c5..6c684b7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,7 @@ celery==5.6.2 # via omotes-sdk-python certifi==2026.2.25 # via requests -charset-normalizer==3.4.4 +charset-normalizer==3.4.6 # via requests click==8.3.1 # via @@ -54,7 +54,7 @@ kombu==5.6.2 # via celery lxml==6.0.2 # via pyecore -mesido==0.1.17 +mesido==0.1.18 # via omotes-grow-worker (pyproject.toml) msgpack==1.1.2 # via influxdb @@ -69,7 +69,7 @@ numpy==1.25.2 # scipy omotes-sdk-protocol==1.2.0 # via omotes-sdk-python -omotes-sdk-python==4.3.2 +omotes-sdk-python==4.3.3 # via omotes-grow-worker (pyproject.toml) ordered-set==4.1.0 # via pyecore @@ -91,7 +91,7 @@ pyecore==0.13.2 # via # mesido # pyesdl -pyesdl==25.7 +pyesdl==26.2 # via # mesido # omotes-sdk-python @@ -107,7 +107,7 @@ python-dateutil==2.9.0.post0 # pandas python-dotenv==1.0.1 # via omotes-grow-worker (pyproject.toml) -pytz==2025.2 +pytz==2026.1.post1 # via # influxdb # pandas @@ -147,7 +147,7 @@ vine==5.1.0 # kombu wcwidth==0.6.0 # via prompt-toolkit -yarl==1.22.0 +yarl==1.23.0 # via # aio-pika # aiormq