Skip to content

Replace poetry with uv #35084

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"version": "lts"
},
"ghcr.io/devcontainers/features/git-lfs:1.2.2": {},
"ghcr.io/devcontainers-extra/features/poetry:2": {},
"ghcr.io/jsburckhardt/devcontainer-features/uv:1": {},
"ghcr.io/devcontainers/features/python:1": {
"version": "3.12"
},
Expand Down
2 changes: 1 addition & 1 deletion .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ modifies/dependencies:
- "package.json"
- "package-lock.json"
- "pyproject.toml"
- "poetry.lock"
- "uv.lock"
- "go.mod"
- "go.sum"

Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/files-changed.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ jobs:
- "tools/lint-templates-*.js"
- "templates/**/*.tmpl"
- "pyproject.toml"
- "poetry.lock"
- "uv.lock"

docker:
- "Dockerfile"
Expand All @@ -98,4 +98,3 @@ jobs:
- "**/*.yaml"
- ".yamllint.yaml"
- "pyproject.toml"
- "poetry.lock"
4 changes: 2 additions & 2 deletions .github/workflows/pull-compliance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
node-version: 24
cache: npm
cache-dependency-path: package-lock.json
- run: pip install poetry
- run: pip install uv
- run: make deps-py
- run: make deps-frontend
- run: make lint-templates
Expand All @@ -54,7 +54,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- run: pip install poetry
- run: pip install uv
- run: make deps-py
- run: make lint-yaml

Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -393,11 +393,11 @@ lint-actions: ## lint action workflow files
.PHONY: lint-templates
lint-templates: .venv node_modules ## lint template files
@node tools/lint-templates-svg.js
@poetry run djlint $(shell find templates -type f -iname '*.tmpl')
@uv run djlint $(shell find templates -type f -iname '*.tmpl')

.PHONY: lint-yaml
lint-yaml: .venv ## lint yaml files
@poetry run yamllint -s .
@uv run yamllint -s .

.PHONY: watch
watch: ## watch everything and continuously rebuild
Expand Down Expand Up @@ -829,8 +829,8 @@ node_modules: package-lock.json
npm install --no-save
@touch node_modules

.venv: poetry.lock
poetry install
.venv: uv.lock
uv sync
@touch .venv

.PHONY: update
Expand All @@ -848,8 +848,8 @@ update-js: node-check | node_modules ## update js dependencies
.PHONY: update-py
update-py: node-check | node_modules ## update py dependencies
npx updates -u -f pyproject.toml
rm -rf .venv poetry.lock
poetry install
rm -rf .venv uv.lock
uv sync
@touch .venv

.PHONY: webpack
Expand Down
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

# linting
python312
poetry
uv

# backend
go_1_24
Expand Down
426 changes: 0 additions & 426 deletions poetry.lock

This file was deleted.

17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
[tool.poetry]
package-mode = false
[project]
name = "gitea"
version = "0.0.0"
requires-python = ">=3.10"

[tool.poetry.dependencies]
python = "^3.10"

[tool.poetry.group.dev.dependencies]
djlint = "1.36.4"
yamllint = "1.37.1"
[dependency-groups]
dev = [
"djlint==1.36.4",
"yamllint==1.37.1",
]

[tool.djlint]
profile="golang"
Expand Down
330 changes: 330 additions & 0 deletions uv.lock

Large diffs are not rendered by default.