Skip to content

Coverage Reference

Complete reference for code coverage analysis in the IDX API.

The coverage report tracks:

Metric Description
Line Coverage Percentage of source lines executed
Branch Coverage Percentage of conditional branches taken
Function Coverage Percentage of functions called
Missing Lines Lines 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 Type Target Notes
Routers 80%+ Critical paths must be covered
Models 90%+ Data models are straightforward
Auth 95%+ Security-critical code
Utilities 70%+ 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()