Use scverse-misc for deprecations - #735
Merged
Merged
Conversation
Replace the home-grown `scirpy.util.deprecated` decorator and the ad-hoc
`warnings.warn` calls with the `deprecated` and `deprecated_arg` decorators
from `scverse-misc`, which also add a deprecation notice to the API docs.
`scverse-misc` is added as a hard dependency (no extras required; the
`[sphinx]` extra remains in the `doc` dependency group).
Deprecated functions:
* `ir_dist.tcr_dist` (0.5.0)
* `ir_dist.metrics.AlignmentDistanceCalculator` (0.15.0). The decorator moves
from `__init__` to the class so the notice appears in the class docs.
Deprecated arguments:
* `clip_at` of `tl.clonal_expansion` and `pl.clonal_expansion` (0.14.0)
* `block_size` of the `ParallelDistanceCalculator`s (0.15.0)
* `include_fields` (0.13.0) and `use_umi_count_col` (0.16.0) of the
`io.read_*` functions
* `cached`/`cache_path` of `datasets.vdjdb` and `datasets.iedb` (0.24.0)
The latter two groups previously did not emit any warning at all and now
consistently raise a `FutureWarning`.
Since `deprecated_arg` warns whenever the deprecated argument is passed
(irrespective of its value), internal calls must not forward it:
`pl.clonal_expansion` now converts `clip_at` into `breakpoints` itself instead
of passing it on to `tl.clonal_expansion`, and the alignment distance
calculators no longer forward the ignored `block_size` to their base class.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #735 +/- ##
==========================================
+ Coverage 78.20% 78.32% +0.12%
==========================================
Files 51 51
Lines 4620 4628 +8
==========================================
+ Hits 3613 3625 +12
+ Misses 1007 1003 -4
🚀 New features to boost your workflow:
|
This was referenced Jul 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the home-grown
scirpy.util.deprecateddecorator and the ad-hocwarnings.warncalls with thedeprecatedanddeprecated_argdecoratorsfrom
scverse-misc, which also add a deprecation notice to the API docs.scverse-miscis added as a hard dependency (no extras required; the[sphinx]extra remains in thedocdependency group).Deprecated functions:
ir_dist.tcr_dist(0.5.0)ir_dist.metrics.AlignmentDistanceCalculator(0.15.0). The decorator movesfrom
__init__to the class so the notice appears in the class docs.Deprecated arguments:
clip_atoftl.clonal_expansionandpl.clonal_expansion(0.14.0)block_sizeof theParallelDistanceCalculators (0.15.0)include_fields(0.13.0) anduse_umi_count_col(0.16.0) of theio.read_*functionscached/cache_pathofdatasets.vdjdbanddatasets.iedb(0.24.0)The latter two groups previously did not emit any warning at all and now
consistently raise a
FutureWarning.Since
deprecated_argwarns whenever the deprecated argument is passed(irrespective of its value), internal calls must not forward it:
pl.clonal_expansionnow convertsclip_atintobreakpointsitself insteadof passing it on to
tl.clonal_expansion, and the alignment distancecalculators no longer forward the ignored
block_sizeto their base class.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Closes #704