Skip to content

Commit 919087c

Browse files
authored
build: ♻️ switch to using uv rather than poetry (#10)
# Description This switches over the project to use uv rather than poetry. <!-- Select quick/in-depth as necessary --> This PR needs an in-depth review.
1 parent 3ab018e commit 919087c

File tree

5 files changed

+32
-35
lines changed

5 files changed

+32
-35
lines changed

.github/sync.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ group:
1111
dest: .gitignore
1212
- source: justfile
1313
dest: justfile
14-
- source: poetry.toml
15-
dest: poetry.toml
1614
- source: .cz.toml
1715
dest: .cz.toml
1816
- source: ruff.toml

.python-version

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

justfile

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ run-all: install-deps format-python check-python check-commits
66

77
# Install Python package dependencies
88
install-deps:
9-
poetry install
9+
uv sync --upgrade --dev
1010

1111
# Check Python code with the linter for any errors that need manual attention
1212
check-python:
13-
poetry run ruff check .
13+
uv run ruff check .
1414

1515
# Reformat Python code to match coding style and general structure
1616
format-python:
17-
poetry run ruff check --fix .
18-
poetry run ruff format .
17+
uv run ruff check --fix .
18+
uv run ruff format .
1919

2020
# Run checks on commits with non-main branches
2121
check-commits:
@@ -24,11 +24,7 @@ check-commits:
2424
number_of_commits=$(git rev-list --count HEAD ^$branch_name)
2525
if [[ ${branch_name} != "main" && ${number_of_commits} -gt 0 ]]
2626
then
27-
poetry run cz check --rev-range main..HEAD
27+
uv run cz check --rev-range main..HEAD
2828
else
2929
echo "Not on main or haven't committed yet."
3030
fi
31-
32-
# Update all dependencies in lockfile
33-
update-deps:
34-
poetry update

poetry.toml

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

pyproject.toml

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,35 @@
1-
[tool.poetry]
2-
name = "NAME"
3-
version = "0.0.1"
4-
description = ""
1+
[project]
2+
name = "template-data-package"
3+
version = "0.1.0"
4+
description = "A template for structuring all the pieces for a data package."
55
authors = [
6-
"Luke W. Johnston <lwjohnst@gmail.com>",
7-
"Kristiane Beicher <kris.beicher@clin.au.dk>",
6+
{name = "Luke W. Johnston", email = "lwjohnst@gmail.com" },
7+
{name = "Kristiane Beicher", email = "kris.beicher@clin.au.dk" },
88
]
99
maintainers = [
10-
"Luke W. Johnston <lwjohnst@gmail.com>",
11-
"Kristiane Beicher <kris.beicher@clin.au.dk>",
10+
{name = "Luke W. Johnston", email = "lwjohnst@gmail.com" },
11+
{name = "Kristiane Beicher", email = "kris.beicher@clin.au.dk" },
1212
]
1313
readme = "README.md"
14-
repository = "https://github.com/seedcase-project/REPO"
1514
license = "MIT"
15+
license-files = ["LICENSE.md"]
16+
requires-python = ">=3.12"
17+
dependencies = [
18+
"polars>=1.27.0",
19+
"pyjanitor>=0.31.0",
20+
"seedcase-sprout",
21+
]
1622

17-
[tool.poetry.urls]
18-
"Bug Tracker" = "https://github.com/seedcase-project/REPO/issues"
19-
20-
[tool.poetry.dependencies]
21-
python = "^3.12"
22-
polars = "^1.24.0"
23-
pyjanitor = "^0.30.0"
24-
seedcase-sprout = {git = "https://github.com/seedcase-project/seedcase-sprout.git"}
23+
[project.urls]
24+
issues = "https://github.com/seedcase-project/REPO/issues"
25+
repository = "https://github.com/seedcase-project/REPO"
2526

26-
[tool.poetry.group.dev.dependencies]
27-
ruff = "^0.6.2"
27+
[dependency-groups]
28+
dev = [
29+
"commitizen>=4.5.1",
30+
"pre-commit>=4.2.0",
31+
"ruff>=0.11.4",
32+
]
2833

29-
[build-system]
30-
requires = ["poetry-core"]
31-
build-backend = "poetry.core.masonry.api"
34+
[tool.uv.sources]
35+
seedcase-sprout = { git = "https://github.com/seedcase-project/seedcase-sprout" }

0 commit comments

Comments
 (0)