Skip to content

Improved error message for incorrect gene_symbols columns#658

Merged
timtreis merged 1 commit into
scverse:mainfrom
SAY-5:fix/gene-symbols-typo
May 12, 2026
Merged

Improved error message for incorrect gene_symbols columns#658
timtreis merged 1 commit into
scverse:mainfrom
SAY-5:fix/gene-symbols-typo

Conversation

@SAY-5
Copy link
Copy Markdown
Contributor

@SAY-5 SAY-5 commented May 12, 2026

Closes #618.

_validate_col_for_column_table swallowed the KeyError from _resolve_gene_symbols on the auto-detect branch, so a wrong gene_symbols= column name surfaced as the generic "Unable to locate color key" message. Now the lookup column is validated against every annotating table's var columns before the per-table loop, so a typo raises immediately with the available column names.

Added a regression test on the auto-detect path (without table_name=).

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 77.49%. Comparing base (84e5da7) to head (3cdd83f).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #658      +/-   ##
==========================================
+ Coverage   77.07%   77.49%   +0.41%     
==========================================
  Files          11       11              
  Lines        3280     3572     +292     
  Branches      774      838      +64     
==========================================
+ Hits         2528     2768     +240     
- Misses        454      481      +27     
- Partials      298      323      +25     
Files with missing lines Coverage Δ
src/spatialdata_plot/pl/utils.py 67.62% <100.00%> (+0.29%) ⬆️

... and 3 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@timtreis
Copy link
Copy Markdown
Member

Hey @SAY-5, thank you for your contribution.

@timtreis timtreis merged commit f4dd082 into scverse:main May 12, 2026
7 of 8 checks passed
@timtreis timtreis changed the title fix: surface gene_symbols column typo on auto-detect path Improved error message for incorrect gene_symbols columns May 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gene_symbols= column typo produces misleading 'unable to locate color key' error

3 participants