Compare commits

..

14 commits

Author SHA1 Message Date
Crocmagnon
15f5bcb915 Update dependencies 2024-01-22 18:05:00 +00:00
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 42 additions and 30 deletions

View file

@ -38,7 +38,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
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@v4
uses: actions/setup-python@v5
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@v4
uses: actions/setup-python@v5
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.9
rev: v0.1.14
hooks:
- id: ruff
args: [--fix]
@ -56,10 +56,10 @@ repos:
args: [--fix]
types_or: [javascript, css]
additional_dependencies:
- eslint@8.36.0
- eslint@8.56.0
- eslint-config-prettier@8.5.0
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.5.3
rev: 1.6.0
hooks:
- id: pyproject-fmt
- repo: https://github.com/jazzband/pip-tools

View file

@ -1,7 +1,7 @@
##############################################
# write git info
##############################################
FROM alpine/git:2.40.1 AS git
FROM alpine/git:2.43.0 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.0-slim-bullseye AS final
FROM python:3.12.1-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 generat_dummy_baskets
./src/manage.py generate_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==4.2.9
django==5.0.1
# via
# -r requirements.in
# crispy-bootstrap5

View file

@ -4,16 +4,11 @@ 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
# 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
selenium>=4.4.3
black>=22.12.0
pip-tools>=6.0
ruff>=0.0.237

View file

@ -37,13 +37,13 @@ coverage[toml]==7.4.0
# pytest-cov
distlib==0.3.8
# via virtualenv
django==4.2.9
django==5.0.1
# via
# -c constraints.txt
# model-bakery
factory-boy==3.3.0
# via -r requirements-dev.in
faker==22.2.0
faker==22.5.0
# via factory-boy
filelock==3.13.1
# via virtualenv
@ -62,7 +62,7 @@ invoke==2.2.0
# via -r requirements-dev.in
jinja2==3.1.3
# via pytest-html
markupsafe==2.1.3
markupsafe==2.1.4
# via jinja2
model-bakery==1.17.0
# via -r requirements-dev.in
@ -90,8 +90,6 @@ 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
@ -116,7 +114,7 @@ pytest-html==4.1.1
# via pytest-selenium
pytest-metadata==3.0.0
# via pytest-html
pytest-selenium==4.0.1
pytest-selenium==4.0.2
# via -r requirements-dev.in
pytest-variables==3.0.0
# via pytest-selenium
@ -131,9 +129,9 @@ requests==2.31.0
# -c constraints.txt
# pytest-base-url
# pytest-selenium
ruff==0.1.13
ruff==0.1.14
# via -r requirements-dev.in
selenium==4.9.1
selenium==4.16.0
# via
# -r requirements-dev.in
# pytest-selenium

View file

@ -1,4 +1,4 @@
django>=4.1,<5.0
django>=4.1
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==4.2.9
django==5.0.1
# via
# -r requirements.in
# crispy-bootstrap5

View file

@ -11,7 +11,7 @@ from purchase.models import (
class Command(BaseCommand):
help = "Clear all data" # noqa: A003
help = "Clear all data"
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" # noqa: A003
help = "Generates dummy baskets"
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" # noqa: A003
help = "Refresh cache"
def handle(self, *args, **options): # noqa: ARG002
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))
class BasketItem(Model):
class BasketItem(Model): # noqa: DJ008
product = models.ForeignKey(
to=Product,
on_delete=models.PROTECT,