mirror of
https://github.com/Crocmagnon/checkout.git
synced 2024-11-22 08:08:04 +01:00
Compare commits
14 commits
9c97406f98
...
15f5bcb915
Author | SHA1 | Date | |
---|---|---|---|
|
15f5bcb915 | ||
2d3b62bf24 | |||
53753c7c7d | |||
dd83367d84 | |||
597a65e933 | |||
3e27ecb966 | |||
52a9094fea | |||
9706c3e9be | |||
9076d27ffc | |||
19076b03ba | |||
16eaf4cb56 | |||
|
002c4617ce | ||
|
4e6d264454 | ||
|
a45e4aced6 |
17 changed files with 42 additions and 30 deletions
2
.github/workflows/codeql-analysis.yaml
vendored
2
.github/workflows/codeql-analysis.yaml
vendored
|
@ -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'
|
||||
|
||||
|
|
2
.github/workflows/test.yaml
vendored
2
.github/workflows/test.yaml
vendored
|
@ -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
|
||||
|
|
2
.github/workflows/update-dependencies.yaml
vendored
2
.github/workflows/update-dependencies.yaml
vendored
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
```
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
django>=4.1,<5.0
|
||||
django>=4.1
|
||||
django-anymail[mailgun]>=8.6
|
||||
django-cleanup>=6.0
|
||||
whitenoise>=6.2
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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"])
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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",
|
||||
},
|
||||
),
|
||||
]
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue