Compare commits

..

1 commit

Author SHA1 Message Date
Crocmagnon
9c97406f98 Update dependencies 2024-01-15 18:04:42 +00:00
17 changed files with 30 additions and 42 deletions

View file

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

View file

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

View file

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

View file

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

View file

@ -1,7 +1,7 @@
############################################## ##############################################
# write git info # write git info
############################################## ##############################################
FROM alpine/git:2.43.0 AS git FROM alpine/git:2.40.1 AS git
WORKDIR /app WORKDIR /app
COPY .git /app/.git/ COPY .git /app/.git/
@ -14,7 +14,7 @@ RUN date +'%Y-%m-%d %H:%M %Z' > /build-date
############################################## ##############################################
# Main image # 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 DEBIAN_FRONTEND=noninteractive
ARG PIP_DISABLE_PIP_VERSION_CHECK=1 ARG PIP_DISABLE_PIP_VERSION_CHECK=1

View file

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

View file

@ -22,7 +22,7 @@ cryptography==41.0.7
# via django-anymail # via django-anymail
cycler==0.12.1 cycler==0.12.1
# via matplotlib # via matplotlib
django==5.0.1 django==4.2.9
# via # via
# -r requirements.in # -r requirements.in
# crispy-bootstrap5 # crispy-bootstrap5

View file

@ -4,11 +4,16 @@ pytest>=6.0
pytest-cov>=3.0.0 pytest-cov>=3.0.0
pytest-django>=4.5.0 pytest-django>=4.5.0
pytest-selenium>=4.0.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 pre-commit>=2.7
model-bakery>=1.1 model-bakery>=1.1
invoke>=2.0.0 invoke>=2.0.0
factory-boy>=3.2.1 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 black>=22.12.0
pip-tools>=6.0 pip-tools>=6.0
ruff>=0.0.237 ruff>=0.0.237

View file

@ -37,13 +37,13 @@ coverage[toml]==7.4.0
# pytest-cov # pytest-cov
distlib==0.3.8 distlib==0.3.8
# via virtualenv # via virtualenv
django==5.0.1 django==4.2.9
# via # via
# -c constraints.txt # -c constraints.txt
# model-bakery # model-bakery
factory-boy==3.3.0 factory-boy==3.3.0
# via -r requirements-dev.in # via -r requirements-dev.in
faker==22.5.0 faker==22.2.0
# via factory-boy # via factory-boy
filelock==3.13.1 filelock==3.13.1
# via virtualenv # via virtualenv
@ -62,7 +62,7 @@ invoke==2.2.0
# via -r requirements-dev.in # via -r requirements-dev.in
jinja2==3.1.3 jinja2==3.1.3
# via pytest-html # via pytest-html
markupsafe==2.1.4 markupsafe==2.1.3
# via jinja2 # via jinja2
model-bakery==1.17.0 model-bakery==1.17.0
# via -r requirements-dev.in # via -r requirements-dev.in
@ -90,6 +90,8 @@ pluggy==1.3.0
# via pytest # via pytest
pre-commit==3.6.0 pre-commit==3.6.0
# via -r requirements-dev.in # via -r requirements-dev.in
py==1.11.0
# via -r requirements-dev.in
pyproject-hooks==1.0.0 pyproject-hooks==1.0.0
# via build # via build
pysocks==1.7.1 pysocks==1.7.1
@ -114,7 +116,7 @@ pytest-html==4.1.1
# via pytest-selenium # via pytest-selenium
pytest-metadata==3.0.0 pytest-metadata==3.0.0
# via pytest-html # via pytest-html
pytest-selenium==4.0.2 pytest-selenium==4.0.1
# via -r requirements-dev.in # via -r requirements-dev.in
pytest-variables==3.0.0 pytest-variables==3.0.0
# via pytest-selenium # via pytest-selenium
@ -129,9 +131,9 @@ requests==2.31.0
# -c constraints.txt # -c constraints.txt
# pytest-base-url # pytest-base-url
# pytest-selenium # pytest-selenium
ruff==0.1.14 ruff==0.1.13
# via -r requirements-dev.in # via -r requirements-dev.in
selenium==4.16.0 selenium==4.9.1
# via # via
# -r requirements-dev.in # -r requirements-dev.in
# pytest-selenium # pytest-selenium

View file

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

View file

@ -22,7 +22,7 @@ cryptography==41.0.7
# via django-anymail # via django-anymail
cycler==0.12.1 cycler==0.12.1
# via matplotlib # via matplotlib
django==5.0.1 django==4.2.9
# via # via
# -r requirements.in # -r requirements.in
# crispy-bootstrap5 # crispy-bootstrap5

View file

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

View file

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

View file

@ -4,7 +4,7 @@ from purchase.models import Cache
class Command(BaseCommand): class Command(BaseCommand):
help = "Refresh cache" help = "Refresh cache" # noqa: A003
def handle(self, *args, **options): # noqa: ARG002 def handle(self, *args, **options): # noqa: ARG002
Cache.get_solo().refresh() 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)) return self.annotate(price=Coalesce(F("quantity") * F("unit_price_cents"), 0))
class BasketItem(Model): # noqa: DJ008 class BasketItem(Model):
product = models.ForeignKey( product = models.ForeignKey(
to=Product, to=Product,
on_delete=models.PROTECT, on_delete=models.PROTECT,