[project] name = "siem-dashboard" version = "0.1.0" description = "Flask MongoDB SIEM Dashboard" requires-python = ">3.14" dependencies = [ "flask>=3.1.2", "flask-cors>=6.0.2", "mongoengine>=0.29.1", "pydantic[email]>=2.12.5,<3.0.0", "pydantic-settings>=2.12.0,<3.0.0", "pyjwt>=2.11.0", "pwdlib[argon2]>=0.3.0,<0.4.0", "uuid6>=2025.0.1,<2026.0.0", "redis>=7.1.0,<8.0.0", "flask-limiter>=3.12,<4.0.0", "structlog>=25.5.0,<26.0.0", "pyyaml>=6.0.3", "gunicorn>=25.0.3", ] [project.optional-dependencies] dev = [ "pytest>=9.0.2,<10.0.0", "pytest-cov>=7.0.0,<8.0.0", "mypy>=1.19.1", "types-redis>=4.6.0.20241004,<5.0.0", "types-flask-cors>=6.0.0.20250809", "ruff>=0.15.0", "ty>=0.0.15", "pre-commit>=4.5.1", "pylint>=4.0.4,<5.0.0", "pylint-pydantic>=0.4.1,<0.5.0", "pylint-per-file-ignores>=3.2.0,<4.0.0", ] [build-system] requires = [ "hatchling", ] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = [ "app", ] [tool.ruff] target-version = "py314" line-length = 88 src = [ "app", ] [tool.ruff.lint] select = [ "E", "W", "F", "B", "C4", "UP", "ARG", "SIM", "PTH", "RUF", "S", "N", ] ignore = [ "E501", "B008", "S101", "S104", "S105", "ARG001", "E712", "N999", "N818", "UP046", "RUF005", ] [tool.ruff.lint.per-file-ignores] "tests/**/*.py" = [ "S101", "ARG001", ] "conftest.py" = [ "S107", ] [tool.mypy] python_version = "3.14" strict = true warn_return_any = true warn_unused_ignores = false disallow_untyped_defs = true disallow_incomplete_defs = true plugins = [ "pydantic.mypy", ] [[tool.mypy.overrides]] module = [ "tests.*", "conftest", ] ignore_errors = true [[tool.mypy.overrides]] module = [ "uuid6", "structlog", "structlog.*", "flask_limiter", "flask_limiter.*", "pwdlib", "mongoengine", "mongoengine.*", "yaml", ] ignore_missing_imports = true [[tool.mypy.overrides]] module = [ "app.config", ] implicit_reexport = true [tool.pydantic-mypy] init_forbid_extra = true init_typed = true warn_required_dynamic_aliases = true [tool.pylint.main] py-version = "3.14" jobs = 4 load-plugins = [ "pylint_pydantic", "pylint_per_file_ignores", ] persistent = true suggestion-mode = true ignore = [ "venv", ".venv", "__pycache__", "build", "dist", ".git", ".pytest_cache", ".mypy_cache", ".ruff_cache", ] ignore-paths = [ "^venv/.*", "^.venv/.*", "^build/.*", "^dist/.*", ] [tool.pylint.messages_control] disable = [ "C0103", "C0116", "C0121", "C0301", "C0302", "C0303", "C0304", "C0305", "C0411", "E0401", "E1102", "E1136", "R0801", "R0901", "R0903", "R0917", "W0611", "W0612", "W0613", "W0621", "W0622", "W0718", ] [tool.pylint.pylint-per-file-ignores] "conftest.py" = "import-outside-toplevel" [tool.pylint.format] max-line-length = 95 [tool.pylint.design] max-args = 12 max-attributes = 10 max-branches = 15 max-locals = 20 max-statements = 55 [tool.pytest.ini_options] testpaths = [ "tests", ] addopts = "-ra -q" filterwarnings = [ "ignore::DeprecationWarning", ] [tool.coverage.run] branch = true source = [ "app", ] [tool.coverage.report] exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", "raise NotImplementedError", ] [tool.ty.src] include = [ "app", "tests", ] exclude = [ ".venv/**", ] respect-ignore-files = true [tool.ty.environment] python-version = "3.12" root = [ "./app", ] python = "./.venv" [tool.ty.rules] possibly-missing-attribute = "error" possibly-missing-import = "error" unused-ignore-comment = "warn" redundant-cast = "warn" undefined-reveal = "warn" [[tool.ty.overrides]] include = [ "tests/**", ] [tool.ty.overrides.rules] unresolved-reference = "warn" invalid-argument-type = "warn" [[tool.ty.overrides]] include = [ "app/controllers/**", "app/engine/**", "app/scenarios/**", ] [tool.ty.overrides.rules] unresolved-attribute = "warn" [tool.ty.terminal] error-on-warning = false output-format = "full"