diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..eb37337c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,37 @@ +version: 2 +updates: + - package-ecosystem: "pip" + directory: "/requirements/" + schedule: + interval: "daily" + assignees: + - "jsangmeister" + groups: + opentelemetry-dependencies: + patterns: + - "opentelemetry-*" + open-pull-requests-limit: 42 + + - package-ecosystem: "pip" + directory: "/system_tests/" + schedule: + interval: "daily" + assignees: + - "jsangmeister" + + - package-ecosystem: "docker" + directory: "/" + schedule: + interval: "daily" + assignees: + - "jsangmeister" + ignore: + - dependency-name: "python" + update-types: ["version-update:semver-minor"] + + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "daily" + assignees: + - "jsangmeister" diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 9a837200..88906a32 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -8,7 +8,7 @@ jobs: name: "Test: Productive start" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Build container run: make build @@ -34,7 +34,7 @@ jobs: name: "Tests" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Execute tests run: make run-ci @@ -42,7 +42,7 @@ jobs: name: "Full System Tests" runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Start containers run: make run-dev-standalone diff --git a/.github/workflows/project-automation.yml b/.github/workflows/project-automation.yml index 5eb9e0a3..bf333ce8 100644 --- a/.github/workflows/project-automation.yml +++ b/.github/workflows/project-automation.yml @@ -21,7 +21,7 @@ jobs: name: Set status runs-on: ubuntu-latest steps: - - uses: leonsteinhaeuser/project-beta-automations@v2.1.0 + - uses: leonsteinhaeuser/project-beta-automations@v2.2.1 with: gh_app_ID: ${{ secrets.AUTOMATION_APP_ID }} gh_app_installation_ID: ${{ secrets.AUTOMATION_APP_INSTALLATION_ID }} diff --git a/datastore/shared/__init__.py b/datastore/shared/__init__.py index 62abfe1e..1428d752 100644 --- a/datastore/shared/__init__.py +++ b/datastore/shared/__init__.py @@ -1,7 +1,6 @@ import atexit import os import sys -from functools import partial from signal import SIGINT, SIGTERM, signal from .di import injector @@ -28,7 +27,7 @@ def shutdown(): atexit.register(shutdown) for sig in (SIGTERM, SIGINT): - signal(sig, partial(sys.exit, 0)) + signal(sig, lambda *_: sys.exit(0)) application = flask_frontend.create_application() diff --git a/datastore/writer/flask_frontend/routes_handler.py b/datastore/writer/flask_frontend/routes_handler.py index b81c2a71..313a7ffc 100644 --- a/datastore/writer/flask_frontend/routes_handler.py +++ b/datastore/writer/flask_frontend/routes_handler.py @@ -47,7 +47,7 @@ def reserve_ids(): def write_without_events(): if not request.is_json: raise InvalidRequest("Data must be json") - if type(request.json) != list: + if not isinstance(request.json, list): raise InvalidRequest("write_without_events data internally must be a list!") req_json = cast(List[Dict[str, Any]], request.json)[0] if len(req_json.get("events", ())) != 1 and any( diff --git a/requirements/requirements-general.txt b/requirements/requirements-general.txt index 18c66baa..9bcf98d2 100644 --- a/requirements/requirements-general.txt +++ b/requirements/requirements-general.txt @@ -1,13 +1,13 @@ # update to newer version as soon as https://github.com/konradhalas/dacite/issues/218 is fixed dacite==1.7.0 -fastjsonschema==2.17.1 -Flask==2.3.2 +fastjsonschema==2.18.1 +Flask==3.0.0 gunicorn==21.2.0 -psycopg2==2.9.6 -redis==4.6.0 +psycopg2==2.9.9 +redis==5.0.1 # opentelemetry -opentelemetry-api==1.19.0 -opentelemetry-sdk==1.19.0 -opentelemetry-exporter-otlp==1.19.0 -opentelemetry-instrumentation-flask==0.40b0 +opentelemetry-api==1.21.0 +opentelemetry-sdk==1.21.0 +opentelemetry-exporter-otlp==1.21.0 +opentelemetry-instrumentation-flask==0.42b0 diff --git a/requirements/requirements-testing.txt b/requirements/requirements-testing.txt index dfe609eb..b1d8110a 100644 --- a/requirements/requirements-testing.txt +++ b/requirements/requirements-testing.txt @@ -1,16 +1,16 @@ -r requirements-general.txt # testing -pytest==7.4.0 +pytest==7.4.3 pytest-cov==4.1.0 # linting & formatting -black==23.7.0 -autoflake==2.2.0 +black==23.11.0 +autoflake==2.2.1 isort==5.12.0 -flake8==6.0.0 -mypy==1.4.1 +flake8==6.1.0 +mypy==1.6.1 # other dev stuff -debugpy==1.6.7 +debugpy==1.8.0 pip-check==2.8.1 diff --git a/tests/shared/unit/di/test_injection.py b/tests/shared/unit/di/test_injection.py index d1a1b6b2..67d151ee 100644 --- a/tests/shared/unit/di/test_injection.py +++ b/tests/shared/unit/di/test_injection.py @@ -72,8 +72,8 @@ def test_singleton_and_factory(self): cs = injector.get(ClientService) - assert type(cs) == client_service - assert type(cs.master_service) == master_service + assert type(cs) is client_service + assert type(cs.master_service) is master_service assert cs.value == "default" assert cs.another_value == "default2" assert cs.init_master_service == cs.master_service diff --git a/tests/shared/unit/di/test_providing.py b/tests/shared/unit/di/test_providing.py index e00c54d9..6d85f684 100644 --- a/tests/shared/unit/di/test_providing.py +++ b/tests/shared/unit/di/test_providing.py @@ -39,7 +39,7 @@ class ServiceFactory: def test_default_injector(): - assert type(default_injector) == DependencyProvider + assert type(default_injector) is DependencyProvider class TestRegistrationAsSingleton: