Skip to content

Coverage Reference

Complete reference for code coverage analysis in the IDX API.

The coverage report tracks:

MetricDescription
Line CoveragePercentage of source lines executed
Branch CoveragePercentage of conditional branches taken
Function CoveragePercentage of functions called
Missing LinesLines not covered by any test

Coverage is measured for all source modules under src/idx_api/:

  • main.py - Application entry point
  • config.py - Configuration management
  • database.py - Database connections
  • auth.py - Authentication/authorization
  • routers/admin.py - Admin endpoints
  • routers/agents.py - Agent management
  • routers/brokerages.py - Brokerage operations
  • routers/search.py - Property search
  • routers/embeddings_admin.py - Vector search admin
  • And more…
  • models/agent.py
  • models/brokerage.py
  • models/api_key.py
  • And more…
Module TypeTargetNotes
Routers80%+Critical paths must be covered
Models90%+Data models are straightforward
Auth95%+Security-critical code
Utilities70%+Helper functions

Coverage exclusions are configured in pyproject.toml:

[tool.coverage.run]
omit = [
"*/tests/*",
"*/__pycache__/*",
]

Use # pragma: no cover to exclude specific lines:

if __name__ == "__main__": # pragma: no cover
run()