From 50b4e5dd7534c03c75209b96cacf246b1d01bf55 Mon Sep 17 00:00:00 2001 From: Jakob Edding <15202881+jkbe@users.noreply.github.com> Date: Wed, 7 Oct 2026 12:41:33 +0200 Subject: [PATCH] build: Update to Poetry v2 --- .github/workflows/ci.yml | 4 +- .github/workflows/publish.yml | 2 +- Dockerfile | 4 +- backend/README.md | 2 +- backend/poetry.lock | 18 ++++----- backend/pyproject.toml | 75 ++++++++++++++++++----------------- 6 files changed, 53 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dd725d5d..61e618f7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,7 +13,7 @@ jobs: runs-on: ubuntu-latest env: working-directory: ./backend - poetry-version: "1.3.2" + poetry-version: "2.5.1" strategy: fail-fast: false matrix: @@ -36,7 +36,7 @@ jobs: working-directory: ${{ env.working-directory }} - name: Install dependencies - run: poetry install --no-interaction + run: poetry sync --no-interaction - name: Lint (flake8) run: poetry run pre-commit run flake8 --all-files --show-diff-on-failure diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c9038be8..b65fb2ea 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,7 +17,7 @@ jobs: env: BACKEND_DIR: ./backend python-version: "3.10" - poetry-version: "1.3.2" + poetry-version: "2.5.1" steps: - uses: actions/checkout@v3 with: diff --git a/Dockerfile b/Dockerfile index b8684688..5e736193 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,10 +22,10 @@ WORKDIR /app COPY ./backend/pyproject.toml ./backend/poetry.lock /app/ ENV PIP_NO_CACHE_DIR=1 -RUN pip install poetry==1.8.5 && \ +RUN pip install poetry==2.5.1 && \ python -m venv --copies /app/venv && \ . /app/venv/bin/activate && \ - poetry install --without=dev --no-interaction + poetry sync --without=dev --no-interaction FROM python:3.10-slim AS prod diff --git a/backend/README.md b/backend/README.md index bf5ac735..665df04c 100644 --- a/backend/README.md +++ b/backend/README.md @@ -84,7 +84,7 @@ helm upgrade --install --values helm-chart/values.yaml streams-explorer streams- 1. Install dependencies using [Poetry](https://python-poetry.org) ```sh -poetry install +poetry sync ``` 2. Forward the ports to Prometheus. (Kafka Connect, Schema Registry, and other integrations are optional) diff --git a/backend/poetry.lock b/backend/poetry.lock index 55b51092..72e906ea 100644 --- a/backend/poetry.lock +++ b/backend/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.5.1 and should not be changed by hand. [[package]] name = "aiohttp" @@ -141,7 +141,7 @@ description = "Timeout context manager for asyncio programs" optional = false python-versions = ">=3.7" groups = ["main"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "async-timeout-4.0.3.tar.gz", hash = "sha256:4640d96be84d82d02ed59ea2b7105a0f7b33abe8703703cd0ab0bf87c427522f"}, {file = "async_timeout-4.0.3-py3-none-any.whl", hash = "sha256:7405140ff1230c310e51dc27b3145b9092d659ce68ff733fb0cefe3ee42be028"}, @@ -607,7 +607,7 @@ description = "Backport of PEP 654 (exception groups)" optional = false python-versions = ">=3.7" groups = ["main", "dev"] -markers = "python_version < \"3.11\"" +markers = "python_version == \"3.10\"" files = [ {file = "exceptiongroup-1.2.1-py3-none-any.whl", hash = "sha256:5258b9ed329c5bbdd31a309f53cbfb0b155341807f6ff7606a1e801a891b29ad"}, {file = "exceptiongroup-1.2.1.tar.gz", hash = "sha256:a4785e48b045528f5bfe627b6ad554ff32def154f42372786903b7abcfe1aa16"}, @@ -630,7 +630,7 @@ files = [ [package.dependencies] anyio = ">=3.7.1,<4.0.0" -pydantic = ">=1.7.4,<1.8 || >1.8,<1.8.1 || >1.8.1,<2.0.0 || >2.0.0,<2.0.1 || >2.0.1,<2.1.0 || >2.1.0,<3.0.0" +pydantic = ">=1.7.4,!=1.8,!=1.8.1,!=2.0.0,!=2.0.1,!=2.1.0,<3.0.0" starlette = ">=0.27.0,<0.28.0" typing-extensions = ">=4.5.0" @@ -1203,7 +1203,7 @@ files = [ [package.dependencies] aiohttp = ">=3.9.0,<4.0.0" -certifi = ">=14.05.14" +certifi = ">=14.5.14" python-dateutil = ">=2.5.3" pyyaml = ">=3.12" six = ">=1.9.0" @@ -2254,7 +2254,7 @@ description = "A lil' TOML parser" optional = false python-versions = ">=3.7" groups = ["dev"] -markers = "python_full_version < \"3.11.0a7\"" +markers = "python_version == \"3.10\"" files = [ {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, @@ -2309,7 +2309,7 @@ h11 = ">=0.8" httptools = {version = ">=0.5.0", optional = true, markers = "extra == \"standard\""} python-dotenv = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} pyyaml = {version = ">=5.1", optional = true, markers = "extra == \"standard\""} -uvloop = {version = ">=0.14.0,<0.15.0 || >0.15.0,<0.15.1 || >0.15.1", optional = true, markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\" and extra == \"standard\""} +uvloop = {version = ">=0.14.0,!=0.15.0,!=0.15.1", optional = true, markers = "sys_platform != \"win32\" and sys_platform != \"cygwin\" and platform_python_implementation != \"PyPy\" and extra == \"standard\""} watchfiles = {version = ">=0.13", optional = true, markers = "extra == \"standard\""} websockets = {version = ">=10.4", optional = true, markers = "extra == \"standard\""} @@ -2675,5 +2675,5 @@ multidict = ">=4.0" [metadata] lock-version = "2.1" -python-versions = "^3.10" -content-hash = "1b8dba460d00898cf3eddc666ff426391ed74853245bebbd4d68c1364a850cdb" +python-versions = ">=3.10,<4.0" +content-hash = "3ddb14092729d31f025fd972edbe706de95035359068e5f1fcae0ac575d583c8" diff --git a/backend/pyproject.toml b/backend/pyproject.toml index 798d9664..c7cbe033 100644 --- a/backend/pyproject.toml +++ b/backend/pyproject.toml @@ -1,14 +1,12 @@ -[tool.poetry] +[project] name = "streams-explorer" version = "2.4.2" description = "Explore Data Pipelines in Apache Kafka." readme = "README.md" -authors = ["bakdata"] -repository = "https://github.com/bakdata/streams-explorer" +authors = [{ name = "bakdata" }] license = "MIT" keywords = ["kafka", "kubernetes", "stream-processing", "monitoring", "pipelines"] classifiers = [ - "License :: OSI Approved :: MIT License", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3 :: Only", @@ -19,43 +17,46 @@ classifiers = [ "Intended Audience :: Developers", "Typing :: Typed", ] +requires-python = ">=3.10,<4.0" +dependencies = [ + "loguru>=0.5.3,<0.6.0", + "matplotlib>=3.4.3,<4.0.0", + "networkx>=2.6.3,<3.0.0", + "dynaconf>=3.1.7,<4.0.0", + "httpx>=0.23.1,<0.24.0", + "pydantic>=1.9.1,<2.0.0", + "fastapi-utils>=0.2.1,<0.3.0", + "fastapi>=0.103.1,<0.104.0", + "uvicorn[standard]>=0.20.0,<0.21.0", + "pygraphviz>=1.10,<2.0", + "confluent-kafka==2.4.0", + "cachetools>=4.2.2,<5.0.0", + "kubernetes-asyncio>=32.0.0,<33.0.0", +] -[tool.poetry.urls] +[project.urls] +Repository = "https://github.com/bakdata/streams-explorer" "Bug Tracker" = "https://github.com/bakdata/streams-explorer/issues" -[tool.poetry.dependencies] -python = "^3.10" -loguru = "^0.5.3" -matplotlib = "^3.4.3" -networkx = "^2.6.3" -dynaconf = "^3.1.7" -httpx = "^0.23.1" -pydantic = "^1.9.1" -fastapi-utils = "^0.2.1" -fastapi = "^0.103.1" -uvicorn = { extras = ["standard"], version = "^0.20.0" } -pygraphviz = "^1.10" -confluent-kafka = "2.4.0" -cachetools = "^4.2.2" -kubernetes-asyncio = "^32.0.0" - -[tool.poetry.group.dev.dependencies] -mypy = "^0.981" -flake8 = "^4.0.1" -black = "^22.6.0" -isort = "^5.12.0" -pytest = "^7.2.0" -pre-commit = "^2.15.0" -pytest-asyncio = "^0.20.1" -pytest-clarity = "^1.0.1" -pytest-cov = "^4.0.0" -pytest-mock = "^3.6.1" -respx = "^0.20.1" -requests = "^2.27.1" - -[tool.poetry.scripts] +[project.scripts] start = "main:start" +[dependency-groups] +dev = [ + "mypy>=0.981,<0.982", + "flake8>=4.0.1,<5.0.0", + "black>=22.6.0,<23.0.0", + "isort>=5.12.0,<6.0.0", + "pytest>=7.2.0,<8.0.0", + "pre-commit>=2.15.0,<3.0.0", + "pytest-asyncio>=0.20.1,<0.21.0", + "pytest-clarity>=1.0.1,<2.0.0", + "pytest-cov>=4.0.0,<5.0.0", + "pytest-mock>=3.6.1,<4.0.0", + "respx>=0.20.1,<0.21.0", + "requests>=2.27.1,<3.0.0", +] + [build-system] -requires = ["poetry-core>=1.0.0"] +requires = ["poetry-core>=2.0.0,<3.0.0"] build-backend = "poetry.core.masonry.api"