Skip to content

test: add guarded coverage for app.py dashboard SHAP helpers#15

Merged
AmirhosseinHonardoust merged 1 commit into
mainfrom
test/app-dashboard-coverage
Jun 19, 2026
Merged

test: add guarded coverage for app.py dashboard SHAP helpers#15
AmirhosseinHonardoust merged 1 commit into
mainfrom
test/app-dashboard-coverage

Conversation

@AmirhosseinHonardoust

Copy link
Copy Markdown
Owner

Adds the last missing test coverage: app.py's SHAP-path helpers.

  • test_plot_single_shap_bar_returns_figure: unit test for the
    single-transaction SHAP bar chart.
  • test_explain_single_transaction_end_to_end: fits a small pipeline,
    scores a batch, and asserts explain_single_transaction returns a
    matplotlib Figure plus non-empty reason codes (covers the PR for
    modern-shap compatibility in app.py's actual call path).

Both tests skip cleanly when streamlit/shap are unavailable and run in
CI where requirements.txt installs them.

Verified locally: ruff/black/mypy clean; 41/41 tests pass with deps;
the 2 new tests skip cleanly without them.

@AmirhosseinHonardoust AmirhosseinHonardoust self-assigned this Jun 19, 2026
@AmirhosseinHonardoust AmirhosseinHonardoust added the enhancement New feature or request label Jun 19, 2026
@AmirhosseinHonardoust
AmirhosseinHonardoust merged commit 8c6fe82 into main Jun 19, 2026
8 checks passed
@AmirhosseinHonardoust
AmirhosseinHonardoust deleted the test/app-dashboard-coverage branch June 19, 2026 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant