Replace poetry with pip
The lockfile issues, the extra bloat, I'm done. Waiting for hatch to be supported by renovate.
This commit is contained in:
parent
9a35ea56a4
commit
df4dc64058
6 changed files with 66 additions and 2404 deletions
|
@ -20,29 +20,24 @@ static:
|
|||
- ./static/build
|
||||
expire_in: 2 hours
|
||||
|
||||
poetry:
|
||||
pip:
|
||||
image: python:3.10-slim
|
||||
stage: build
|
||||
variables:
|
||||
PIP_CACHE_DIR: $CI_PROJECT_DIR/.pip-cache
|
||||
cache:
|
||||
key: poetry-$CI_COMMIT_REF_SLUG
|
||||
key: pip-$CI_COMMIT_REF_SLUG
|
||||
paths:
|
||||
- "$CI_PROJECT_DIR/.pip-cache"
|
||||
- "$CI_PROJECT_DIR/.poetry-cache"
|
||||
before_script:
|
||||
- apt-get update --yes
|
||||
- apt-get install --yes build-essential libpq-dev git
|
||||
- pip install poetry==1.2.2
|
||||
- poetry config cache-dir $CI_PROJECT_DIR/.poetry-cache
|
||||
script:
|
||||
- python -m venv env
|
||||
- source env/bin/activate
|
||||
- poetry check
|
||||
- poetry lock --check
|
||||
- poetry install
|
||||
- pip install -r requirements.txt
|
||||
artifacts:
|
||||
name: 'poetry-$CI_JOB_ID'
|
||||
name: 'venv-$CI_JOB_ID'
|
||||
paths:
|
||||
- ./env/
|
||||
expire_in: 2 hours
|
||||
|
@ -51,7 +46,7 @@ poetry:
|
|||
image: python:3.10-slim
|
||||
stage: test
|
||||
dependencies:
|
||||
- poetry
|
||||
- pip
|
||||
before_script:
|
||||
- source env/bin/activate
|
||||
variables:
|
||||
|
@ -78,7 +73,7 @@ test_python:
|
|||
coverage_format: cobertura
|
||||
path: coverage.xml
|
||||
dependencies:
|
||||
- poetry
|
||||
- pip
|
||||
- static
|
||||
|
||||
django_checks:
|
||||
|
|
10
Dockerfile
10
Dockerfile
|
@ -28,8 +28,6 @@ RUN apt-get update --yes --quiet && apt-get install --yes --quiet --no-install-r
|
|||
|
||||
RUN curl -fsSL https://github.com/aptible/supercronic/releases/download/v0.2.1/supercronic-linux-amd64 -o /usr/local/bin/supercronic && chmod +x /usr/local/bin/supercronic
|
||||
|
||||
RUN pip install --no-cache poetry==1.2.2
|
||||
|
||||
ENV PATH=$VIRTUAL_ENV/bin:$PATH \
|
||||
PYTHONUNBUFFERED=1
|
||||
|
||||
|
@ -38,10 +36,9 @@ EXPOSE 8000
|
|||
USER website
|
||||
|
||||
RUN python -m venv $VIRTUAL_ENV
|
||||
COPY --chown=website pyproject.toml poetry.lock ./
|
||||
COPY --chown=website requirements.txt ./
|
||||
|
||||
# Clear the poetry and pip caches, as `--no-cache` doesn't do anything
|
||||
RUN poetry install --without=dev && rm -rf $HOME/.cache
|
||||
RUN pip install --no-cache -r requirements.txt
|
||||
|
||||
COPY --chown=website --from=frontend ./static/build ./static/build
|
||||
|
||||
|
@ -65,6 +62,7 @@ RUN curl -sSf https://just.systems/install.sh | bash -s -- --to /usr/bin
|
|||
# Restore user
|
||||
USER website
|
||||
|
||||
RUN poetry install --no-cache
|
||||
COPY --chown=website dev-requirements.txt ./
|
||||
RUN pip install --no-cache -r dev-requirements.txt
|
||||
|
||||
CMD sleep infinity
|
||||
|
|
19
dev-requirements.txt
Normal file
19
dev-requirements.txt
Normal file
|
@ -0,0 +1,19 @@
|
|||
-r requirements.txt
|
||||
|
||||
honcho==1.1.0
|
||||
flake8==5.0.4
|
||||
isort==5.10.1
|
||||
black==22.10.0
|
||||
django-browser-reload==1.6.0
|
||||
django-debug-toolbar==3.7.0
|
||||
types-requests==2.28.5
|
||||
mypy==0.982
|
||||
wagtail-factories==3.1.0
|
||||
coverage==6.5.0
|
||||
flake8-bugbear==22.9.23
|
||||
flake8-builtins==2.0.0
|
||||
flake8-comprehensions==3.10.0
|
||||
flake8-mutable==1.2.0
|
||||
flake8-print==5.0.0
|
||||
flake8-tuple==0.4.1
|
||||
djlint==1.19.2
|
2321
poetry.lock
generated
2321
poetry.lock
generated
File diff suppressed because it is too large
Load diff
|
@ -1,69 +1,3 @@
|
|||
[tool.poetry]
|
||||
name = "website"
|
||||
version = "0.0.0"
|
||||
description = ""
|
||||
authors = []
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
Django = "4.0.8"
|
||||
wagtail = "3.0.3"
|
||||
django-environ = "0.9.0"
|
||||
whitenoise = {version = "6.2.0", extras = ["brotli"]}
|
||||
Pygments = "2.13.0"
|
||||
beautifulsoup4 = "4.9.3"
|
||||
lxml = "4.9.1"
|
||||
more-itertools = "9.0.0"
|
||||
requests = "2.28.1"
|
||||
wagtail-generic-chooser = "0.4.1"
|
||||
django-rq = "2.5.1"
|
||||
django-redis = "5.2.0"
|
||||
wagtail-draftail-snippet = "0.4.2"
|
||||
gunicorn = "20.1.0"
|
||||
psycopg2 = "2.9.5"
|
||||
djangorestframework = "3.14.0"
|
||||
django-htmx = "1.12.2"
|
||||
wagtail-metadata = "4.0.2"
|
||||
humanize = "4.4.0"
|
||||
django-plausible = "0.4.0"
|
||||
sentry-sdk = "1.10.1"
|
||||
wagtail-favicon = {git = "https://github.com/RealOrangeOne/wagtail-favicon", rev = "4586efaac746085338fc7d61713006d9adc62d2e"}
|
||||
django-sri = "0.5.0"
|
||||
wagtail-2fa = "1.6.3"
|
||||
django-health-check = "3.17.0"
|
||||
wagtail-autocomplete = "0.9.0"
|
||||
Wand = "^0.6.10"
|
||||
django3-cache-decorator = "^0.5.2"
|
||||
django-cors-headers = "^3.13.0"
|
||||
uritemplate = "^4.1.1"
|
||||
PyYAML = "^6.0"
|
||||
django-csp = "^3.7"
|
||||
django-permissions-policy = "^4.13.0"
|
||||
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
honcho = "1.1.0"
|
||||
flake8 = "^5.0.4"
|
||||
isort = "5.10.1"
|
||||
black = "^22.10.0"
|
||||
django-browser-reload = "1.6.0"
|
||||
django-debug-toolbar = "3.7.0"
|
||||
types-requests = "2.28.5"
|
||||
mypy = "^0.982"
|
||||
wagtail-factories = "3.1.0"
|
||||
coverage = "6.5.0"
|
||||
flake8-bugbear = "^22.9.23"
|
||||
flake8-builtins = "^2.0.0"
|
||||
flake8-comprehensions = "3.10.0"
|
||||
flake8-mutable = "1.2.0"
|
||||
flake8-print = "5.0.0"
|
||||
flake8-tuple = "0.4.1"
|
||||
djlint = "1.19.2"
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.djlint]
|
||||
ignore = "T003,H006,H023,H030,H031"
|
||||
indent = 2
|
||||
|
|
37
requirements.txt
Normal file
37
requirements.txt
Normal file
|
@ -0,0 +1,37 @@
|
|||
Django==4.0.8
|
||||
wagtail==3.0.3
|
||||
django-environ==0.9.0
|
||||
whitenoise[brotli]==6.2.0
|
||||
Pygments==2.13.0
|
||||
beautifulsoup4==4.9.3
|
||||
lxml==4.9.1
|
||||
more-itertools==9.0.0
|
||||
requests==2.28.1
|
||||
wagtail-generic-chooser==0.4.1
|
||||
django-rq==2.5.1
|
||||
django-redis==5.2.0
|
||||
wagtail-draftail-snippet==0.4.2
|
||||
gunicorn==20.1.0
|
||||
psycopg2==2.9.5
|
||||
djangorestframework
|
||||
django-htmx==1.12.2
|
||||
wagtail-metadata==4.0.2
|
||||
humanize==4.4.0
|
||||
django-plausible==0.4.0
|
||||
sentry-sdk==1.10.0
|
||||
django-sri==0.5.0
|
||||
wagtail-2fa==1.6.3
|
||||
django-health-check==3.17.0
|
||||
wagtail-autocomplete==0.9.0
|
||||
Wand==0.6.10
|
||||
django3-cache-decorator==0.5.2
|
||||
django-cors-headers==3.13.0
|
||||
django-csp==3.7
|
||||
django-permissions-policy==4.13.0
|
||||
|
||||
# DRF OpenAPI dependencies
|
||||
uritemplate
|
||||
PyYAML
|
||||
|
||||
# Use custom `wagtail-favicon` with performance improvements
|
||||
git+https://github.com/RealOrangeOne/wagtail-favicon@4586efaac746085338fc7d61713006d9adc62d2e
|
Loading…
Reference in a new issue