Skip to content

Remove vendored code from scikit-image - #527

Open
ericpre wants to merge 4 commits into
hyperspy:mainfrom
ericpre:fix_rescale_intensity_import
Open

ericpre wants to merge 4 commits into
hyperspy:mainfrom
ericpre:fix_rescale_intensity_import

Conversation

@ericpre

@ericpre ericpre commented Jun 29, 2026

Copy link
Copy Markdown
Member

Fix for hyperspy/hyperspy-extensions-list#111.

It doesn't seem to be necessary anymore - from looking at the history, it was introduced during the split and the only difference is around support of scikit-image for version <0.20. Currently, the requirement is scikit-image>=0.20.

Progress of the PR

  • Remove vendored scikit-image code,
  • [n/a] update docstring (if appropriate),
  • [n/a] update user guide (if appropriate),
  • add a changelog entry in the upcoming_changes folder (see upcoming_changes/README.rst),
  • Check formatting of the changelog entry (and eventual user guide changes) in the docs/readthedocs.org:rosettasciio build of this PR (link in github checks)
  • [n/a] add tests,
  • ready for review.

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.84%. Comparing base (558f7a9) to head (51bee2e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #527      +/-   ##
==========================================
+ Coverage   88.80%   88.84%   +0.03%     
==========================================
  Files         113      112       -1     
  Lines       13135    13113      -22     
  Branches     2425     2421       -4     
==========================================
- Hits        11665    11650      -15     
+ Misses        923      920       -3     
+ Partials      547      543       -4     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR removes RosettaSciIO’s vendored copy of skimage.exposure.rescale_intensity now that the project targets scikit-image>=0.20, and updates the Blockfile writer to use the upstream scikit-image implementation directly. This reduces maintenance burden and eliminates version-conditional behavior that was only needed for older scikit-image releases.

Changes:

  • Removed the vendored rescale_intensity implementation (rsciio/utils/_skimage_exposure.py).
  • Updated Blockfile writing code to import/use skimage.exposure.rescale_intensity directly when intensity scaling is requested.
  • Added a Towncrier changelog fragment documenting the maintenance change.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
upcoming_changes/527.maintenance.rst Adds a maintenance changelog entry for the removal of vendored scikit-image code.
rsciio/utils/_skimage_exposure.py Deletes the vendored rescale_intensity implementation.
rsciio/blockfile/_api.py Switches Blockfile intensity scaling to use skimage.exposure.rescale_intensity directly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread upcoming_changes/527.maintenance.rst Outdated
Comment thread rsciio/blockfile/_api.py
@ericpre
ericpre force-pushed the fix_rescale_intensity_import branch 3 times, most recently from 355958d to d6435e0 Compare June 29, 2026 21:26
@ericpre ericpre mentioned this pull request Jul 18, 2026
1 task
@ericpre
ericpre requested review from CSSFrancis and jlaehne July 28, 2026 07:52
@ericpre
ericpre force-pushed the fix_rescale_intensity_import branch from d6435e0 to 890740a Compare July 29, 2026 06:47
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.

2 participants