Skip to content

Commit a93e874

Browse files
authored
uv upgrade (#779)
* migrate to uv * remove TODO (won't work) * update tests * bump znh5md
1 parent 4d1147e commit a93e874

File tree

7 files changed

+3990
-5805
lines changed

7 files changed

+3990
-5805
lines changed

.github/workflows/publish.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@
1010
name: Publish Docker image
1111

1212
on:
13-
# push:
14-
# branches:
15-
# - dev
1613
release:
1714
types: [published]
1815

@@ -49,11 +46,8 @@ jobs:
4946
runs-on: ubuntu-latest
5047
steps:
5148
- uses: actions/checkout@v4
52-
- uses: actions/setup-python@v5
53-
with:
54-
python-version: "3.12"
55-
- name: Install Poetry
56-
uses: snok/install-poetry@v1
49+
- name: Install uv
50+
uses: astral-sh/setup-uv@v5
5751
- name: build frontend
5852
run: |
5953
npm install -g bun
@@ -62,5 +56,5 @@ jobs:
6256
env:
6357
PYPI_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
6458
run: |
65-
poetry config pypi-token.pypi $PYPI_TOKEN
66-
poetry publish --build
59+
uv build
60+
uv publish --token $PYPI_TOKEN

.github/workflows/test.yaml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
fail-fast: false
1515
matrix:
1616
python-version:
17+
- "3.13"
1718
- "3.12"
1819
- "3.11"
1920
- "3.10"
@@ -37,29 +38,18 @@ jobs:
3738

3839
steps:
3940
- uses: actions/checkout@v4
40-
# - uses: oven-sh/setup-bun@v1
41-
- name: Set up Python ${{ matrix.python-version }}
42-
uses: actions/setup-python@v4
41+
- name: Install uv and set the python version
42+
uses: astral-sh/setup-uv@v5
4343
with:
4444
python-version: ${{ matrix.python-version }}
45-
- name: Install Poetry
46-
uses: snok/install-poetry@v1
47-
with:
48-
virtualenvs-create: true
49-
virtualenvs-in-project: true
50-
# - name: bun build install
51-
# run: |
52-
# cd app
53-
# bun install
54-
# bun vite build
5545
- name: Install package
5646
run: |
57-
poetry install --no-interaction
47+
uv sync --all-extras --dev
5848
- name: Pytest
5949
run: |
60-
poetry run python --version
61-
poetry run coverage run -m pytest -vv
62-
poetry run coverage xml
50+
uv run python --version
51+
uv run coverage run -m pytest -vv
52+
uv run coverage xml
6353
- name: Upload coverage reports to Codecov
6454
uses: codecov/codecov-action@v3
6555
env:

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.11

poetry.lock

Lines changed: 0 additions & 5725 deletions
This file was deleted.

pyproject.toml

Lines changed: 56 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,65 +1,52 @@
1-
[tool.poetry]
1+
[project]
22
name = "zndraw"
3-
version = "0.5.8"
3+
version = "0.5.8a1"
44
description = "Display and Edit Molecular Structures and Trajectories in the Browser."
5-
authors = ["zincwarecode <[email protected]>"]
6-
license = "License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)"
5+
authors = [
6+
{ name = "Fabian Zills", email = "[email protected]" },
7+
]
8+
classifiers = ["License :: OSI Approved :: Eclipse Public License 2.0 (EPL-2.0)"]
79
readme = "README.md"
8-
include = ["zndraw/templates/**/*", "zndraw_app/**/*"]
9-
10-
[tool.poetry.dependencies]
11-
python = "^3.10"
12-
ase = "^3"
13-
typer = {extras = ["all"], version = "^0.13"}
14-
flask = "^3"
15-
tqdm = "^4"
16-
flask-socketio = "^5"
17-
networkx = "^3"
18-
pydantic = "^2"
19-
python-socketio = {extras = ["client"], version = "^5.11"}
20-
plotly = "^5"
21-
pandas = "^2"
22-
celery = "^5"
23-
sqlalchemy = "^2"
24-
redis = "^5"
25-
splines = "^0.3"
26-
znsocket = "^0.2.7"
27-
znjson = "^0.2.4"
28-
eventlet = "^0.38"
29-
30-
31-
[tool.poetry.group.dev.dependencies]
32-
eventlet = "^0"
33-
pre-commit = "^3"
34-
pytest = "^7"
35-
coverage = "^7"
36-
ruff = "^0.1"
37-
ipykernel = "^6.29.4"
38-
mdanalysis = {version = "^2"}
39-
tidynamics = {version = "^1"}
40-
rdkit2ase = {version = "^0.1"}
41-
zntrack = {version = "^0.8"}
42-
znh5md = {version = "^0.4"}
10+
requires-python = ">=3.10"
11+
dependencies = [
12+
"ase>=3.24.0",
13+
"celery>=5.4.0",
14+
"eventlet>=0.39.0",
15+
"flask>=3.1.0",
16+
"flask-socketio>=5.5.1",
17+
"networkx>=3.4.2",
18+
"pandas>=2.2.3",
19+
"plotly>=6.0.0",
20+
"pydantic>=2.10.6",
21+
"python-socketio[client]>=5.12.1",
22+
"redis>=5.2.1",
23+
"splines>=0.3.2",
24+
"sqlalchemy>=2.0.38",
25+
"tqdm>=4.67.1",
26+
"typer>=0.15.1",
27+
"znjson>=0.2.6",
28+
"znsocket>=0.2.8",
29+
]
4330

31+
[project.urls]
32+
Repository = "https://github.com/zincware/ZnDraw"
33+
Releases = "https://github.com/zincware/ZnDraw/releases"
34+
Discord = "https://discord.gg/7ncfwhsnm4"
35+
Documentation = "https://zndraw.readthedocs.io/"
4436

4537

38+
[project.scripts]
39+
zndraw = 'zndraw_app.cli:cli'
4640

47-
[tool.poetry.group.docs.dependencies]
48-
sphinx = "^8.1.3"
49-
furo = "^2024.8.6"
50-
nbsphinx = "^0.9.5"
51-
sphinx-copybutton = "^0.5.2"
5241

5342
[build-system]
54-
requires = ["poetry-core"]
55-
build-backend = "poetry.core.masonry.api"
56-
57-
[tool.poetry.scripts]
58-
zndraw = 'zndraw_app.cli:cli'
43+
requires = ["hatchling"]
44+
build-backend = "hatchling.build"
5945

60-
61-
[tool.poetry.urls]
62-
repository = "https://github.com/zincware/ZnDraw"
46+
[tool.hatch.build.targets.sdist]
47+
exclude = [
48+
"/app",
49+
]
6350

6451
[tool.ruff]
6552
line-length = 90
@@ -73,3 +60,20 @@ addopts = "-m 'not chrome'"
7360

7461
[tool.codespell]
7562
skip = "*.svg,*.lock"
63+
64+
[dependency-groups]
65+
dev = [
66+
"coverage>=7.6.10",
67+
"mdanalysis>=2.8.0",
68+
"pytest>=8.3.4",
69+
"rdkit2ase>=0.1.4",
70+
"tidynamics>=1.1.2",
71+
"znh5md>=0.4.4",
72+
"zntrack>=0.8.2",
73+
]
74+
docs = [
75+
"furo>=2024.8.6",
76+
"nbsphinx>=0.9.6",
77+
"sphinx>=8.1.3",
78+
"sphinx-copybutton>=0.5.2",
79+
]

0 commit comments

Comments
 (0)