Skip to content

Commit

Permalink
Upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
matthiask committed May 18, 2024
1 parent d25fc22 commit be7a203
Show file tree
Hide file tree
Showing 8 changed files with 100 additions and 97 deletions.
16 changes: 8 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
exclude: ".yarn/|yarn.lock|workbench/static/workbench/lib"
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
- id: check-builtin-literals
Expand All @@ -25,12 +25,12 @@ repos:
language: system
always_run: true
- repo: https://github.com/adamchainz/django-upgrade
rev: 1.16.0
rev: 1.17.0
hooks:
- id: django-upgrade
args: [--target-version, "5.0"]
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: "v0.3.5"
rev: "v0.4.4"
hooks:
- id: ruff
- id: ruff-format
Expand All @@ -39,18 +39,18 @@ repos:
hooks:
- id: prettier
args: [--list-different, --no-semi]
types_or: [scss]
types_or: [css, scss]
exclude: "^conf/|.*\\.html$|.*\\.json$"
- repo: https://github.com/tox-dev/pyproject-fmt
rev: 1.7.0
rev: 2.1.1
hooks:
- id: pyproject-fmt
- repo: https://github.com/abravalheri/validate-pyproject
rev: v0.16
rev: v0.17
hooks:
- id: validate-pyproject
- repo: https://github.com/biomejs/pre-commit
rev: "v0.1.0"
hooks:
- id: biome-check
additional_dependencies: ["@biomejs/biome@1.6.3"]
- id: biome-check
additional_dependencies: ["@biomejs/biome@1.7.3"]
2 changes: 1 addition & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ RUN venv/bin/python -m whitenoise.compress static
RUN useradd -U -d /src deploy
USER deploy
EXPOSE 8000
CMD ["venv/bin/python", "-m", "granian", "--interface", "wsgi", "wsgi:application", "--workers", "2", "--host", "0.0.0.0", "--port", "8000", "--respawn-failed-workers"]
CMD ["venv/bin/python", "-m", "gunicorn", "wsgi:application", "-w", "2", "--bind", "0.0.0.0:8000"]
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "https://biomejs.dev/schemas/1.6.3/schema.json",
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"organizeImports": {
"enabled": false
},
Expand Down
2 changes: 1 addition & 1 deletion fabfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import fh_fablib as fl


fl.require("1.0.20240116")
fl.require("1.0.20240517.1")
fl.config.update(
app="workbench", domain="workbench.feinheit.ch", branch="main", remote="production"
)
Expand Down
114 changes: 60 additions & 54 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,99 +1,105 @@
[tool.ruff]
fix = true
show-fixes = true
target-version = "py311"
target-version = "py310"
preview = true

[tool.ruff.lint]
extend-select = [
# pyflakes, pycodestyle
"F", "E", "W",
# mmcabe
"C90",
# isort
"I",
# pep8-naming
"N",
# pyupgrade
"UP",
# flake8-2020
"YTT",
fix = true
show-fixes = true
lint.extend-select = [
# flake8-async
"ASYNC",
# flake8-boolean-trap
"FBT",
# flake8-bugbear
"B",
# flake8-comprehensions
"C4",
# mmcabe
"C90",
# flake8-django
"DJ",
# flake8-implicit-string-concatenation
"ISC",
"E",
# pyflakes, pycodestyle
"F",
# flake8-boolean-trap
"FBT",
# isort
"I",
# flake8-no-pep420
"INP",
# flake8-gettext
"INT",
# flake8-implicit-string-concatenation
"ISC",
# flake8-logging
"LOG",
# pep8-naming
"N",
# pygrep-hooks
"PGH",
# flake8-pie
"PIE",
# pylint
"PLC",
"PLE",
"PLW",
# flake8-return
"RET",
# flake8-slots
"SLOT",
# ruff
"RUF005",
"RUF006",
"RUF007",
"RUF008",
"RUF009",
"RUF010",
"RUF015",
"RUF016",
"RUF017",
"RUF100",
"RUF200",
# flake8-simplify
"SIM",
# flake8-slots
"SLOT",
# flake8-tidy-imports
"TID",
# flake8-gettext
"INT",
# pygrep-hooks
"PGH",
# pylint
"PLC", "PLE", "PLW",
# flake8-logging
"LOG",
# ruff
"RUF005", "RUF006", "RUF007", "RUF008", "RUF009", "RUF010",
"RUF015", "RUF016", "RUF017", "RUF100", "RUF200",
# pyupgrade
"UP",
"W",
# flake8-2020
"YTT",
]
extend-ignore = [
lint.extend-ignore = [
# Allow zip() without strict=
"B905",
# No line length errors
"E501",
]

[tool.ruff.lint.isort]
combine-as-imports = true
lines-after-imports = 2

[tool.ruff.lint.mccabe]
max-complexity = 15

[tool.ruff.lint.per-file-ignores]
"*/migrat*/*" = [
lint.per-file-ignores."*/migrat*/*" = [
# Allow using PascalCase model names in migrations
"N806",
# Ignore the fact that migration files are invalid module names
"N999",
]
"fabfile.py" = [
# No boolean trap in function definitions in the fabfile
"FBT002",
]
"conf/*" = [
lint.per-file-ignores."conf/*" = [
# Allow Python files in conf/ without __init__
"INP",
]
"scripts/*" = [
lint.per-file-ignores."fabfile.py" = [
# No boolean trap in function definitions in the fabfile
"FBT002",
]
lint.per-file-ignores."scripts/*" = [
# Allow Python files in scripts/ without __init__
"INP",
]
lint.isort.combine-as-imports = true
lint.isort.lines-after-imports = 2
lint.mccabe.max-complexity = 15

[tool.coverage.run]
branch = true
omit = [
"*migrate*",
"*migrations*",
"*venv*",
"*migrate*",
"*migrations*",
"*venv*",
]

[tool.coverage.report]
Expand Down
2 changes: 1 addition & 1 deletion requirements-to-freeze.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ django-vanilla-views
django-webpack-loader
Django<5.1
factory-boy
granian
gunicorn
lxml
more-itertools
pdfdocument
Expand Down
45 changes: 20 additions & 25 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,64 +1,59 @@
# AUTOGENERATED, DO NOT EDIT

asgiref==3.7.2
beautifulsoup4==4.12.3
asgiref==3.8.1
beautifulsoup4==4.13.0b2
certifi==2024.2.2
chardet==5.2.0
charset-normalizer==3.3.2
click==8.1.7
coverage==7.4.3
coverage==7.5.1
cssselect2==0.7.0
Django==5.0.3
Django==5.0.6
django-admin-ordering==0.17.0
django-authlib==0.16.4
django-bootstrap4==24.1
django-bootstrap4==24.3
django-colorfield==0.11.0
django-cors-headers==4.3.1
django-countries==7.5.1
django-countries==7.6.1
django-debug-toolbar==4.3.0
django-fast-export==0.1.0
django-fineforms==0.7.0
django-js-asset==2.2.0
django-vanilla-views==3.0.0
django-webpack-loader==3.0.1
django-webpack-loader==3.1.0
django_fast_export==0.1.1
et-xmlfile==1.1.0
factory-boy==3.3.0
Faker==24.0.0
granian==1.1.1
Faker==25.2.0
gunicorn==22.0.0
idna==3.7
iso3166==2.1.1
lxml==5.1.0
lxml==5.2.2
more-itertools==10.2.0
oauthlib==3.2.2
openpyxl==3.1.2
pdfdocument==4.0.0
phonenumbers==8.13.31
phonenumbers==8.13.37
pillow==10.3.0
psycopg2-binary==2.9.9
pypng==0.20220715.0
python-dateutil==2.9.0.post0
python-stdnum==1.19
python-stdnum==1.20
qrbill==1.1.0
qrcode==7.4.2
reportlab==4.1.0
reportlab==4.2.0
requests==2.31.0
requests-oauthlib==1.4.0.dev0
sentry-sdk==2.0.0a2
setuptools==69.1.1
requests-oauthlib==2.0.0
sentry-sdk==2.2.0
six==1.16.0
soupsieve==2.5
speckenv==6.2
sqlparse==0.5.0
svglib==1.5.1
svgwrite==1.4.3
time-machine==2.14.0
tinycss2==1.2.1
typer==0.9.0
typing_extensions==4.10.0
time-machine==2.14.1
tinycss2==1.3.0
typing_extensions==4.12.0rc1
urllib3==2.2.1
uvloop==0.18.0
vobject==0.9.6.1
vobject==0.9.7
webencodings==0.5.1
wheel==0.42.0
whitenoise==6.6.0
xlsxdocument==1.3.10
14 changes: 8 additions & 6 deletions webpack.library.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,14 @@ module.exports = (PRODUCTION) => {
index: true,
writeToDisk: (path) => /\.html$/.test(path),
},
proxy: proxySettings
? {
context: () => true,
target: `http://127.0.0.1:${proxySettings.backendPort}`,
}
: {},
proxy: [
proxySettings
? {
context: () => true,
target: `http://127.0.0.1:${proxySettings.backendPort}`,
}
: {},
],
}
},
assetRule() {
Expand Down

0 comments on commit be7a203

Please sign in to comment.