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:
81
ruff.toml
Normal file
81
ruff.toml
Normal file
@@ -0,0 +1,81 @@
|
||||
# Enable pycodestyle (`E`) and Pyflakes (`F`) codes by default.
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"C", # mccabe
|
||||
"B", # flake8-bugbear
|
||||
"Q", # flake8-quotes
|
||||
"DJ", # flake8-django
|
||||
]
|
||||
|
||||
extend-ignore = [
|
||||
"E501", # line too long, handled by formatter
|
||||
"DJ01", # Missing docstring (too strict for Django)
|
||||
]
|
||||
|
||||
# Allow autofix for all enabled rules (when `--fix`) is provided.
|
||||
fixable = ["ALL"]
|
||||
unfixable = []
|
||||
|
||||
# Exclude a variety of commonly ignored directories.
|
||||
exclude = [
|
||||
".bzr",
|
||||
".direnv",
|
||||
".eggs",
|
||||
".git",
|
||||
".git-rewrite",
|
||||
".hg",
|
||||
".mypy_cache",
|
||||
".nox",
|
||||
".pants.d",
|
||||
".pytype",
|
||||
".ruff_cache",
|
||||
".svn",
|
||||
".tox",
|
||||
".venv",
|
||||
"__pypackages__",
|
||||
"_build",
|
||||
"buck-out",
|
||||
"build",
|
||||
"dist",
|
||||
"node_modules",
|
||||
"venv",
|
||||
"*/migrations/*",
|
||||
"*/__pycache__/*",
|
||||
]
|
||||
|
||||
# Same as Black.
|
||||
line-length = 88
|
||||
|
||||
# Allow unused variables when underscore-prefixed.
|
||||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
|
||||
# Assume Python 3.11.
|
||||
target-version = "py311"
|
||||
|
||||
[mccabe]
|
||||
# Unlike Flake8, default to a complexity level of 10.
|
||||
max-complexity = 10
|
||||
|
||||
[per-file-ignores]
|
||||
# Ignore `E402` (import violations) in all `__init__.py` files
|
||||
"__init__.py" = ["E402"]
|
||||
# Ignore complexity issues in tests
|
||||
"tests/*" = ["C901"]
|
||||
"**/test_*" = ["C901"]
|
||||
"**/tests.py" = ["C901"]
|
||||
|
||||
[format]
|
||||
# Like Black, use double quotes for strings.
|
||||
quote-style = "double"
|
||||
|
||||
# Like Black, indent with spaces, rather than tabs.
|
||||
indent-style = "space"
|
||||
|
||||
# Like Black, respect magic trailing commas.
|
||||
skip-magic-trailing-comma = false
|
||||
|
||||
# Like Black, automatically detect the appropriate line ending.
|
||||
line-ending = "auto"
|
||||
Reference in New Issue
Block a user