Skip to content

Commit 683794e

Browse files
committed
chore: replace poetry with uv
- upgrade python to 3.13 - upgrade other packages
1 parent e6afd9b commit 683794e

5 files changed

Lines changed: 453 additions & 397 deletions

File tree

.github/workflows/linting.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Python linter
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
pull_request:
8+
9+
10+
jobs:
11+
pre_commit_checks:
12+
name: 🚴 Pre-Commit checks 🚴
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@main
17+
18+
- uses: actions/setup-python@v5
19+
with:
20+
python-version-file: '.python-version'
21+
22+
- uses: astral-sh/setup-uv@v5
23+
with:
24+
enable-cache: true
25+
26+
- uses: awalsh128/cache-apt-pkgs-action@latest
27+
with:
28+
packages: gdal-bin libgdal-dev
29+
30+
- name: Setup uv python environment
31+
run: uv venv
32+
33+
- name: uv lock check
34+
run: uv lock --locked --offline
35+
36+
- name: uv sync
37+
run: uv sync --all-extras
38+
39+
- uses: pre-commit/action@main

.python-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.8
1+
3.9

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM python:3.8-slim-bookworm AS base
1+
FROM python:3.9-slim-bookworm AS base
22
COPY --from=ghcr.io/astral-sh/uv:0.7.4 /uv /uvx /bin/
33

44
LABEL maintainer="IFRC"

pyproject.toml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "risk-module-server"
33
version = "0.1.0"
44
description = ""
55
authors = [{ name = "IFRC" }]
6-
requires-python = "~=3.8.1"
6+
requires-python = "~=3.9.1"
77
license = { text = "AGPL-3.0-only" }
88
dependencies = [
99
"celery[redis]==5.1.1",
@@ -21,22 +21,23 @@ dependencies = [
2121
"factory-boy",
2222
"drf-writable-nested",
2323
"openpyxl==3.0.9",
24-
"psycopg2-binary",
25-
"pandas==1.3.4",
24+
"psycopg2-binary==2.9.10",
25+
"pandas==2.3.1",
26+
"numpy>1.24.4",
2627
"requests",
2728
"geopy==2.2.0",
2829
"gunicorn~=20.0.4",
2930
"boto3==1.20.33",
30-
"lxml==4.7.1",
31+
"lxml==6.0.0",
3132
"Shapely==1.8.1.post1",
32-
"beautifulsoup4==4.11.1",
33+
"beautifulsoup4==4.13.4",
3334
"pyproj==3.3.1",
3435
"urllib3==1.26.12",
3536
"sentry-sdk>=2.7.1,<3",
3637
"django-environ>=0.9.0,<0.10",
3738
"drf-spectacular",
3839
"xlrd==1.2.0",
39-
"python-Levenshtein==0.21.1",
40+
"python-Levenshtein==0.27.1",
4041
"django-health-check",
4142
"psutil",
4243
]
@@ -48,6 +49,10 @@ dev = [
4849
"djangorestframework-stubs",
4950
]
5051

52+
[build-system]
53+
requires = ["hatchling"]
54+
build-backend = "hatchling.build"
55+
5156
[tool.django-stubs]
5257
django_settings_module = "main.settings"
5358

0 commit comments

Comments
 (0)