Moved to uv from poetry
Updated ruff and mypy, accepted all changes Central exception management and injected the Session. This removed a lot of duplicated boilerplate code. Added health check Updated to Angular 21
This commit is contained in:
1 parent
770fd0c6dd
commit
1e7476c5d9
148 files changed
+7600
-11635
No files matched your search
+64
-64
@@ -1,10 +1,46 @@
|
||||
[project]
|
||||
name = "brewman"
|
||||
version = "14.0.0"
|
||||
description = "Accounting plus inventory management for a restaurant."
|
||||
requires-python = ">=3.14"
|
||||
authors = [{ name = "tanshu", email = "git@tanshu.com" }]
|
||||
dependencies = [
|
||||
"alembic>=1.18.4",
|
||||
"arq>=0.27.0",
|
||||
"cryptography>=46.0.5",
|
||||
"fastapi[all]>=0.129.0",
|
||||
"gunicorn>=25.1.0",
|
||||
"itsdangerous>=2.2.0",
|
||||
"openpyxl>=3.1.5",
|
||||
"pandas>=3.0.1",
|
||||
"passlib[bcrypt]>=1.7.4",
|
||||
"psycopg[binary,pool]>=3.3.3",
|
||||
"pydantic>=2.12.5",
|
||||
"pydantic-settings>=2.13.1",
|
||||
"pyjwt>=2.11.0",
|
||||
"python-dotenv>=1.2.1",
|
||||
"python-multipart>=0.0.22",
|
||||
"sqlalchemy>=2.0.46",
|
||||
"uvicorn[standard]>=0.41.0",
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"bandit>=1.9.3",
|
||||
"mypy>=1.19.1",
|
||||
"pre-commit>=4.5.1",
|
||||
"ruff>=0.15.2",
|
||||
"safety>=3.7.0",
|
||||
"types-openpyxl>=3.1.5.20250919",
|
||||
]
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.mypy]
|
||||
# --strict
|
||||
|
||||
# --- Strictness ---
|
||||
strict = true
|
||||
# Good safety defaults
|
||||
warn_return_any = true
|
||||
warn_unused_configs = true
|
||||
@@ -12,9 +48,9 @@ warn_redundant_casts = true
|
||||
warn_unused_ignores = true
|
||||
no_implicit_optional = true
|
||||
strict_equality = true
|
||||
warn_unreachable = true
|
||||
# Practical ergonomics
|
||||
pretty = true
|
||||
show_error_codes = true
|
||||
show_column_numbers = true
|
||||
error_summary = true
|
||||
# These keep signal high in real-world FastAPI projects
|
||||
@@ -26,41 +62,11 @@ disallow_incomplete_defs = true
|
||||
disallow_subclassing_any = true
|
||||
disallow_untyped_defs = true
|
||||
disallow_untyped_decorators = true
|
||||
# enterprise backend strict
|
||||
# disallow_any_expr = true
|
||||
# disallow_any_decorated = true
|
||||
disallow_any_unimported = true
|
||||
plugins = ["sqlalchemy.ext.mypy.plugin", "pydantic.mypy"]
|
||||
# --strict end
|
||||
|
||||
[tool.poetry]
|
||||
name = "brewman"
|
||||
version = "14.0.0"
|
||||
description = "Accounting plus inventory management for a restaurant."
|
||||
authors = ["tanshu <git@tanshu.com>"]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
PyJWT = "^2.11.0"
|
||||
SQLAlchemy = "^2.0.46"
|
||||
alembic = "^1.18.4"
|
||||
arq = "^0.27.0"
|
||||
cryptography = "^46.0.5"
|
||||
fastapi = { extras = ["all"], version = "^0.129.0" }
|
||||
gunicorn = "^25.1.0"
|
||||
itsdangerous = "^2.2.0"
|
||||
openpyxl = "^3.1.5"
|
||||
pandas = "^3.0.1"
|
||||
passlib = { extras = ["bcrypt"], version = "^1.7.4" }
|
||||
psycopg = { extras = ["binary", "pool"], version = "^3.3.2" }
|
||||
pydantic = { extras = ["dotenv"], version = "^2.12.5" }
|
||||
python = "^3.14"
|
||||
python-dotenv = "^1.2.1"
|
||||
python-multipart = "^0.0.22"
|
||||
uvicorn = { extras = ["standard"], version = "^0.41.0" }
|
||||
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
bandit = "^1.9.3"
|
||||
mypy = "^1.19.1"
|
||||
pre-commit = "^4.5.1"
|
||||
ruff = "^0.15.1"
|
||||
# safety = "^3.7.0"
|
||||
types-openpyxl = "^3.1.5.20250919"
|
||||
|
||||
[tool.pydantic-mypy]
|
||||
init_forbid_extra = true
|
||||
@@ -84,29 +90,27 @@ exclude = [
|
||||
]
|
||||
|
||||
[tool.ruff.lint]
|
||||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
||||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
||||
# McCabe complexity (`C901`) by default.
|
||||
# select = ["E4", "E7", "E9", "F"]
|
||||
select = [
|
||||
# pycodestyle
|
||||
"E",
|
||||
# Pyflakes
|
||||
"F",
|
||||
# pyupgrade
|
||||
"UP",
|
||||
# flake8-bugbear
|
||||
# "B",
|
||||
# flake8-simplify
|
||||
"SIM",
|
||||
# isort
|
||||
"I",
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # pyflakes
|
||||
"I", # isort
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"UP", # pyupgrade
|
||||
"ARG001", # unused arguments in functions
|
||||
"T201", # print statements are not allowed
|
||||
]
|
||||
ignore = ["E203", "E501"]
|
||||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||||
fixable = ["ALL"]
|
||||
# Avoid trying to fix flake8-bugbear (`B`) violations.
|
||||
unfixable = ["B", "F401"]
|
||||
ignore = [
|
||||
"E501", # line too long, handled by black
|
||||
"B008", # do not perform function calls in argument defaults
|
||||
"W191", # indentation contains tabs
|
||||
"B904", # Allow raising exceptions without from e, for HTTPException
|
||||
]
|
||||
fixable = [
|
||||
"ALL"
|
||||
] # Allow fix for all enabled rules (when `--fix`) is provided.
|
||||
dummy-variable-rgx = "^(user|_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
# include-trailing-comma = true
|
||||
@@ -115,11 +119,7 @@ lines-between-types = 1
|
||||
# use-parentheses = true
|
||||
|
||||
[tool.ruff.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