Skip to content

fix: point table validation to public sanitizer#1165

Open
stanbot8 wants to merge 1 commit into
scverse:mainfrom
stanbot8:fix/1154-sanitize-table-path
Open

fix: point table validation to public sanitizer#1165
stanbot8 wants to merge 1 commit into
scverse:mainfrom
stanbot8:fix/1154-sanitize-table-path

Conversation

@stanbot8

@stanbot8 stanbot8 commented Jul 24, 2026

Copy link
Copy Markdown

Summary

The table-name validation error in issue #1154 points to spatialdata.utils.sanitize_table(adata). This path does not exist. The error now points to spatialdata.sanitize_table(adata). Closes #1154.

Design

Use the top-level function that spatialdata exports. Keep validation and sanitization behavior unchanged.

The implementation changes src/spatialdata/_core/validation.py.

Tests

The regression test fails on main and passes on this branch. The full suite passes with 1,365 tests, 7 skips, and 1 expected failure. The installed wheel passes the reported sanitize-and-validate workflow.

The tests are in tests/models/test_models.py.

All 7 CPU matrix jobs passed.

Commands
uv run pytest tests/models/test_models.py::TestModels::test_table_model_invalid_name_suggests_public_sanitizer -q

@codecov

codecov Bot commented Jul 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.44%. Comparing base (eb4fb3d) to head (63a5780).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1165   +/-   ##
=======================================
  Coverage   92.44%   92.44%           
=======================================
  Files          51       51           
  Lines        7820     7820           
=======================================
  Hits         7229     7229           
  Misses        591      591           
Files with missing lines Coverage Δ
src/spatialdata/_core/validation.py 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@stanbot8
stanbot8 marked this pull request as ready for review July 24, 2026 09:46
@stanbot8
stanbot8 force-pushed the fix/1154-sanitize-table-path branch from 35c771b to 63a5780 Compare July 24, 2026 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error message points to wrong path

1 participant