Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support OpenSlide cache management API #129

Merged
merged 5 commits into from
May 29, 2022
Merged

Conversation

bgilbert
Copy link
Member

@bgilbert bgilbert commented Jul 4, 2021

Support the cache management API implemented in openslide/openslide#335. Sample usage:

import openslide
osr = openslide.OpenSlide("slide.svs")
cache = openslide.OpenSlideCache(256 << 20)
osr.set_cache(cache)

@bgilbert bgilbert force-pushed the cache branch 2 times, most recently from cfdd69f to 24871eb Compare August 1, 2021 03:31
@bgilbert bgilbert force-pushed the cache branch 3 times, most recently from 314e5bc to 8162c85 Compare May 22, 2022 05:25
@bgilbert bgilbert changed the title RFC: Support OpenSlide cache management API Support OpenSlide cache management API May 22, 2022
@bgilbert bgilbert marked this pull request as ready for review May 22, 2022 05:31
@bgilbert
Copy link
Member Author

Ready for review!

bgilbert added 2 commits May 22, 2022 04:17
Raise a subclass of OpenSlideError when an unsupported OpenSlide version
is detected.
If a minimum OpenSlide version is specified to _func(), and the requested
function doesn't exist, succeed at initialization time but raise an
exception if the function is called.
bgilbert added 2 commits May 22, 2022 17:02
They just get stringified and handled as nonexistent files, so we get
OpenSlideUnsupportedFormatError.
@lukenovak
Copy link

Are there plans to release OpenSlide 3.5.0 soon? These changes match up with the cache management API added to the main project (which also indicates they will be enabled in 3.5.0), and I was just curious if there were any plans for an official release that would allow the changes in this Python library to be used.

@bgilbert
Copy link
Member Author

The goal is to get to an OpenSlide 3.5.0 release, but that process may take a while yet. API support will almost certainly land in an OpenSlide Python release before OpenSlide 3.5.0 comes out.

Copy link
Member

@jaharkes jaharkes left a comment

Choose a reason for hiding this comment

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

Only thing missing seems to be the copyright attribution on deepzoom_multiserver.py

openslide/__init__.py Show resolved Hide resolved
examples/deepzoom/deepzoom_multiserver.py Show resolved Hide resolved
openslide/lowlevel.py Show resolved Hide resolved
tests/test_openslide.py Show resolved Hide resolved
Copy link
Member Author

@bgilbert bgilbert left a comment

Choose a reason for hiding this comment

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

Updated!

tests/test_openslide.py Show resolved Hide resolved
openslide/lowlevel.py Show resolved Hide resolved
openslide/__init__.py Show resolved Hide resolved
@bgilbert bgilbert merged commit b1ee827 into openslide:main May 29, 2022
@bgilbert bgilbert deleted the cache branch May 29, 2022 21:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants