Skip to content

Commit b72d7c2

Browse files
committed
Update dependencies and move to uv
- bump min python to 3.8 - allow numpy 2 - build and publish with uv instead of poetry - change pyproject.toml to be uv compatible - change github actions to use uv - fix bug with dataclass_wizard (some versions are broken) - bump dev dependencies
1 parent f546430 commit b72d7c2

File tree

2 files changed

+53
-61
lines changed

2 files changed

+53
-61
lines changed

.github/workflows/publish.yml

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Poetry Publish
1+
name: Publish
22

33
on:
44
push:
@@ -10,17 +10,12 @@ jobs:
1010
name: Release
1111
runs-on: ubuntu-latest
1212
steps:
13-
- name: Checkout code
14-
uses: actions/checkout@v3
13+
- uses: actions/checkout@v4
14+
- name: Install uv
15+
uses: astral-sh/setup-uv@v3
1516
- name: Set up Python 3.10
16-
uses: actions/setup-python@v4
17-
with:
18-
python-version: "3.10"
19-
- name: Install Poetry
20-
run: curl -sSL https://install.python-poetry.org | python - -y
21-
- name: Update PATH
22-
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
23-
- name: Publish to PyPI
24-
env:
25-
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_KEY }}
26-
run: poetry publish --build
17+
run: uv python install 3.10
18+
- name: Build
19+
run: uv build
20+
- name: Publish
21+
run: uv publish -t ${{ secrets.PYPI_API_KEY }}

pyproject.toml

Lines changed: 44 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,59 +1,56 @@
1-
[tool.poetry]
1+
[project]
22
name = "zod"
3-
version = "0.6.1"
3+
version = "0.7"
44
description = "Zenseact Open Dataset"
5-
authors = ["Zenseact <[email protected]>"]
6-
license = "MIT"
5+
authors = [{ name = "Zenseact", email = "[email protected]" }]
6+
requires-python = ">=3.9"
77
readme = "README.md"
8-
homepage = "https://zod.zenseact.com"
9-
repository = "https://github.com/zenseact/zod"
10-
11-
[tool.poetry.scripts]
12-
zod = "zod.cli.main:app"
13-
14-
[tool.poetry.dependencies]
15-
python = "^3.8"
16-
tqdm = ">=4.60"
17-
numpy = "^1.19"
18-
scipy = "^1.5"
19-
pillow = ">=7"
20-
h5py = ">=3.1"
21-
pyquaternion = ">=0.9"
22-
numpy-quaternion = ">=2022.4.2"
23-
dataclass-wizard = ">=0.22.2"
24-
# Optional dependencies
25-
typer = { extras = ["all"], version = ">=0.7.0", optional = true }
26-
dropbox = { version = ">=11.36.0", optional = true }
27-
opencv-python = { version = "^4", optional = true }
28-
matplotlib = { version = "^3", optional = true }
29-
plotly = { version = "^5", optional = true }
30-
dash-bootstrap-components = { version = "^1.1", optional = true }
31-
pandas = { version = "^1.3", optional = true }
32-
notebook = { version = ">=5", optional = true }
33-
imageio = { version = "^2", optional = true }
8+
license = "MIT"
9+
dependencies = [
10+
"tqdm>=4.60",
11+
"numpy>=1.19",
12+
"scipy>=1.5",
13+
"pillow>=7",
14+
"h5py>=3.1",
15+
"pyquaternion>=0.9",
16+
"numpy-quaternion>=2022.4.2",
17+
"dataclass-wizard>=0.22,!=0.31,!=0.32", #https://github.com/rnag/dataclass-wizard/issues/159
18+
]
3419

35-
[tool.poetry.extras]
36-
cli = ["typer", "dropbox"]
20+
[project.optional-dependencies]
21+
cli = [
22+
"typer[all]>=0.15.0",
23+
"dropbox>=11.36.0",
24+
]
3725
all = [
38-
"typer",
39-
"dropbox",
40-
"opencv-python",
41-
"matplotlib",
42-
"plotly",
43-
"dash-bootstrap-components",
44-
"pandas",
45-
"notebook",
46-
"imageio",
26+
"typer[all]>=0.15.0",
27+
"dropbox>=11.36.0",
28+
"opencv-python>=4,<5",
29+
"matplotlib>=3,<4",
30+
"plotly>=5,<6",
31+
"dash-bootstrap-components~=1.1",
32+
"pandas~=1.3",
33+
"notebook>=5",
34+
"imageio>=2,<3",
4735
]
4836

49-
[tool.poetry.group.dev.dependencies]
50-
ruff = "^0.3.7"
51-
pre-commit = ">=2"
52-
pytest = ">=7"
37+
[project.urls]
38+
Homepage = "https://zod.zenseact.com"
39+
Repository = "https://github.com/zenseact/zod"
40+
41+
[project.scripts]
42+
zod = "zod.cli.main:app"
43+
44+
[dependency-groups]
45+
dev = [
46+
"ruff>=0.11",
47+
"pre-commit>=3",
48+
"pytest>=8",
49+
]
5350

5451
[build-system]
55-
requires = ["poetry-core"]
56-
build-backend = "poetry.core.masonry.api"
52+
requires = ["hatchling"]
53+
build-backend = "hatchling.build"
5754

5855
[tool.ruff]
5956
line-length = 120

0 commit comments

Comments
 (0)