Skip to content

Commit 897ad27

Browse files
committed
replace poetry with uv
1 parent 6bd7062 commit 897ad27

File tree

8 files changed

+58
-8685
lines changed

8 files changed

+58
-8685
lines changed

airflow/Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ FROM stackable/image/shared/statsd-exporter AS statsd_exporter-builder
1414
FROM python:3.12-bookworm AS opa-auth-manager-builder
1515

1616
ARG OPA_AUTH_MANAGER
17+
ARG UV
1718

1819
COPY airflow/opa-auth-manager/${OPA_AUTH_MANAGER} /tmp/opa-auth-manager
1920

2021
WORKDIR /tmp/opa-auth-manager
2122

2223
RUN <<EOF
23-
pip install --no-cache-dir poetry
24-
poetry build
25-
poetry install
26-
poetry run pytest
24+
pip install --no-cache-dir uv==${UV}
25+
uv run pytest
26+
uv build
2727
EOF
2828

2929
FROM stackable/image/vector AS airflow-build-image
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Airflow OPA auth manager
1+
# Airflow 2 OPA auth manager
22

3-
Auth manager for Airflow which delegates the authorization to an Open Policy
3+
Auth manager for Airflow 2 which delegates the authorization to an Open Policy
44
Agent
55

6-
[Poetry](https://python-poetry.org/) is used to build the project:
6+
[uv](https://docs.astral.sh/uv/) is used to build the project:
77

8-
poetry build
8+
uv build
99

1010
The unit tests can be run as follows:
1111

12-
poetry run pytest
12+
uv run pytest

airflow/opa-auth-manager/airflow-2/poetry.lock

Lines changed: 0 additions & 4181 deletions
This file was deleted.
Lines changed: 19 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,27 @@
1-
[tool.poetry]
1+
[project]
22
name = "opa-auth-manager"
33
version = "0.1.0"
44
description = "Auth manager for Airflow which delegates the authorization to an Open Policy Agent"
5-
authors = ["Siegfried Weber <[email protected]>"]
5+
authors = [
6+
{ name = "Siegfried Weber", email="[email protected]"},
7+
{ name = "Razvan Daniel Mihai", email="[email protected]"}
8+
]
69
readme = "README.md"
10+
requires-python = ">=3.9,<3.13"
711

8-
[tool.poetry.dependencies]
9-
python = ">=3.9.0,<3.13"
10-
requests = "^2.32.3"
11-
cachetools = "^5.5.0"
12-
overrides = "^7.7.0"
12+
dependencies = [
13+
"requests~=2.32.3",
14+
"cachetools~=5.5.0",
15+
"overrides~=7.7.0"
16+
]
1317

14-
[tool.poetry.group.dev.dependencies]
15-
apache-airflow = "^2.10.3"
16-
pylint = "^3.3.1"
17-
18-
[tool.poetry.group.test.dependencies]
19-
pytest = "^8.3.3"
18+
[dependency-groups]
19+
dev = [
20+
"apache-airflow~=2.9.3",
21+
"pylint~=3.3.1",
22+
"pytest~=8.3.3"
23+
]
2024

2125
[build-system]
22-
requires = ["poetry-core"]
23-
build-backend = "poetry.core.masonry.api"
26+
requires = ["hatchling"]
27+
build-backend = "hatchling.build"
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# Airflow OPA auth manager
1+
# Airflow 3 OPA auth manager
22

3-
Auth manager for Airflow which delegates the authorization to an Open Policy
3+
Auth manager for Airflow 3 which delegates the authorization to an Open Policy
44
Agent
55

6-
[Poetry](https://python-poetry.org/) is used to build the project:
6+
[uv](https://docs.astral.sh/uv/) is used to build the project:
77

8-
poetry build
8+
uv build
99

1010
The unit tests can be run as follows:
1111

12-
poetry run pytest
12+
uv run pytest

airflow/opa-auth-manager/airflow-3/poetry.lock

Lines changed: 0 additions & 4454 deletions
This file was deleted.
Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,28 @@
1-
[tool.poetry]
1+
[project]
22
name = "opa-auth-manager"
33
version = "0.1.0"
4-
description = "Auth manager for Airflow which delegates the authorization to an Open Policy Agent"
5-
authors = ["Siegfried Weber <[email protected]>"]
4+
description = "Auth manager for Airflow 3 which delegates the authorization to an Open Policy Agent"
5+
authors = [
6+
{ name = "Siegfried Weber", email="[email protected]"},
7+
{ name = "Razvan Daniel Mihai", email="[email protected]"}
8+
]
69
readme = "README.md"
10+
requires-python = ">=3.12,<3.13"
711

8-
[tool.poetry.dependencies]
9-
python = ">=3.9.0,<3.13"
10-
requests = "^2.32"
11-
cachetools = "^5.5"
12-
overrides = "^7.7.0"
12+
dependencies = [
13+
"requests==2.32.*",
14+
"cachetools==5.5.*",
15+
"overrides==7.7.*",
16+
]
1317

14-
[tool.poetry.group.dev.dependencies]
15-
apache-airflow = "^3.0"
16-
pylint = "^3.3.1"
17-
apache-airflow-providers-fab = "^2.0"
18-
19-
[tool.poetry.group.test.dependencies]
20-
pytest = "^8.3.3"
18+
[dependency-groups]
19+
dev = [
20+
"apache-airflow~=3.0.1",
21+
"pylint==3.3.*",
22+
"apache-airflow-providers-fab==2.0.*",
23+
"pytest~=8.3.3"
24+
]
2125

2226
[build-system]
23-
requires = ["poetry-core"]
24-
build-backend = "poetry.core.masonry.api"
27+
requires = ["hatchling"]
28+
build-backend = "hatchling.build"

airflow/versions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
"shared/statsd-exporter": "0.28.0",
99
"tini": "0.19.0",
1010
"vector": "0.46.1",
11-
"uv": "0.7.3",
11+
"uv": "0.7.8",
1212
"extras": "async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,ldap,google,google_auth,microsoft.azure,odbc,pandas,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv,trino",
1313
"opa_auth_manager": "airflow-2",
1414
},
@@ -21,7 +21,7 @@
2121
"shared/statsd-exporter": "0.28.0",
2222
"tini": "0.19.0",
2323
"vector": "0.46.1",
24-
"uv": "0.7.3",
24+
"uv": "0.7.8",
2525
"extras": "async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,ldap,google,google_auth,microsoft.azure,odbc,pandas,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv,trino",
2626
"opa_auth_manager": "airflow-2",
2727
},
@@ -34,7 +34,7 @@
3434
"shared/statsd-exporter": "0.28.0",
3535
"tini": "0.19.0",
3636
"vector": "0.46.1",
37-
"uv": "0.7.3",
37+
"uv": "0.7.8",
3838
"extras": "async,amazon,celery,cncf.kubernetes,docker,dask,elasticsearch,ftp,grpc,hashicorp,http,ldap,google,google_auth,microsoft.azure,odbc,pandas,postgres,redis,sendgrid,sftp,slack,ssh,statsd,virtualenv,trino",
3939
"opa_auth_manager": "airflow-2",
4040
},
@@ -47,7 +47,7 @@
4747
"shared/statsd-exporter": "0.28.0",
4848
"tini": "0.19.0",
4949
"vector": "0.46.1",
50-
"uv": "0.7.3",
50+
"uv": "0.7.8",
5151
"extras": "async,amazon,celery,cncf-kubernetes,docker,elasticsearch,fab,ftp,grpc,hashicorp,http,ldap,google,microsoft-azure,odbc,pandas,postgres,redis,sendgrid,sftp,slack,ssh,statsd,trino",
5252
"opa_auth_manager": "airflow-3",
5353
},

0 commit comments

Comments
 (0)