Skip to content

Fix #4008: Opinionated defaults for 2.0#4063

Closed
JiwaniZakir wants to merge 1 commit into
scverse:mainfrom
JiwaniZakir:fix/4008-opinionated-defaults-for-2-0
Closed

Fix #4008: Opinionated defaults for 2.0#4063
JiwaniZakir wants to merge 1 commit into
scverse:mainfrom
JiwaniZakir:fix/4008-opinionated-defaults-for-2-0

Conversation

@JiwaniZakir
Copy link
Copy Markdown

Closes #4008

Sets mask_var="highly_variable" as the default for RankGenesGroupsPreset under the ScanpyV2Preview preset in src/scanpy/_settings/presets.py. Previously both ScanpyV1 and ScanpyV2Preview used mask_var=None; now ScanpyV2Preview automatically restricts differential expression to highly variable genes by default, aligning with the opinionated v2.0 conventions described in #4008.

The new unit test test_v2preview_preset_mask_var directly asserts:

  • Preset.ScanpyV2Preview.rank_genes_groups.mask_var == "highly_variable"
  • Preset.ScanpyV1.rank_genes_groups.mask_var is None

This PR was created with AI assistance (Claude). The changes were reviewed by quality gates and a critic model before submission.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 16, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.61%. Comparing base (6e7232c) to head (529b780).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4063      +/-   ##
==========================================
- Coverage   78.62%   78.61%   -0.01%     
==========================================
  Files         117      117              
  Lines       12727    12713      -14     
==========================================
- Hits        10006     9994      -12     
+ Misses       2721     2719       -2     
Flag Coverage Δ
hatch-test.low-vers 77.91% <ø> (-0.01%) ⬇️
hatch-test.pre 78.49% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/scanpy/_settings/presets.py 91.08% <ø> (ø)

... and 4 files with indirect coverage changes

@flying-sheep
Copy link
Copy Markdown
Member

Hi, that issue isn’t actionable yet, we’re still deciding what the defaults are going to be

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.

Opinionated defaults for 2.0

2 participants