feat: Add comprehensive Django user app with tests using model-bakery
- Implemented user authentication with JWT tokens - Added user and profile models with OneToOne relationship - Created service layer for business logic separation - Implemented DRF serializers and views - Added comprehensive test suite with model-bakery factories - Fixed ipdb/pdbpp dependency conflicts with custom test runner - Configured development and production environments - Added deployment configurations for Apache, systemd, and Docker
This commit is contained in:
56
.pre-commit-config.yaml
Normal file
56
.pre-commit-config.yaml
Normal file
@@ -0,0 +1,56 @@
|
||||
repos:
|
||||
- repo: https://github.com/astral-sh/ruff-pre-commit
|
||||
rev: v0.1.14
|
||||
hooks:
|
||||
- id: ruff
|
||||
name: ruff lint (src only)
|
||||
files: ^src/.*\.py$
|
||||
args: [--config=ruff.toml, --fix, --exit-non-zero-on-fix]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/.*/migrations/.*|
|
||||
src/.*/__pycache__/.*
|
||||
)$
|
||||
|
||||
- id: ruff-format
|
||||
name: ruff format (src only)
|
||||
files: ^src/.*\.py$
|
||||
args: [--config=ruff.toml]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/.*/migrations/.*|
|
||||
src/.*/__pycache__/.*
|
||||
)$
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v4.5.0
|
||||
hooks:
|
||||
- id: trailing-whitespace
|
||||
name: check trailing whitespace (src only)
|
||||
files: ^src/.*\.(py|txt|md|yaml|yml)$
|
||||
|
||||
- id: end-of-file-fixer
|
||||
name: fix end of file (src only)
|
||||
files: ^src/.*\.(py|txt|md|yaml|yml)$
|
||||
|
||||
- id: check-yaml
|
||||
name: check yaml syntax (src only)
|
||||
files: ^src/.*\.ya?ml$
|
||||
|
||||
- id: check-added-large-files
|
||||
name: check large files
|
||||
args: ['--maxkb=500']
|
||||
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: django-check-migrations
|
||||
name: django check migrations
|
||||
entry: ./scripts/check-migrations.sh
|
||||
language: script
|
||||
files: ^src/.*\.py$
|
||||
pass_filenames: false
|
||||
exclude: |
|
||||
(?x)^(
|
||||
src/.*/migrations/.*|
|
||||
src/.*/__pycache__/.*
|
||||
)$
|
||||
Reference in New Issue
Block a user