Skip to content

Commit 73fdf7b

Browse files
committed
Merge remote-tracking branch 'upstream/main'
Merge upstream/main: sync with Professor's latest updates
2 parents 4d0d387 + 510d6b9 commit 73fdf7b

3 files changed

Lines changed: 27 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@ jobs:
3030
python-version: ${{ matrix.python-version }}
3131

3232
- name: Install package and test dependencies
33-
run: pip install ".[test]" pytest-cov
33+
run: pip install -e ".[test]" pytest-cov
3434

3535
- name: Run tests
36-
run: pytest -v --tb=short --cov=rehline --cov-report=xml --cov-report=term
36+
run: pytest -v --tb=short --cov-report=xml
3737

3838
- name: Upload coverage to Codecov
3939
if: success()

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ rehline.egg-info/
1414
*.log
1515
env/
1616

17+
# Coverage reports
18+
.coverage
19+
coverage.xml
20+
htmlcov/
21+
1722
# Files during package building
1823
eigen-3.4.0/
1924
eigen-5.0.1/

pyproject.toml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,37 @@ py-modules = ["build"]
3434
build = "cp*"
3535

3636
[project.optional-dependencies]
37-
test = ["pytest >= 7.0", "pandas >= 1.5.0"]
37+
test = ["pytest >= 7.0", "pandas >= 1.5.0", "pytest-cov"]
3838

3939
[tool.pytest.ini_options]
4040
testpaths = ["tests"]
4141
python_files = ["test_*.py"]
4242
python_classes = ["Test*"]
4343
python_functions = ["test_*"]
44+
addopts = "--cov=rehline --cov-report=term-missing"
4445

4546
[build-system]
4647
requires = ["requests ~= 2.31.0", "pybind11 ~= 3.0.0", "setuptools >= 80.0.0", "wheel >= 0.42.0", "setuptools-scm >= 8.0"]
4748
build-backend = "setuptools.build_meta"
4849

50+
# --- Coverage ---
51+
[tool.coverage.run]
52+
source = ["rehline"]
53+
omit = ["rehline/_internal*"]
54+
relative_files = true
55+
56+
[tool.coverage.paths]
57+
source = [
58+
"rehline/",
59+
"*/site-packages/rehline/",
60+
]
61+
62+
[tool.coverage.report]
63+
exclude_lines = [
64+
"pragma: no cover",
65+
"if TYPE_CHECKING:",
66+
]
67+
4968
# --- Ruff (linter + formatter) ---
5069
[tool.ruff]
5170
target-version = "py310"

0 commit comments

Comments
 (0)