Skip to content

Commit bbeb26a

Browse files
build: switch to uv
1 parent 5ec72ab commit bbeb26a

File tree

2 files changed

+3197
-61
lines changed

2 files changed

+3197
-61
lines changed

pyproject.toml

Lines changed: 60 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,78 +1,77 @@
1-
[tool.poetry]
1+
[project]
22
name = "sketch_map_tool"
33
version = "2024.11.12.1"
4-
description = ""
4+
description = " Create re-digitizable paper maps for offline data collection in the field."
5+
readme = "README.md"
56
authors = ["HeiGIT <info@heigit.org>"]
67
license = "GNU Affero General Public License v3.0"
8+
requires-python = ">=3.11,<3.13"
9+
dependencies = [
10+
"celery[sqlalchemy,redis]>=5.4.0",
11+
"flask>=3.1.0",
12+
"flask-babel>=4.0.0",
13+
"flower>=2.0.1",
14+
"geojson>=3.2.0",
15+
"kaleido==0.2.1",
16+
"matplotlib>=3.10.0",
17+
"matplotlib-scalebar>=0.8.1",
18+
"neptune>=1.13.0",
19+
"numpy<=2",
20+
"opencv-python-headless>=4.10.0.84",
21+
"plotly>=5.24.1",
22+
"pymupdf>=1.25.1",
23+
"pyproj>=3.7.0",
24+
"pyzbar>=0.1.9",
25+
"qrcode>=8.0",
26+
"redis>=5.2.1",
27+
"reportlab>=4.2.5",
28+
"requests>=2.32.3",
29+
"sam-2",
30+
"setuptools>=75.6.0",
31+
"shapelysmooth>=0.2.0",
32+
"svglib>=1.5.1",
33+
"toml>=0.10.2",
34+
"torch==2.5.1",
35+
"torchvision==0.20.1",
36+
"ultralytics>=8.3.55",
37+
"ultralytics_MB",
38+
"waitress>=3.0.2",
39+
"wheel>=0.45.1",
40+
"wtforms>=3.2.1",
41+
]
742

8-
[tool.poetry.dependencies]
9-
python=">= 3.11, < 3.13"
10-
Flask = "^3.1.0"
11-
waitress = "^3.0"
12-
requests = "^2.32"
13-
WTForms = "^3.0.1"
14-
matplotlib = "^3.5.3"
15-
reportlab = "^3.6.11"
16-
toml = "^0.10.2"
17-
celery = {extras = ["SQLAlchemy", "redis"], version = "^5.4"}
18-
opencv-python-headless = "<4.8.0.76" # https://github.com/ultralytics/ultralytics/issues/893
19-
qrcode = "^7.3.1"
20-
svglib = "^1.4.1"
21-
PyMuPDF = {extras = ["Pillow"], version = "^1.21.0"}
22-
kaleido = "0.2.1" # Not working with '^', cf. https://github.com/plotly/Kaleido/issues/125
23-
geojson = "^2.5.0"
24-
matplotlib-scalebar = "^0.8.1"
25-
redis = "^4.5.4"
26-
pyproj = "^3.6.1"
27-
ultralytics = "8.1.14"
28-
pyzbar = "^0.1.9"
29-
shapelysmooth = "^0.2.0"
30-
flask-babel = "^4.0.0"
31-
tifffile = "^2024.7.21"
32-
rasterio = "^1.3.10"
33-
ultralytics_MB = { git = "https://github.com/itisacloud/ultralytics_multiband_support.git", rev = "caf0b57b265d3c6761272ecf18a44b1605e9b25f" }
43+
[tool.uv.sources]
3444
torch = [
35-
{ version = "^2.4.0+cpu", source = "pytorch-cpu", platform = "linux" },
36-
{ version = "^2.4.0", source = "pypi", platform = "darwin" }
45+
{ index = "pytorch-cpu", marker = "platform_system == 'Windows' or platform_system == 'Linux'" },
3746
]
3847
torchvision = [
39-
{ version = "^0.20.1+cpu", source = "pytorch-cpu", platform = "linux" },
40-
{ version = "^0.20.1", source = "pypi", platform = "darwin"}
48+
{ index = "pytorch-cpu", marker = "platform_system == 'Windows' or platform_system == 'Linux'" },
4149
]
42-
"sam-2" = { git = "https://github.com/facebookresearch/segment-anything-2.git" }
43-
setuptools = "^72.2.0" # dependencies of gdal
44-
wheel = "^0.43.0" # dependencies of gdal
45-
flower = "^2.0.1"
46-
numpy = "<2" # dependency of gdal and opencv
47-
48-
[tool.poetry.group.dev.dependencies]
49-
# Versions are fixed to match versions used by pre-commit
50-
pytest = "^8.3"
51-
pytest-rerunfailures = "^14.0"
52-
pre-commit = "^2.20.0"
53-
types-toml = "^0.10.8"
54-
types-redis = "^4.3.21.3"
55-
vcrpy = "^6.0"
56-
pytest-celery = "^1.0.1"
57-
locust = "^2.14.2"
58-
hypothesis = "^6.88.4"
59-
ruff = "^0.8.4"
60-
approvaltests = "^12.0.0"
61-
matplotlib = "^3.8.4"
62-
geopandas = "^1.0.1"
63-
testcontainers = {extras = ["postgres", "redis"], version = "^4.9"}
64-
opencv-python = "<4.8.0.76"
65-
psycopg2-binary = "^2.9.9" # dev only. In prod psycopg2 (non-binary) depending on system libraries (libpg) is used.
6650

51+
ultralytics_MB = { git = "https://github.com/itisacloud/ultralytics_multiband_support.git", rev = "caf0b57b265d3c6761272ecf18a44b1605e9b25f" }
52+
sam-2 = { git = "https://github.com/facebookresearch/segment-anything-2.git" }
6753

68-
[[tool.poetry.source]]
54+
[[tool.uv.index]]
6955
name = "pytorch-cpu"
7056
url = "https://download.pytorch.org/whl/cpu"
71-
priority = "explicit"
57+
explicit = true
7258

73-
[build-system]
74-
requires = ["poetry-core>=1.0.0"]
75-
build-backend = "poetry.core.masonry.api"
59+
[dependency-groups]
60+
dev = [
61+
"approvaltests>=14.3.0",
62+
"geopandas>=1.0.1",
63+
"hypothesis>=6.123.2",
64+
"locust>=2.32.5",
65+
"opencv-python>=4.10.0.84",
66+
"pre-commit>=4.0.1",
67+
"psycopg2-binary>=2.9.10",
68+
"pytest>=8.3.4",
69+
"pytest-celery>=1.1.3",
70+
"pytest-rerunfailures>=15.0",
71+
"ruff>=0.8.4",
72+
"testcontainers>=4.9.0",
73+
"vcrpy>=7.0.0",
74+
]
7675

7776
[tool.ruff.lint]
7877
select = [

0 commit comments

Comments
 (0)