[project] name = "model-ledger" version = "0.7.13" description = "Developer-first model inventory and governance framework for SR 11-7, EU AI Act, and NIST AI RMF compliance" readme = "README.md" requires-python = ">=3.10" license = "Apache-2.0" authors = [ { name = "Vignesh Narayanaswamy", email = "vigneshn@block.xyz" }, { name = "Block", email = "opensource@block.xyz" }, ] keywords = [ "mlops", "model-governance", "model-inventory", "model-risk", "sr-11-7", "sr-26-2", "compliance", "mcp", "model-context-protocol", "ai-governance", "eu-ai-act", "nist-ai-rmf", ] classifiers = [ "Development Status :: 4 - Beta", "Intended Audience :: Developers", "Intended Audience :: Financial and Insurance Industry", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", "Topic :: Scientific/Engineering :: Artificial Intelligence", "Typing :: Typed", ] dependencies = [ "httpx>=0.28.1", "pydantic>=2.0,<3", ] [project.optional-dependencies] cli = ["typer>=0.9", "rich>=13.0"] # Deprecated: nothing imports openpyxl since the scanner module was removed # (post-0.7.7). Kept so `model-ledger[excel]` pins keep resolving within # 0.7.x; removal planned for 0.8.0. excel = ["openpyxl>=3.1"] introspect-sklearn = ["scikit-learn>=1.0"] introspect-xgboost = ["xgboost>=1.7"] introspect-lightgbm = ["lightgbm>=3.0"] dev = [ "pytest>=8.0", "pytest-cov>=5.0", "hypothesis>=6.0", "ruff>=0.8", "mypy>=1.0", ] snowflake = ["snowflake-connector-python>=3.0", "pandas>=2.0"] docs = [ "mkdocs-material>=9.5", "mkdocstrings[python]>=0.26", "griffecli>=0.1", # `griffe check` CLI — detects breaking public-API changes ] mcp = ["mcp[cli]>=1.7.1,<2"] rest = ["httpx>=0.28"] rest-api = ["fastapi>=0.115", "uvicorn>=0.30"] github = ["httpx>=0.28"] all = ["snowflake-connector-python>=3.0", "pandas>=2.0", "httpx>=0.28"] [project.scripts] model-ledger = "model_ledger.cli:app" [project.entry-points."model_ledger.introspectors"] lightgbm = "model_ledger.introspect.lightgbm:LightGBMIntrospector" sklearn = "model_ledger.introspect.sklearn:SklearnIntrospector" xgboost = "model_ledger.introspect.xgboost:XGBoostIntrospector" [project.urls] Homepage = "https://github.com/block/model-ledger" Documentation = "https://block.github.io/model-ledger" Changelog = "https://github.com/block/model-ledger/blob/main/CHANGELOG.md" "Bug Tracker" = "https://github.com/block/model-ledger/issues" [build-system] requires = ["hatchling"] build-backend = "hatchling.build" [tool.hatch.build.targets.wheel] packages = ["src/model_ledger"] [tool.pytest.ini_options] testpaths = ["tests"] [tool.ruff] target-version = "py310" line-length = 100 [tool.ruff.lint] select = [ "E", # pycodestyle errors "W", # pycodestyle warnings "F", # Pyflakes "I", # isort "B", # flake8-bugbear "UP", # pyupgrade "SIM", # flake8-simplify ] [tool.ruff.lint.per-file-ignores] "tests/**" = ["S101", "E402"] "src/model_ledger/backends/snowflake.py" = ["E501"] # SQL strings "src/model_ledger/backends/sqlite.py" = ["E501"] # SQL strings "src/model_ledger/export/templates.py" = ["E501"] # HTML templates "src/model_ledger/validate/profiles/*" = ["E501"] # long violation messages [tool.ruff.format] quote-style = "double" [tool.mypy] python_version = "3.10" warn_return_any = true warn_unused_configs = true [[tool.mypy.overrides]] module = [ "xgboost", "xgboost.*", "sklearn", "sklearn.*", "lightgbm", "lightgbm.*", "prefect", "prefect.*", "pandas", "pandas.*", "snowflake", "snowflake.*", "fastapi", "fastapi.*", "uvicorn", "uvicorn.*", "typer", "typer.*", "rich", "rich.*", "mcp", "mcp.*", "numpy", "numpy.*", ] ignore_missing_imports = true [[tool.mypy.overrides]] module = "model_ledger.backends.snowflake" warn_return_any = false [[tool.mypy.overrides]] module = [ "model_ledger.introspect.xgboost", "model_ledger.introspect.sklearn", "model_ledger.introspect.lightgbm", "model_ledger.connectors.prefect", "model_ledger.mcp.server", "model_ledger.rest.app", "model_ledger.cli.app", "model_ledger.datasets.samples", ] disable_error_code = ["import-not-found"] [tool.coverage.run] source = ["src/model_ledger"] branch = true [tool.coverage.report] # Honest floor: real coverage is ~74% (2026-06). The previous 90 was never # enforced (no CI ran --cov). Ratchet this upward as tests are added. fail_under = 70 exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", "raise NotImplementedError", ]