Switch from poetry to uv
This commit is contained in:
@@ -12,23 +12,27 @@ css: common/input.css
|
||||
npx tailwindcss -i ./common/input.css -o ./games/static/base.css
|
||||
|
||||
makemigrations:
|
||||
poetry run python manage.py makemigrations
|
||||
uv run python manage.py makemigrations
|
||||
|
||||
migrate: makemigrations
|
||||
poetry run python manage.py migrate
|
||||
uv run python manage.py migrate
|
||||
|
||||
init:
|
||||
pyenv install -s $(PYTHON_VERSION)
|
||||
pyenv local $(PYTHON_VERSION)
|
||||
pip install poetry
|
||||
poetry install
|
||||
uv install $(PYTHON_VERSION)
|
||||
uv sync
|
||||
npm install
|
||||
$(MAKE) sethookdir
|
||||
$(MAKE) loadplatforms
|
||||
|
||||
sethookdir:
|
||||
git config core.hooksPath .githooks
|
||||
chmod +x .githooks/*
|
||||
|
||||
dev:
|
||||
@npx concurrently \
|
||||
--names "Django,Tailwind" \
|
||||
--prefix-colors "blue,green" \
|
||||
"poetry run python -Wa manage.py runserver" \
|
||||
"uv run python -Wa manage.py runserver" \
|
||||
"npx tailwindcss -i ./common/input.css -o ./games/static/base.css --watch"
|
||||
|
||||
|
||||
@@ -36,37 +40,37 @@ caddy:
|
||||
caddy run --watch
|
||||
|
||||
dev-prod: migrate collectstatic
|
||||
PROD=1 poetry run python -m gunicorn --bind 0.0.0.0:8001 timetracker.asgi:application -k uvicorn.workers.UvicornWorker
|
||||
PROD=1 uv run python -m gunicorn --bind 0.0.0.0:8001 timetracker.asgi:application -k uvicorn.workers.UvicornWorker
|
||||
|
||||
dumpgames:
|
||||
poetry run python manage.py dumpdata --format yaml games --output tracker_fixture.yaml
|
||||
uv run python manage.py dumpdata --format yaml games --output tracker_fixture.yaml
|
||||
|
||||
loadplatforms:
|
||||
poetry run python manage.py loaddata platforms.yaml
|
||||
uv run python manage.py loaddata platforms.yaml
|
||||
|
||||
loadall:
|
||||
poetry run python manage.py loaddata data.yaml
|
||||
uv run python manage.py loaddata data.yaml
|
||||
|
||||
loadsample:
|
||||
poetry run python manage.py loaddata sample.yaml
|
||||
uv run python manage.py loaddata sample.yaml
|
||||
|
||||
createsuperuser:
|
||||
poetry run python manage.py createsuperuser
|
||||
uv run python manage.py createsuperuser
|
||||
|
||||
shell:
|
||||
poetry run python manage.py shell
|
||||
uv run python manage.py shell
|
||||
|
||||
collectstatic:
|
||||
poetry run python manage.py collectstatic --clear --no-input
|
||||
uv run python manage.py collectstatic --clear --no-input
|
||||
|
||||
poetry.lock: pyproject.toml
|
||||
poetry install
|
||||
uv.lock: pyproject.toml
|
||||
uv sync
|
||||
|
||||
test: poetry.lock
|
||||
poetry run pytest
|
||||
test: uv.lock
|
||||
uv run pytest
|
||||
|
||||
date:
|
||||
poetry run python -c 'import datetime; from zoneinfo import ZoneInfo; print(datetime.datetime.isoformat(datetime.datetime.now(ZoneInfo("Europe/Prague")), timespec="minutes", sep=" "))'
|
||||
uv run python -c 'import datetime; from zoneinfo import ZoneInfo; print(datetime.datetime.isoformat(datetime.datetime.now(ZoneInfo("Europe/Prague")), timespec="minutes", sep=" "))'
|
||||
|
||||
cleanstatic:
|
||||
rm -r static/*
|
||||
|
||||
Reference in New Issue
Block a user