diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 0000000..213e760 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,13 @@ +repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.4.0 + hooks: + - id: check-added-large-files + - id: end-of-file-fixer + - id: requirements-txt-fixer + - id: check-yaml + - repo: https://github.com/charliermarsh/ruff-pre-commit + rev: v0.0.262 + hooks: + - id: ruff + args: [ '--config', '.ruff.toml' ] diff --git a/README.md b/README.md index 46dc88d..5024f10 100644 --- a/README.md +++ b/README.md @@ -63,4 +63,3 @@ git clone https://github.com/wu-clan/fastapi_best_architecture.git ## Init the test data Execute the `backend/app/init_test_data.py` file - diff --git a/backend/app/alembic/README b/backend/app/alembic/README index e0d0858..a23d4fb 100644 --- a/backend/app/alembic/README +++ b/backend/app/alembic/README @@ -1 +1 @@ -Generic single-database configuration with an async dbapi. \ No newline at end of file +Generic single-database configuration with an async dbapi. diff --git a/pre-commit.sh b/pre-commit.sh new file mode 100644 index 0000000..c099c5f --- /dev/null +++ b/pre-commit.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +pre-commit run --all-files --verbose --show-diff-on-failure diff --git a/requirements.txt b/requirements.txt index d0116f2..255518a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,28 +1,29 @@ -fastapi==0.95.0 -starlette==0.26.1 -SQLAlchemy==2.0.8 -python-jose==3.3.0 -bcrypt==3.2.2 -passlib==1.7.4 -pydantic==1.10.5 -loguru==0.6.0 -redis==4.5.4 +aiofiles==0.8.0 aioredis==2.0.1 +aiosmtplib==1.1.6 alembic==1.7.4 -uvicorn[standard]==0.13.4 -path==15.1.2 +APScheduler==3.8.1 +asyncmy==0.2.5 +bcrypt==3.2.2 +cryptography==39.0.1 +email-validator==1.1.3 Faker==9.7.1 fast-captcha==0.1.3 -asyncmy==0.2.5 -APScheduler==3.8.1 -tzlocal==2.1 +fastapi==0.95.0 fastapi-pagination==0.12.1 -email-validator==1.1.3 -python-multipart==0.0.5 -aiofiles==0.8.0 -aiosmtplib==1.1.6 -cryptography==39.0.1 gunicorn==20.1.0 -supervisor==4.2.5 -wait-for-it==2.2.1 +loguru==0.6.0 +passlib==1.7.4 +path==15.1.2 +pre-commit==3.2.2 +pydantic==1.10.5 +python-jose==3.3.0 +python-multipart==0.0.5 +redis==4.5.4 ruff==0.0.262 +SQLAlchemy==2.0.8 +starlette==0.26.1 +supervisor==4.2.5 +tzlocal==2.1 +uvicorn[standard]==0.13.4 +wait-for-it==2.2.1