Compare commits

...

13 commits

Author SHA1 Message Date
2d3b62bf24 update pre-commit 2024-01-20 09:42:54 +01:00
53753c7c7d fix deps 2024-01-20 09:37:33 +01:00
dd83367d84
Merge pull request #95 from Crocmagnon/dependabot/github_actions/actions/setup-python-5
Bump actions/setup-python from 4 to 5
2024-01-20 09:35:05 +01:00
597a65e933
Merge pull request #96 from Crocmagnon/dependabot/docker/python-3.12.1-slim-bullseye
Bump python from 3.12.0-slim-bullseye to 3.12.1-slim-bullseye
2024-01-20 09:34:57 +01:00
3e27ecb966
Merge pull request #97 from Crocmagnon/dependabot/docker/alpine/git-2.43.0
Bump alpine/git from 2.40.1 to 2.43.0
2024-01-20 09:34:45 +01:00
52a9094fea update dependencies 2024-01-20 09:33:42 +01:00
9706c3e9be ignore ruff check 2024-01-20 09:20:22 +01:00
9076d27ffc fix readme typo 2024-01-20 09:16:53 +01:00
19076b03ba add missing migration 2024-01-20 09:16:18 +01:00
16eaf4cb56 rename rtx to mise 2024-01-20 08:44:22 +01:00
dependabot[bot]
002c4617ce
Bump alpine/git from 2.40.1 to 2.43.0
Bumps alpine/git from 2.40.1 to 2.43.0.

---
updated-dependencies:
- dependency-name: alpine/git
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 18:36:21 +00:00
dependabot[bot]
4e6d264454
Bump python from 3.12.0-slim-bullseye to 3.12.1-slim-bullseye
Bumps python from 3.12.0-slim-bullseye to 3.12.1-slim-bullseye.

---
updated-dependencies:
- dependency-name: python
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 18:36:20 +00:00
dependabot[bot]
a45e4aced6
Bump actions/setup-python from 4 to 5
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5.
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-12-11 18:10:13 +00:00
17 changed files with 55 additions and 43 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@v4 uses: actions/setup-python@v5
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@v4 uses: actions/setup-python@v5
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@v4 uses: actions/setup-python@v5
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.9 rev: v0.1.14
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.36.0 - eslint@8.56.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.5.3 rev: 1.6.0
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.40.1 AS git FROM alpine/git:2.43.0 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.0-slim-bullseye AS final FROM python:3.12.1-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 generat_dummy_baskets ./src/manage.py generate_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==4.2.8 django==5.0.1
# via # via
# -r requirements.in # -r requirements.in
# crispy-bootstrap5 # crispy-bootstrap5
@ -50,9 +50,9 @@ django-extensions==3.2.3
# via -r requirements.in # via -r requirements.in
django-htmx==1.17.2 django-htmx==1.17.2
# via -r requirements.in # via -r requirements.in
django-solo==2.1.0 django-solo==2.2.0
# via -r requirements.in # via -r requirements.in
fonttools==4.47.0 fonttools==4.47.2
# via matplotlib # via matplotlib
freezegun==1.4.0 freezegun==1.4.0
# via -r requirements.in # via -r requirements.in
@ -64,7 +64,7 @@ kiwisolver==1.4.5
# via matplotlib # via matplotlib
matplotlib==3.8.2 matplotlib==3.8.2
# via -r requirements.in # via -r requirements.in
numpy==1.26.2 numpy==1.26.3
# via # via
# contourpy # contourpy
# matplotlib # matplotlib
@ -72,7 +72,7 @@ packaging==23.2
# via # via
# gunicorn # gunicorn
# matplotlib # matplotlib
pillow==10.1.0 pillow==10.2.0
# via # via
# -r requirements.in # -r requirements.in
# matplotlib # matplotlib

View file

@ -4,16 +4,11 @@ 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
# pytest-selenium is broken with selenium 4.10.0 selenium>=4.4.3
# 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

@ -8,7 +8,7 @@ asgiref==3.7.2
# via # via
# -c constraints.txt # -c constraints.txt
# django # django
attrs==23.1.0 attrs==23.2.0
# via # via
# outcome # outcome
# trio # trio
@ -31,19 +31,19 @@ click==8.1.7
# via # via
# black # black
# pip-tools # pip-tools
coverage[toml]==7.3.4 coverage[toml]==7.4.0
# via # via
# coverage # coverage
# pytest-cov # pytest-cov
distlib==0.3.8 distlib==0.3.8
# via virtualenv # via virtualenv
django==4.2.8 django==5.0.1
# 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==21.0.0 faker==22.4.0
# via factory-boy # via factory-boy
filelock==3.13.1 filelock==3.13.1
# via virtualenv # via virtualenv
@ -60,9 +60,9 @@ iniconfig==2.0.0
# via pytest # via pytest
invoke==2.2.0 invoke==2.2.0
# via -r requirements-dev.in # via -r requirements-dev.in
jinja2==3.1.2 jinja2==3.1.3
# via pytest-html # via pytest-html
markupsafe==2.1.3 markupsafe==2.1.4
# 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,13 +90,11 @@ 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
# via urllib3 # via urllib3
pytest==7.4.3 pytest==7.4.4
# via # via
# -r requirements-dev.in # -r requirements-dev.in
# pytest-base-url # pytest-base-url
@ -116,7 +114,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.1 pytest-selenium==4.0.2
# 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
@ -131,9 +129,9 @@ requests==2.31.0
# -c constraints.txt # -c constraints.txt
# pytest-base-url # pytest-base-url
# pytest-selenium # pytest-selenium
ruff==0.1.9 ruff==0.1.14
# via -r requirements-dev.in # via -r requirements-dev.in
selenium==4.9.1 selenium==4.16.0
# via # via
# -r requirements-dev.in # -r requirements-dev.in
# pytest-selenium # pytest-selenium
@ -151,7 +149,7 @@ sqlparse==0.4.4
# django # django
tenacity==8.2.3 tenacity==8.2.3
# via pytest-selenium # via pytest-selenium
trio==0.23.2 trio==0.24.0
# via # via
# selenium # selenium
# trio-websocket # trio-websocket

View file

@ -1,4 +1,4 @@
django>=4.1,<5.0 django>=4.1
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==4.2.8 django==5.0.1
# via # via
# -r requirements.in # -r requirements.in
# crispy-bootstrap5 # crispy-bootstrap5
@ -50,9 +50,9 @@ django-extensions==3.2.3
# via -r requirements.in # via -r requirements.in
django-htmx==1.17.2 django-htmx==1.17.2
# via -r requirements.in # via -r requirements.in
django-solo==2.1.0 django-solo==2.2.0
# via -r requirements.in # via -r requirements.in
fonttools==4.47.0 fonttools==4.47.2
# via matplotlib # via matplotlib
freezegun==1.4.0 freezegun==1.4.0
# via -r requirements.in # via -r requirements.in
@ -64,7 +64,7 @@ kiwisolver==1.4.5
# via matplotlib # via matplotlib
matplotlib==3.8.2 matplotlib==3.8.2
# via -r requirements.in # via -r requirements.in
numpy==1.26.2 numpy==1.26.3
# via # via
# contourpy # contourpy
# matplotlib # matplotlib
@ -72,7 +72,7 @@ packaging==23.2
# via # via
# gunicorn # gunicorn
# matplotlib # matplotlib
pillow==10.1.0 pillow==10.2.0
# via # via
# -r requirements.in # -r requirements.in
# matplotlib # matplotlib

View file

@ -11,7 +11,7 @@ from purchase.models import (
class Command(BaseCommand): class Command(BaseCommand):
help = "Clear all data" # noqa: A003 help = "Clear all data"
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" # noqa: A003 help = "Generates dummy baskets"
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" # noqa: A003 help = "Refresh cache"
def handle(self, *args, **options): # noqa: ARG002 def handle(self, *args, **options): # noqa: ARG002
Cache.get_solo().refresh() Cache.get_solo().refresh()

View file

@ -0,0 +1,19 @@
# 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): class BasketItem(Model): # noqa: DJ008
product = models.ForeignKey( product = models.ForeignKey(
to=Product, to=Product,
on_delete=models.PROTECT, on_delete=models.PROTECT,