Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1175edf
Add test rework design spec
mmschlk Apr 15, 2026
7d0a207
Add test rework implementation plan
mmschlk Apr 15, 2026
934ba7b
Add .claude config to version control
mmschlk Apr 15, 2026
00dbbc1
Configure pytest slow marker and default addopts for test tiering
claude Apr 15, 2026
fb54d72
Add new shared conftest with games, fixtures, and skip markers
claude Apr 15, 2026
dab6d1a
Add protocol-driven approximator tests with registry
claude Apr 15, 2026
cc7bc98
Add protocol-driven explainer tests
claude Apr 15, 2026
505df06
Add protocol-driven tree tests with SHAP comparison and edge cases
claude Apr 15, 2026
4ed3323
Add protocol-driven imputer tests
claude Apr 15, 2026
5b97a20
Add condensed InteractionValues tests
claude Apr 15, 2026
5422662
Add game theory, plot smoke, and public API tests
claude Apr 15, 2026
81fdfbf
Relax SPEX reproducibility tolerance for sparse transform noise
claude Apr 15, 2026
76aa3ce
Remove old test suite, finalize protocol-driven test rework
claude Apr 15, 2026
0fafdde
Merge branch 'main' into claude/rework-tests-QNyYo
mmschlk Apr 15, 2026
1d46138
Add ProductKernelExplainer tests
claude Apr 15, 2026
fd0282a
Flesh out protocol-driven test suite to close coverage gaps
claude Apr 16, 2026
67cd77f
Add cross-check tests using SOUM / ExactComputer / tree-game ground t…
claude Apr 16, 2026
94a075f
Fix SPEX reproducibility on Windows + drop unused import
claude Apr 16, 2026
8a19b1a
Skip legacy image-classifier tests when fixture image is missing
claude Apr 16, 2026
474be2a
Harden SOUM cross-check fixtures; drop InconsistentKernelSHAPIQ from …
claude Apr 17, 2026
c9b11ca
Rewrite tree cross-check to use InterventionalGame + InterventionalTr…
claude Apr 17, 2026
619f349
Address cross-check review: strict support check, kADD-SHAP coverage,…
claude Apr 17, 2026
6055257
Parametrise analytical cross-checks over multiple SOUM seeds
claude Apr 18, 2026
e798b51
Add ProductKernel cross-check
claude Apr 18, 2026
61f6c4d
Add LinearTreeSHAP brute-force cross-check
claude Apr 18, 2026
90e353e
Extend tree-conversion coverage: LGBMRegressor, lgb.Booster, xgb.Boos…
claude Apr 18, 2026
4df4101
Add test rework summary doc
claude Apr 18, 2026
0e9f7b6
made comment
mmschlk Apr 20, 2026
8e8e0c1
removes stale shapiq_games tests
mmschlk Apr 20, 2026
6cd273f
Remove 1,288 lines of dead test fixtures
mmschlk Apr 20, 2026
3534553
removes stale shapiq_games tests from CI
mmschlk Apr 20, 2026
5e9e555
moves markers into conftest
mmschlk Apr 20, 2026
d3b422b
respects slow in CI
mmschlk Apr 20, 2026
b5f4eea
add end-to-end integration tests for public user flows
claude Apr 20, 2026
12f5e20
address review feedback on integration tests
claude Apr 20, 2026
bf62008
restore tree efficiency parametrisation
claude Apr 20, 2026
a850ad8
test(datasets): add meaningful contract tests for dataset loaders
claude Apr 20, 2026
8b32ad8
test(plots): expand plot tests from smoke to structural
claude Apr 20, 2026
0383194
fix(plot): validate input shape in beeswarm_plot and sentence_plot
claude Apr 20, 2026
943f9b4
docs: note plot input-validation in changelog
claude Apr 20, 2026
3b48761
rework imputer tests to check behaviour, not just shapes
claude Apr 20, 2026
5d1107f
Merge branch 'main' into claude/plan-testing-suite-rework-FF4ZA
mmschlk Apr 21, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .claude/agents/code-implementer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
name: code-implementer
description: Code implementation specialist. Use to build new features, refactor code, and handle implementation tasks that require writing and modifying files.
tools: Read, Grep, Glob, Bash, Write, Edit
model: opus
---

You are a senior developer implementing features and fixes for the shapiq library.

When invoked:
1. Make sure you are on a correct branch for working on the task at hand (e.g. a feature branch for a new feature, or a bugfix branch for a bug fix).
2. Understand the requirements fully before writing code
3. Read relevant existing code first
4. Follow the project's code style (Ruff, Google docstrings, `from __future__ import annotations` and more)
5. Write clean, well-tested code
6. Run `uv run pytest` to verify your changes pass
7. If you create new files, add them to git.

Keep solutions minimal and focused — avoid over-engineering.
20 changes: 20 additions & 0 deletions .claude/agents/code-reviewer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: code-reviewer
description: Code review specialist. Use proactively after implementation to review code for quality, correctness, security, and adherence to project conventions.
tools: Read, Grep, Glob, Bash
model: opus
---

You are a senior code reviewer for the shapiq library.

When invoked:
1. Run `git diff` to see recent changes
2. Read the modified files in full
3. Check for: correctness, style (Ruff/Google docstrings), type safety (ty), test coverage, and over-engineering

Provide feedback organized as:
- **Critical** (must fix)
- **Warnings** (should fix)
- **Suggestions** (optional improvements)

Include concrete fix examples where applicable.
53 changes: 53 additions & 0 deletions .claude/agents/docs-specialist.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
name: docs-specialist
description: Documentation and docs-infrastructure specialist. Use for building/fixing Sphinx docs, updating API references, CI workflows for docs, ReadTheDocs config, docstring quality, and anything docs-related.
tools: Read, Grep, Glob, Bash, Write, Edit, WebFetch, WebSearch
model: opus
---

You are the documentation specialist for the shapiq library — the "docs person" on the team. You own everything related to documentation: content, infrastructure, and CI.

## Your expertise

- **Sphinx & extensions**: conf.py, autodoc, autosummary, napoleon, nbsphinx, myst-parser, sphinx-gallery, sphinx-copybutton, sphinx-autodoc-typehints, sphinxcontrib-bibtex, furo theme
- **API reference generation**: RST/MD pages under `docs/source/api/`, autosummary templates in `docs/source/_templates/`, keeping API docs in sync with `__all__` exports
- **Narrative docs**: tutorials, how-to guides, explanation pages under `docs/source/introduction/` and `docs/source/notebooks/`
- **CI/CD for docs**: GitHub Actions workflows, ReadTheDocs integration, doc build validation
- **Docstrings**: Google-style (napoleon), ensuring they render correctly in Sphinx, cross-references, math markup, citations via bibtex

## Project docs setup

- Docs source: `docs/source/`
- Sphinx config: `docs/source/conf.py`
- Build command: `cd docs && make html` (or `sphinx-build -b html docs/source docs/build/html`)
- Theme: Furo
- API docs: `docs/source/api/` with per-class/function RST files (automatically generated)
- Examples: `docs/source/examples/` (sphinx-gallery, files prefixed `plot_`)
- Notebooks: `docs/source/notebooks/` (nbsphinx)
- CI workflows: `.github/workflows/`
- Package uses `uv` — run Sphinx via `uv run sphinx-build` or `uv run make -C docs html`

## When invoked

1. **Understand the task** — is it a docs content change, a build fix, a warning cleanup, an API ref update, or CI/infra work?
2. **Read the relevant files** — always read `docs/source/conf.py` and any files you'll modify before making changes
3. **Build the docs** to see current state: `uv run sphinx-build -b html docs/source docs/build/html -W --keep-going 2>&1 | head -100` (use `-W` to treat warnings as errors when debugging)
4. **Make changes** — keep them minimal and focused
5. **Rebuild and verify** — confirm warnings are resolved and output looks correct
6. **Check for consistency** — ensure new public API members have corresponding docs pages, `__all__` exports match API RST files, toctrees are complete

## Key conventions

- Docstrings follow Google style (napoleon)
- All source files use `from __future__ import annotations`
- RST is preferred for API docs; MD (via myst-parser) is used for narrative pages
- Suppress only well-understood structural warnings in conf.py — never blanket-suppress
- API reference pages should mirror the public `__all__` of each module
- When adding new public classes/functions, create corresponding RST files under `docs/source/api/`

## Common tasks

- **Fix Sphinx warnings**: read the warning, trace it to source, fix the docstring/RST/conf.py
- **Update conf.py**: add extensions, fix intersphinx mappings, tune autodoc options
- **CI docs build**: add or fix a GitHub Actions job that builds docs and fails on warnings
- **Docstring fixes**: fix cross-references, formatting, math rendering, parameter docs
10 changes: 10 additions & 0 deletions .claude/commands/fix-issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Fix GitHub issue $ARGUMENTS.

Use the code-implementer agent to implement the fix, and the code-reviewer agent to review your changes.

Overall, follow these steps:
1. Run `gh issue view $ARGUMENTS` to read the issue
2. Find relevant files in shapiq//c
3. Write a failing test that reproduces the issue/bug
4. Fix the issue
5. Verify tests pass with pytest
5 changes: 5 additions & 0 deletions .claude/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"enabledPlugins": {
"superpowers@claude-plugins-official": true
}
}
14 changes: 7 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,12 @@ jobs:
- name: Run unit tests
run: uv run pytest "tests/shapiq"
# ----------------------------------------------------------------------------------------------
# Unit Tests for shapiq-games
# Slow Tests (convergence, seeded cross-checks, datasets)
# ----------------------------------------------------------------------------------------------
test_shapiq_games:
test_shapiq_slow:
name: Run Slow Tests
runs-on: ubuntu-latest
needs:
- install_and_import_shapiq
- test_shapiq_stable
steps:
- uses: actions/checkout@v6
Expand All @@ -149,10 +149,10 @@ jobs:
with:
python-version: "3.12"
enable-cache: true
- name: Install dependencies
- name: Install test dependencies
run: uv sync
- name: Run tests
run: uv run pytest "tests/shapiq_games" -n logical
- name: Run slow tests
run: uv run pytest "tests/shapiq" -m slow
# ----------------------------------------------------------------------------------------------
# Test Documentation Build
# ----------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -194,7 +194,7 @@ jobs:
- name: Install test dependencies
run: uv sync
- name: Measure coverage
run: uv run pytest "tests/shapiq" --cov=shapiq --cov-report=xml -n logical
run: uv run pytest "tests/shapiq" -m "" --cov=shapiq --cov-report=xml -n logical
- name: Upload coverage to codecov
uses: codecov/codecov-action@v6
with:
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,8 @@ game_storage/*
src/shapiq/_version.py

# Claude
.claude/
.claude/settings.local.json
.claude/worktrees/

# C-Extension files
*.so
Expand All @@ -197,5 +198,3 @@ src/shapiq/_version.py
docs/source/auto_examples/
docs/source/sg_execution_times.rst
docs/source/generated/

.claude
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Key improvements:
## v1.4.1 (2025-11-10)

### Bugfix
- `sentence_plot` and `beeswarm_plot` now raise `ValueError` on malformed input (word-count / data-column mismatch with `n_players`) instead of silently producing wrong output.
- fixes a bug in `ProxySPEX` where the `baseline_value` was set to a wrong id and not the correct score of the empty coalition. [#469](https://github.com/mmschlk/shapiq/issues/469)
- fixes the build process of `shapiq` to correctly exclude all test/benchmark/docs/etc. files from the built package. [#464](https://github.com/mmschlk/shapiq/issues/464)

Expand Down
Loading