| [project] | |
| name = "orgstate-engine" | |
| version = "0.1.0" | |
| description = "OrgState Engine β early operational drift detection with evidence and a decision queue." | |
| requires-python = ">=3.11" | |
| # Stage 0: only `core` is a real, dependency-free package. The infra/verticals/ | |
| # delivery layers still live in legacy/ and are migrated in later stages | |
| # (see MIGRATION_MAP.md). Runtime deps are intentionally minimal here. | |
| dependencies = [] | |
| [project.optional-dependencies] | |
| # legacy runtime (API, dashboards, ingestion) β pinned in requirements.txt | |
| legacy = [ | |
| "fastapi>=0.110", | |
| "uvicorn[standard]>=0.27", | |
| "pydantic>=2", | |
| "pandas>=2", | |
| "streamlit>=1.30", | |
| "python-multipart>=0.0.9", | |
| "pyyaml>=6.0", | |
| ] | |
| dev = ["pytest>=8.0"] | |
| [tool.pytest.ini_options] | |
| # makes `from core import ...` resolve from the repo root, no install needed | |
| pythonpath = ["."] | |
| testpaths = ["tests"] | |
| addopts = "-q" | |
| [tool.setuptools] | |
| packages = ["core", "infra", "verticals", "verticals.logistics", "delivery", "harness"] | |
| # --- ruff (Stage 94) ----------------------------------------------------- | |
| # Conservative ruleset β catches NEW issues without forcing a big | |
| # retrofit of the existing 80+ Python files. Strategy: | |
| # - E/F/W/I (errors, pyflakes, warnings, imports) are the V1 floor | |
| # - B (bugbear) ON, with the rules the codebase intentionally | |
| # uses extensively (B008 β FastAPI Body() in defaults; B904 | |
| # β raise without from in handler error paths) added to ignore | |
| # - E501 (line-too-long) deferred β many existing long lines | |
| # in templates/docstrings; format check handles it on touch | |
| # - E702 (semicolons-on-one-line) deferred β test code uses | |
| # `dt = ...; cur = ...` extensively | |
| # - E741 (ambiguous l/O/I) deferred β `l` in zip+comprehensions | |
| [tool.ruff] | |
| target-version = "py311" | |
| line-length = 100 | |
| extend-exclude = [ | |
| "legacy", # the un-migrated V32 engine β not in scope | |
| "docs", # specs, narrative β not Python source | |
| "gtm", # sales materials | |
| "dashboard/node_modules", | |
| "dashboard/dist", | |
| ] | |
| [tool.ruff.lint] | |
| select = ["E", "F", "W", "I", "B"] | |
| ignore = [ | |
| # bugbear rules the codebase uses intentionally | |
| "B008", # function-call-in-default-argument β FastAPI Body(...) | |
| "B904", # raise-without-from β handler error paths are fine | |
| "B007", # unused-loop-control-variable β `for _ in range(...)` | |
| "B017", # assert-raises-Exception β pytest.raises(Exception) | |
| "B905", # zip-without-explicit-strict β Py3.10 compatible | |
| # style nits deferred to V1.2 cleanup pass | |
| "E501", # line-too-long | |
| "E702", # multiple-statements-on-one-line-semicolon | |
| "E741", # ambiguous-variable-name | |
| "E731", # lambda-assignment | |
| "F841", # unused-variable (often `_unused = svc.call()` | |
| # for side effects in tests) | |
| ] | |
| [tool.ruff.lint.per-file-ignores] | |
| # tests intentionally use bare assert + import side effects | |
| "tests/*" = ["F401", "E402"] | |
| # locustfile defines stubs that re-bind names β false positives | |
| "load/locustfile.py" = ["F811"] | |
| # legacy compat re-exports | |
| "infra/storage/__init__.py" = ["F401"] | |
| "infra/__init__.py" = ["F401"] | |
| "orgstate_client/__init__.py" = ["F401"] | |
| [tool.ruff.format] | |
| quote-style = "double" | |
| indent-style = "space" | |
| line-ending = "lf" | |
| docstring-code-format = false | |