Skip to content

Use scverse-misc for deprecations - #735

Merged
grst merged 2 commits into
mainfrom
feat/scverse-misc-deprecations
Jul 29, 2026
Merged

Use scverse-misc for deprecations#735
grst merged 2 commits into
mainfrom
feat/scverse-misc-deprecations

Conversation

@grst

@grst grst commented Jul 29, 2026

Copy link
Copy Markdown
Collaborator

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 ParallelDistanceCalculators (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

Closes #704

  • CHANGELOG.md updated
  • Tests added (For bug fixes or new features)
  • Tutorial updated (if necessary)

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>
@github-project-automation github-project-automation Bot moved this to In progress in scirpy-dev Jul 29, 2026
@grst grst added the run-gpu-ci runs GPU CI label Jul 29, 2026
@codecov

codecov Bot commented Jul 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.32%. Comparing base (02ad919) to head (fbde996).

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     
Files with missing lines Coverage Δ
src/scirpy/datasets/__init__.py 85.18% <100.00%> (+2.68%) ⬆️
src/scirpy/io/_io.py 93.01% <100.00%> (+0.11%) ⬆️
src/scirpy/ir_dist/__init__.py 93.00% <100.00%> (+1.08%) ⬆️
src/scirpy/ir_dist/metrics.py 56.68% <100.00%> (+0.31%) ⬆️
src/scirpy/pl/_clonal_expansion.py 100.00% <100.00%> (ø)
src/scirpy/tl/_clonal_expansion.py 96.29% <100.00%> (+0.21%) ⬆️
src/scirpy/util/__init__.py 91.45% <ø> (-0.37%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@grst
grst merged commit 1177bf3 into main Jul 29, 2026
16 of 17 checks passed
@grst
grst deleted the feat/scverse-misc-deprecations branch July 29, 2026 14:07
@github-project-automation github-project-automation Bot moved this from In progress to Done in scirpy-dev Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

run-gpu-ci runs GPU CI

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Use scverse-misc for deprecations

1 participant