File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3535 - name : Run mypy
3636 run : uv run mypy src/
3737
38- - name : Run tests
39- run : uv run pytest -v
38+ - name : Run tests with coverage
39+ run : uv run pytest --cov=langdiff --cov-fail-under=75
Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ uv run pytest -v # Verbose output
2525uv run pytest -k " test_name" # Run specific test by name pattern
2626```
2727
28+ ### Code Coverage
29+ ``` bash
30+ uv run pytest --cov=langdiff --cov-fail-under=75 # Run tests with 75% coverage requirement
31+ uv run pytest --cov=langdiff --cov-report=term-missing # Show missing lines in detail
32+ uv run pytest --cov=langdiff # Basic coverage report
33+ ```
34+
2835### Linting and Formatting
2936``` bash
3037uv run ruff check # Check for linting issues
@@ -100,4 +107,4 @@ Development dependencies:
100107Documentation dependencies:
101108- ` mkdocs ` : Static site generator
102109- ` mkdocs-material ` : Material Design theme for MkDocs
103- - ` mkdocstrings[python] ` : Auto-generate API docs from docstrings
110+ - ` mkdocstrings[python] ` : Auto-generate API docs from docstrings
Original file line number Diff line number Diff line change @@ -37,10 +37,23 @@ dev = [
3737 " mypy>=1.17.1" ,
3838 " openai>=1.99.1" ,
3939 " pytest>=8.4.1" ,
40+ " pytest-cov>=6.2.1" ,
4041 " ruff>=0.12.8" ,
4142]
4243docs = [
4344 " mkdocs>=1.6.0" ,
4445 " mkdocs-material>=9.5.0" ,
4546 " mkdocstrings[python]>=0.26.0" ,
4647]
48+
49+ [tool .coverage .run ]
50+ source = [" src" ]
51+ omit = [" tests/*" ]
52+
53+ [tool .coverage .report ]
54+ exclude_lines = [
55+ " pragma: no cover" ,
56+ " def __repr__" ,
57+ " raise AssertionError" ,
58+ " raise NotImplementedError" ,
59+ ]
You can’t perform that action at this time.
0 commit comments