Skip to content
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

replaced poetry with uv #115

Merged
merged 1 commit into from
Aug 24, 2024
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
20 changes: 20 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
FROM python:3.11-slim

RUN apt-get update

RUN apt-get update && apt-get install -y \
curl \
pkg-config \
gcc \
mariadb-client \
libmariadb-dev-compat \
libmariadb-dev && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN pip install uv

WORKDIR /app

COPY pyproject.toml pyproject.toml
RUN uv sync
4 changes: 4 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
services:
uv-build-test:
build:
context: .
781 changes: 0 additions & 781 deletions poetry.lock

This file was deleted.

43 changes: 21 additions & 22 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,28 +1,27 @@
[tool.poetry]
[project]
name = "spybot2"
version = "0.1.0"
description = ""
authors = ["Benno <[email protected]>", "Justus <[email protected]>"]
license = "MIT"
authors = [
{ name = "Benno", email = "[email protected]" },
{ name = "Justus", email = "[email protected]" },
]
classifiers = ["License :: OSI Approved :: MIT License"]
readme = "README.md"
requires-python = ">=3.11"
dependencies = [
"Django ~=4.2",
"ts3 ~=2.0.0b3",
"django-environ ~=0.11.2",
"mysqlclient ~=2.2",
"django-crontab ~=0.7.1",
"num2words ~=0.5.12",
"requests ~=2.31",
"fido2 ~=1.1",
"user-agents ~=2.2",
"django-bootstrap5 ~=24.2",
]

[tool.poetry.dependencies]
python = "^3.11"
Django = "^4.2.7"
ts3 = "2.0.0b3"
django-environ = "^0.11.2"
mysqlclient = "^2.2.0"
django-crontab = "^0.7.1"
num2words = "^0.5.12"
requests = "^2.31.0"
fido2 = "^1.1.3"
user-agents = "^2.2.0"
django-bootstrap5 = "^24.2"


[tool.poetry.group.test.dependencies]
unittest-xml-reporting = "^3.2.0"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.uv]
dev-dependencies = ["unittest-xml-reporting ~=3.2"]
9 changes: 3 additions & 6 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ cd ..
source venv/bin/activate

# install project python deps
pip install poetry
poetry install

# enter shell with configured poetry environment
poetry shell
pip install uv
uv sync

# copy static files to directory for http server
python manage.py collectstatic --noinput
uv run manage.py collectstatic --noinput

# create django superuser if necessary.
# Set the env vars DJANGO_SUPERUSER_{PASSWORD,USERNAME,EMAIL} when running this script
Expand Down
Loading
Loading