# Coverage.py configuration file
# https://coverage.readthedocs.io/en/latest/config.html

[run]
# Source code directories to measure
source = src

# Files to omit from coverage measurement
omit =
    */tests/*
    */test_*.py
    */__pycache__/*
    */site-packages/*
    */conftest.py
    */venv/*
    */virtualenv/*
    */.venv/*
    */migrations/*
    */alembic/*

# Enable branch coverage
branch = True

# Measure coverage in parallel mode (useful for multiprocessing)
parallel = False

# Data file location
data_file = .coverage

[report]
# Fail if coverage is below this threshold
fail_under = 80

# Precision for coverage percentages
precision = 2

# Show lines that weren't executed
show_missing = True

# Skip files with 100% coverage in the report
skip_covered = False

# Skip empty files
skip_empty = True

# Sort the report by different criteria
# Options: Name, Stmts, Miss, Branch, BrPart, Cover
sort = Cover

# Lines to exclude from coverage measurement
exclude_lines =
    # Have to re-enable the standard pragma
    pragma: no cover
    
    # Don't complain about missing debug-only code
    def __repr__
    def __str__
    
    # Don't complain if tests don't hit defensive assertion code
    raise AssertionError
    raise NotImplementedError
    
    # Don't complain if non-runnable code isn't run
    if __name__ == .__main__.:
    if __name__==.__main__.:
    
    # Don't complain about abstract methods
    @abstractmethod
    @abc.abstractmethod
    
    # Don't complain about type checking code
    if TYPE_CHECKING:
    if typing.TYPE_CHECKING:
    
    # Don't complain about protocol methods
    \.\.\.
    pass
    
    # Don't complain about overload definitions
    @overload
    @typing.overload
    
    # Don't complain about deprecated code
    @deprecated
    warnings.warn

[html]
# Directory for HTML coverage report
directory = htmlcov

# Title for the HTML report
title = RAG System Coverage Report

# Show contexts in HTML report
show_contexts = True

[xml]
# Output file for XML coverage report (for CI/CD)
output = coverage.xml

[json]
# Output file for JSON coverage report
output = coverage.json
# Pretty print the JSON output
pretty_print = True
# Show contexts in JSON report
show_contexts = True

[paths]
# Map different paths to the same source (useful for CI/CD)
source =
    src/
    */site-packages/
