Skip to content

Commit

Permalink
pre-commit config
Browse files Browse the repository at this point in the history
  • Loading branch information
dom-inic committed May 14, 2024
1 parent 3f2ddac commit c8ca8e9
Show file tree
Hide file tree
Showing 4 changed files with 76 additions and 0 deletions.
49 changes: 49 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
exclude: '^docs/|/migrations/|devcontainer.json'
default_stages: [commit]

default_language_version:
python: python3.9.6

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-json
- id: check-toml
- id: check-xml
- id: check-yaml
- id: debug-statements
- id: check-builtin-literals
- id: check-case-conflict
- id: check-docstring-first
- id: detect-private-key

- repo: https://github.com/adamchainz/django-upgrade
rev: '1.16.0'
hooks:
- id: django-upgrade
args: ['--target-version', '4.0']

# Run the Ruff linter.
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.3.5
hooks:
# Linter
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
# Formatter
- id: ruff-format

- repo: https://github.com/Riverside-Healthcare/djLint
rev: v1.34.1
hooks:
- id: djlint-reformat-django
- id: djlint-django

# sets up .pre-commit-ci.yaml to ensure pre-commit dependencies stay up to date
ci:
autoupdate_schedule: weekly
skip: []
submodules: false
14 changes: 14 additions & 0 deletions requirements/base.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
braintree==4.21.0
celery==5.3.1
Django==4.1.7
django-filter==22.1
django-localflavor==4.0
django-parler==2.3
django-rosetta==0.9.9
djangorestframework==3.14.0
humanize==4.7.0
Pillow==9.4.0
psycopg2-binary==2.9.9
python-dotenv==1.0.0
redis==5.0.0
requests==2.31.0
5 changes: 5 additions & 0 deletions requirements/local.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
-r base.txt

amqp==5.1.19
flower==2.0.0
weasyprint==59.0
8 changes: 8 additions & 0 deletions requirements/production.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
-r base.txt

boto3==1.29.7
botocore==1.32.7
django-storages==1.14.2
gunicorn==21.2.0
s3transfer==0.8.0
whitenoise==6.6.0

0 comments on commit c8ca8e9

Please sign in to comment.