Skip to content

Commit d75031f

Browse files
0xC000005claude
andcommitted
Add PyPI/coverage/test badges, enable code coverage in CI
- Add shields.io badges (PyPI, Python versions, tests, coverage, license) - Add pytest-cov and Codecov upload to test workflow - Coverage uploads on Python 3.13 only to avoid duplicates Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 30ea541 commit d75031f

4 files changed

Lines changed: 149 additions & 2 deletions

File tree

.github/workflows/test.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,10 @@ jobs:
2727
run: uv sync --python ${{ matrix.python-version }}
2828

2929
- name: Run tests
30-
run: uv run pytest tests/ -v
30+
run: uv run pytest tests/ -v --cov=pychebyshev --cov-report=xml
31+
32+
- name: Upload coverage to Codecov
33+
if: matrix.python-version == '3.13'
34+
uses: codecov/codecov-action@v5
35+
with:
36+
files: coverage.xml

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# PyChebyshev
22

3+
[![PyPI version](https://img.shields.io/pypi/v/pychebyshev)](https://pypi.org/project/pychebyshev/)
4+
[![Python versions](https://img.shields.io/pypi/pyversions/pychebyshev)](https://pypi.org/project/pychebyshev/)
5+
[![Tests](https://github.com/0xC000005/PyChebyshev/actions/workflows/test.yml/badge.svg)](https://github.com/0xC000005/PyChebyshev/actions/workflows/test.yml)
6+
[![codecov](https://codecov.io/gh/0xC000005/PyChebyshev/graph/badge.svg)](https://codecov.io/gh/0xC000005/PyChebyshev)
7+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
8+
39
**A standalone Python implementation of multi-dimensional Chebyshev tensor interpolation**
410

511
This project provides an **extremely short, standalone Python implementation** (although not fully optimized, without getting tedious) of the Chebyshev tensor method, **for educational purposes only**, demonstrating that it achieves **comparable accuracy to the state-of-the-art MoCaX library** for European option pricing via Black-Scholes.

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,4 +67,5 @@ dev = [
6767
"mkdocs-material>=9.7.1",
6868
"mkdocstrings[python]>=1.0.3",
6969
"pytest>=8.4.2",
70+
"pytest-cov>=7.0.0",
7071
]

0 commit comments

Comments
 (0)