Update requirements compilation to use hatch-pip-compile.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Víðir Valberg Guðmundsson 2024-07-31 23:26:40 +02:00
parent f6d8f82065
commit 7a3a629d6f
4 changed files with 46 additions and 35 deletions

View file

@ -72,3 +72,13 @@ hatch run dev:migrate
```bash ```bash
hatch run dev:server hatch run dev:server
``` ```
#### Updating requirements
If you want to update the requirements, you can run the following command:
```bash
hatch run requirements
```
This uses [hatch-pip-compile](https://juftin.com/hatch-pip-compile/) to update the requirements.

View file

@ -62,11 +62,11 @@ matrix.python.dependencies = [
{ value = "typing_extensions==4.5.0", if = ["3.10"]}, { value = "typing_extensions==4.5.0", if = ["3.10"]},
] ]
[tool.hatch.envs.dev.scripts] [tool.hatch.envs.default.scripts]
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --cov=tests --cov=append {args}" cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=src --cov=tests --cov=append {args}"
no-cov = "cov --no-cov {args}" no-cov = "cov --no-cov {args}"
typecheck = "mypy --config-file=pyproject.toml ." typecheck = "mypy --config-file=pyproject.toml ."
requirements = "pip-compile pyproject.toml" requirements = "hatch env run --env default -- python --version; hatch env run --env dev -- python --version"
server = "./src/manage.py runserver 0.0.0.0:8000" server = "./src/manage.py runserver 0.0.0.0:8000"
migrate = "./src/manage.py migrate" migrate = "./src/manage.py migrate"
makemigrations = "./src/manage.py makemigrations" makemigrations = "./src/manage.py makemigrations"

View file

@ -1,9 +1,19 @@
# #
# This file is autogenerated by pip-compile with Python 3.12 # This file is autogenerated by hatch-pip-compile with Python 3.12
# by the following command:
# #
# pip-compile pyproject.toml # - django-allauth~=0.63
# - django-money~=3.5
# - django-oauth-toolkit~=2.4
# - django-registries==0.0.3
# - django-view-decorator==0.0.4
# - django-zen-queries~=2.1
# - django~=5.0
# - environs[django]<12,>=11
# - psycopg[binary]~=3.2
# - uvicorn~=0.30
# - whitenoise~=6.7
# #
asgiref==3.8.1 asgiref==3.8.1
# via django # via django
babel==2.15.0 babel==2.15.0
@ -16,7 +26,7 @@ charset-normalizer==3.3.2
# via requests # via requests
click==8.1.7 click==8.1.7
# via uvicorn # via uvicorn
cryptography==42.0.8 cryptography==43.0.0
# via jwcrypto # via jwcrypto
dj-database-url==2.2.0 dj-database-url==2.2.0
# via environs # via environs
@ -24,6 +34,7 @@ dj-email-url==1.0.6
# via environs # via environs
django==5.0.7 django==5.0.7
# via # via
# hatch.envs.default
# dj-database-url # dj-database-url
# django-allauth # django-allauth
# django-money # django-money
@ -31,25 +42,22 @@ django==5.0.7
# django-registries # django-registries
# django-view-decorator # django-view-decorator
# django-zen-queries # django-zen-queries
# membersystem (pyproject.toml)
django-allauth==0.63.6 django-allauth==0.63.6
# via membersystem (pyproject.toml) # via hatch.envs.default
django-cache-url==3.4.5 django-cache-url==3.4.5
# via environs # via environs
django-money==3.5.2 django-money==3.5.2
# via membersystem (pyproject.toml) # via hatch.envs.default
django-oauth-toolkit==2.4.0 django-oauth-toolkit==2.4.0
# via membersystem (pyproject.toml) # via hatch.envs.default
django-registries==0.0.3 django-registries==0.0.3
# via membersystem (pyproject.toml) # via hatch.envs.default
django-view-decorator==0.0.4 django-view-decorator==0.0.4
# via membersystem (pyproject.toml) # via hatch.envs.default
django-zen-queries==2.1.0 django-zen-queries==2.1.0
# via membersystem (pyproject.toml) # via hatch.envs.default
environs[django]==11.0.0 environs==11.0.0
# via # via hatch.envs.default
# environs
# membersystem (pyproject.toml)
h11==0.14.0 h11==0.14.0
# via uvicorn # via uvicorn
idna==3.7 idna==3.7
@ -62,10 +70,8 @@ oauthlib==3.2.2
# via django-oauth-toolkit # via django-oauth-toolkit
packaging==24.1 packaging==24.1
# via marshmallow # via marshmallow
psycopg[binary]==3.2.1 psycopg==3.2.1
# via # via hatch.envs.default
# membersystem (pyproject.toml)
# psycopg
psycopg-binary==3.2.1 psycopg-binary==3.2.1
# via psycopg # via psycopg
py-moneyed==3.0 py-moneyed==3.0
@ -88,10 +94,10 @@ typing-extensions==4.12.2
# py-moneyed # py-moneyed
urllib3==2.2.2 urllib3==2.2.2
# via requests # via requests
uvicorn==0.30.1 uvicorn==0.30.3
# via membersystem (pyproject.toml) # via hatch.envs.default
whitenoise==6.7.0 whitenoise==6.7.0
# via membersystem (pyproject.toml) # via hatch.envs.default
# The following packages are considered to be unsafe in a requirements file: # The following packages are considered to be unsafe in a requirements file:
# setuptools # setuptools

View file

@ -45,9 +45,8 @@ click==8.1.7
coverage==7.3.0 coverage==7.3.0
# via # via
# hatch.envs.dev # hatch.envs.dev
# coverage
# pytest-cov # pytest-cov
cryptography==42.0.8 cryptography==43.0.0
# via jwcrypto # via jwcrypto
dj-database-url==2.2.0 dj-database-url==2.2.0
# via environs # via environs
@ -84,16 +83,14 @@ django-registries==0.0.3
# via hatch.envs.dev # via hatch.envs.dev
django-stubs==1.16.0 django-stubs==1.16.0
# via hatch.envs.dev # via hatch.envs.dev
django-stubs-ext==5.0.2 django-stubs-ext==5.0.4
# via django-stubs # via django-stubs
django-view-decorator==0.0.4 django-view-decorator==0.0.4
# via hatch.envs.dev # via hatch.envs.dev
django-zen-queries==2.1.0 django-zen-queries==2.1.0
# via hatch.envs.dev # via hatch.envs.dev
environs==11.0.0 environs==11.0.0
# via # via hatch.envs.dev
# hatch.envs.dev
# environs
h11==0.14.0 h11==0.14.0
# via uvicorn # via uvicorn
idna==3.7 idna==3.7
@ -124,9 +121,7 @@ pip-tools==7.3.0
pluggy==1.5.0 pluggy==1.5.0
# via pytest # via pytest
psycopg==3.2.1 psycopg==3.2.1
# via # via hatch.envs.dev
# hatch.envs.dev
# psycopg
psycopg-binary==3.2.1 psycopg-binary==3.2.1
# via psycopg # via psycopg
py-moneyed==3.0 py-moneyed==3.0
@ -158,7 +153,7 @@ tomli==2.0.1
# via django-stubs # via django-stubs
types-pytz==2024.1.0.20240417 types-pytz==2024.1.0.20240417
# via django-stubs # via django-stubs
types-pyyaml==6.0.12.20240311 types-pyyaml==6.0.12.20240724
# via django-stubs # via django-stubs
typing-extensions==4.12.2 typing-extensions==4.12.2
# via # via
@ -171,7 +166,7 @@ typing-extensions==4.12.2
# py-moneyed # py-moneyed
urllib3==2.2.2 urllib3==2.2.2
# via requests # via requests
uvicorn==0.30.1 uvicorn==0.30.3
# via hatch.envs.dev # via hatch.envs.dev
wheel==0.43.0 wheel==0.43.0
# via pip-tools # via pip-tools