-
Notifications
You must be signed in to change notification settings - Fork 44
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
as_grey parameter deprecated in pims, used in examples #46
Comments
IMO, we should stop using |
Agreed. Our basic pattern in soft-matter has been to do releases infrequently. That helps with stability in scientific workflows, but it can also lead to awkward situations like this. In this case, preparing the examples for the next version of trackpy/pims is the way to go, especially since the docs for previous releases remain accessible. (We may want to do a better job of exposing that.)
Again, thank you for tackling all these inconsistencies!!!
|
I'm happy that I can contribute to trackpy & friends! My timeline sounded a bit confused but I've confirmed the behavior I'm seeing with a Docker container. First, pims in PyPI lists the latest release as 0.4.1, which was released in September. (This is the pims I was using to regenerate the notebooks.) This version should have had the I made a gist that illustrates what's going on - it includes commands to set up a container, build pims, and load a simple pims ImageSequence using the (I'll be opening an issue about this in the pims repository, since it's a bit out of scope here.) The good news here is that once the PyPi version of pims is corrected, trackpy-examples can be updated to mesh with the latest pims installed from PyPI, and no new version of pims should be required. |
I will try to sort this out this week. In the meantime, we should update the examples to use this method: import pims
color_frames = pims.ImageSequence('../sample_data/bulk_water/*.png', as_grey=True)
@pims.pipeline
def as_grey(frame):
red = frame[:, :, 0]
green = frame[:, :, 1]
blue = frame[:, :, 2]
return 0.2125 * red + 0.7154 * green + 0.0721 * blue
frames = as_grey(color_frames) |
Several of the example notebooks (most notably, the basic walkthrough) use pims ImageSequence objects to load images. Several use the
as_grey
parameter, which was removed in this pims commit back in January 2017. However, this commit has not been incorporated into the version of pims that is in PyPi, so anyone usingpip install pims
won't notice that the notebooks are using the deprecated parameteras_grey
. Anyone building pims from source, on the other hand, will see exceptions.I believe this issue needs input from the developers to decide how to proceed. Should the notebooks expect people to have installed pims from source, or from PyPi? Is it possible that @caspervdw or @danielballan or another soft-matter package maintainer could respond indicating whether the PyPi package for pims might be maintained in the future, or whether there is an "active" versioning/release process? The interface was deprecated nearly 1 year ago but the changes still have not made it into PyPi. Not sure how to proceed here.
I am using the PyPi version of pims (with the deprecated interface) in pull request #44, which brings several of the notebooks up to date.
The text was updated successfully, but these errors were encountered: