Use FastAPI instead of Django

This commit is contained in:
Joakim Hellsén 2024-05-21 02:43:53 +02:00
commit b462be40af
No known key found for this signature in database
GPG key ID: D196AE66FEBE1DC9
43 changed files with 1105 additions and 1688 deletions

View file

@ -1,24 +1,18 @@
[tool.poetry]
name = "feedvault"
version = "0.1.0"
description = "FeedVault is a Django app for archiving RSS feeds."
description = "RSS Archive"
authors = ["Joakim Hellsén <tlovinator@gmail.com>"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.12"
django = "^5.0.6"
python-dotenv = "^1.0.1"
gunicorn = "^21.2.0"
dateparser = "^1.2.0"
django-ninja = "^1.1.0"
django-debug-toolbar = "^4.3.0"
whitenoise = { extras = ["brotli"], version = "^6.6.0" }
rich = "^13.7.1"
django-htmx = "^1.17.3"
django-redis = {extras = ["hiredis"], version = "^5.4.0"}
psycopg = {extras = ["binary"], version = "^3.1.19"} # TODO: Use psycopg[c] in Dockerfile
reader = "^3.12"
fastapi = "^0.111.0"
jinja2 = "^3.1.4"
python-multipart = "^0.0.9"
humanize = "^4.9.0"
[tool.poetry.group.dev.dependencies]
ruff = "^0.3.0"
@ -30,44 +24,24 @@ build-backend = "poetry.core.masonry.api"
requires = ["poetry-core"]
[tool.ruff]
exclude = ["migrations"]
fix = true
unsafe-fixes = true
preview = true
line-length = 120
lint.select = ["ALL"]
lint.ignore = [
"ARG001", # Checks for the presence of unused arguments in function definitions.
"ARG002", # Checks for the presence of unused arguments in instance method definitions.
"COM812", # Checks for the absence of trailing commas.
"CPY001", # Missing copyright notice at top of file
"D100", # Checks for undocumented public module definitions.
"D101", # Checks for undocumented public class definitions.
"D102", # Checks for undocumented public method definitions.
"D104", # Missing docstring in public package.
"D105", # Missing docstring in magic method.
"D106", # Checks for undocumented public class definitions, for nested classes.
"D402", # Checks for function docstrings that include the function's signature in the summary line.
"DJ001", # Checks nullable string-based fields (like CharField and TextField) in Django models.
"ERA001", # Found commented-out code
"FIX002", # Line contains TODO
"ISC001", # Checks for implicitly concatenated strings on a single line.
"PLR6301", # Checks for the presence of unused self parameter in methods definitions.
"TD003", # Checks that a TODO comment is associated with a link to a relevant issue or ticket.
"ANN201", # Checks that public functions and methods have return type annotations.
"ARG001", # Checks for the presence of unused arguments in function definitions.
"B008", # Checks for function calls in default function arguments.
"D100", # Checks for undocumented public module definitions.
"CPY001", # Checks for the absence of copyright notices within Python files.
"D104", # Checks for undocumented public package definitions.
"FIX002", # Checks for "TODO" comments.
]
[tool.ruff.lint.pydocstyle]
convention = "google"
[tool.ruff.lint.per-file-ignores]
"**/tests.py" = [
"S101", # Allow asserts
"ARG", # Allow unused arguments
"FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize()
"PLR2004", # Allow "assert response.status_code == 200" when testing views
"D102", # Allow missing docstrings in tests
"PLR6301", # Checks for the presence of unused self parameter in methods definitions.
]
[tool.djlint]
profile = "jinja"
format_attribute_template_tags = true