Compare commits

..

No commits in common. "2d3b62bf24d68084c36e20952d2a6f41de6d9f20" and "dd55fe6d9c470a2f8e48044f88ba04fffcaf2f9b" have entirely different histories.

17 changed files with 43 additions and 55 deletions

View file

@ -38,7 +38,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v4
with:
python-version: '3.12'

View file

@ -18,7 +18,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: pip

View file

@ -21,7 +21,7 @@ jobs:
with:
ref: master
- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v4
with:
python-version: '3.12'
cache: pip

View file

@ -40,7 +40,7 @@ repos:
hooks:
- id: djhtml
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.14
rev: v0.1.9
hooks:
- id: ruff
args: [--fix]
@ -56,10 +56,10 @@ repos:
args: [--fix]
types_or: [javascript, css]
additional_dependencies:
- eslint@8.56.0
- eslint@8.36.0
- eslint-config-prettier@8.5.0
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.6.0
rev: 1.5.3
hooks:
- id: pyproject-fmt
- repo: https://github.com/jazzband/pip-tools

View file

@ -1,7 +1,7 @@
##############################################
# write git info
##############################################
FROM alpine/git:2.43.0 AS git
FROM alpine/git:2.40.1 AS git
WORKDIR /app
COPY .git /app/.git/
@ -14,7 +14,7 @@ RUN date +'%Y-%m-%d %H:%M %Z' > /build-date
##############################################
# Main image
##############################################
FROM python:3.12.1-slim-bullseye AS final
FROM python:3.12.0-slim-bullseye AS final
ARG DEBIAN_FRONTEND=noninteractive
ARG PIP_DISABLE_PIP_VERSION_CHECK=1

View file

@ -10,7 +10,7 @@ inv sync-dependencies
pre-commit install --install-hooks
inv test
./src/manage.py migrate
./src/manage.py generate_dummy_baskets
./src/manage.py generat_dummy_baskets
./src/manage.py createsuperuser
```

View file

@ -22,7 +22,7 @@ cryptography==41.0.7
# via django-anymail
cycler==0.12.1
# via matplotlib
django==5.0.1
django==4.2.8
# via
# -r requirements.in
# crispy-bootstrap5
@ -50,9 +50,9 @@ django-extensions==3.2.3
# via -r requirements.in
django-htmx==1.17.2
# via -r requirements.in
django-solo==2.2.0
django-solo==2.1.0
# via -r requirements.in
fonttools==4.47.2
fonttools==4.47.0
# via matplotlib
freezegun==1.4.0
# via -r requirements.in
@ -64,7 +64,7 @@ kiwisolver==1.4.5
# via matplotlib
matplotlib==3.8.2
# via -r requirements.in
numpy==1.26.3
numpy==1.26.2
# via
# contourpy
# matplotlib
@ -72,7 +72,7 @@ packaging==23.2
# via
# gunicorn
# matplotlib
pillow==10.2.0
pillow==10.1.0
# via
# -r requirements.in
# matplotlib

View file

@ -4,11 +4,16 @@ pytest>=6.0
pytest-cov>=3.0.0
pytest-django>=4.5.0
pytest-selenium>=4.0.0
# pytest-selenium 4.0.1 has an implicit dependency on `py`
py>=1.11.0
pre-commit>=2.7
model-bakery>=1.1
invoke>=2.0.0
factory-boy>=3.2.1
selenium>=4.4.3
# pytest-selenium is broken with selenium 4.10.0
# TypeError: WebDriver.__init__() got an unexpected keyword argument 'service_log_path'
# https://github.com/robotframework/SeleniumLibrary/issues/1835
selenium>=4.4.3,<4.10.0
black>=22.12.0
pip-tools>=6.0
ruff>=0.0.237

View file

@ -8,7 +8,7 @@ asgiref==3.7.2
# via
# -c constraints.txt
# django
attrs==23.2.0
attrs==23.1.0
# via
# outcome
# trio
@ -31,19 +31,19 @@ click==8.1.7
# via
# black
# pip-tools
coverage[toml]==7.4.0
coverage[toml]==7.3.4
# via
# coverage
# pytest-cov
distlib==0.3.8
# via virtualenv
django==5.0.1
django==4.2.8
# via
# -c constraints.txt
# model-bakery
factory-boy==3.3.0
# via -r requirements-dev.in
faker==22.4.0
faker==21.0.0
# via factory-boy
filelock==3.13.1
# via virtualenv
@ -60,9 +60,9 @@ iniconfig==2.0.0
# via pytest
invoke==2.2.0
# via -r requirements-dev.in
jinja2==3.1.3
jinja2==3.1.2
# via pytest-html
markupsafe==2.1.4
markupsafe==2.1.3
# via jinja2
model-bakery==1.17.0
# via -r requirements-dev.in
@ -90,11 +90,13 @@ pluggy==1.3.0
# via pytest
pre-commit==3.6.0
# via -r requirements-dev.in
py==1.11.0
# via -r requirements-dev.in
pyproject-hooks==1.0.0
# via build
pysocks==1.7.1
# via urllib3
pytest==7.4.4
pytest==7.4.3
# via
# -r requirements-dev.in
# pytest-base-url
@ -114,7 +116,7 @@ pytest-html==4.1.1
# via pytest-selenium
pytest-metadata==3.0.0
# via pytest-html
pytest-selenium==4.0.2
pytest-selenium==4.0.1
# via -r requirements-dev.in
pytest-variables==3.0.0
# via pytest-selenium
@ -129,9 +131,9 @@ requests==2.31.0
# -c constraints.txt
# pytest-base-url
# pytest-selenium
ruff==0.1.14
ruff==0.1.9
# via -r requirements-dev.in
selenium==4.16.0
selenium==4.9.1
# via
# -r requirements-dev.in
# pytest-selenium
@ -149,7 +151,7 @@ sqlparse==0.4.4
# django
tenacity==8.2.3
# via pytest-selenium
trio==0.24.0
trio==0.23.2
# via
# selenium
# trio-websocket

View file

@ -1,4 +1,4 @@
django>=4.1
django>=4.1,<5.0
django-anymail[mailgun]>=8.6
django-cleanup>=6.0
whitenoise>=6.2

View file

@ -22,7 +22,7 @@ cryptography==41.0.7
# via django-anymail
cycler==0.12.1
# via matplotlib
django==5.0.1
django==4.2.8
# via
# -r requirements.in
# crispy-bootstrap5
@ -50,9 +50,9 @@ django-extensions==3.2.3
# via -r requirements.in
django-htmx==1.17.2
# via -r requirements.in
django-solo==2.2.0
django-solo==2.1.0
# via -r requirements.in
fonttools==4.47.2
fonttools==4.47.0
# via matplotlib
freezegun==1.4.0
# via -r requirements.in
@ -64,7 +64,7 @@ kiwisolver==1.4.5
# via matplotlib
matplotlib==3.8.2
# via -r requirements.in
numpy==1.26.3
numpy==1.26.2
# via
# contourpy
# matplotlib
@ -72,7 +72,7 @@ packaging==23.2
# via
# gunicorn
# matplotlib
pillow==10.2.0
pillow==10.1.0
# via
# -r requirements.in
# matplotlib

View file

@ -11,7 +11,7 @@ from purchase.models import (
class Command(BaseCommand):
help = "Clear all data"
help = "Clear all data" # noqa: A003
def handle(self, *args, **options): # noqa: ARG002
self.delete(BasketItem)

View file

@ -11,7 +11,7 @@ from purchase.models import Basket, BasketItem, Cache, PaymentMethod, Product
class Command(BaseCommand):
help = "Generates dummy baskets"
help = "Generates dummy baskets" # noqa: A003
def handle(self, *args, **options): # noqa: ARG002
call_command("loaddata", ["payment_methods", "products"])

View file

@ -4,7 +4,7 @@ from purchase.models import Cache
class Command(BaseCommand):
help = "Refresh cache"
help = "Refresh cache" # noqa: A003
def handle(self, *args, **options): # noqa: ARG002
Cache.get_solo().refresh()

View file

@ -1,19 +0,0 @@
# Generated by Django 4.2.8 on 2024-01-20 08:15
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
("purchase", "0018_product_category"),
]
operations = [
migrations.AlterModelOptions(
name="productcategory",
options={
"verbose_name": "product category",
"verbose_name_plural": "product categories",
},
),
]

View file

@ -203,7 +203,7 @@ class BasketItemQuerySet(models.QuerySet):
return self.annotate(price=Coalesce(F("quantity") * F("unit_price_cents"), 0))
class BasketItem(Model): # noqa: DJ008
class BasketItem(Model):
product = models.ForeignKey(
to=Product,
on_delete=models.PROTECT,