-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Meta-issue: pending API changes for 2.0 #5439
Comments
@grlee77 a fantastic list! I would make one modification and two additions:
|
Regarding @stefanv's request to schedule a meeting, I will propose a doodle shortly, but my first proposal is that we have three meetings: Pacific, Atlantic, and Indian, so that we can all overlap at least once. Are people ok with this plan? |
That works for me. |
@grlee77 maybe this is the right place to add this item: Parameter addition
|
Out of these issues, I see the issue of range-dependent default parameters (mentioned in #5439) to be one of the more complicated to address. A concrete example is the slow behavior of |
Yes, we'll indeed need to do an audit, but I don't think it's a deal breaker. In the worst case scenario we can ascertain data range in two passes. |
#2264 had proposed changing the default boundary |
Notes from the meetings are being edited at: https://hackmd.io/A51uU56pTESLlhcKfH4lQg Archival version at: https://github.com/scikit-image/meeting-notes/blob/main/2021/july-api-meetings.md should be updated after each meeting. |
I opened a PR (#5462) adding |
In #5451 (comment), @rfezzani expressed a preference for also deprecating (or at least not expanding) the We do make use of a number of these for illustrative purposes in examples, so that would be a point in favor of keeping them. I think ongoing maintenance burden should be pretty low # examples using shape functions
segmentation/plot_regionprops.py:from skimage.draw import ellipse
features_detection/plot_corner.py:from skimage.draw import ellipse
features_detection/plot_shape_index.py:from skimage.draw import disk
edges/plot_circular_elliptical_hough_transform.py:from skimage.draw import circle_perimeter
edges/plot_circular_elliptical_hough_transform.py:from skimage.draw import ellipse_perimeter
edges/plot_marching_cubes.py:from skimage.draw import ellipsoid
edges/plot_polygon.py:from skimage.draw import ellipse
edges/plot_line_hough_transform.py:from skimage.draw import line
# examples focused specifically on drawing shapes
edges/plot_shapes.py:from skimage.draw import (line, polygon, disk,
edges/plot_shapes.py:from skimage.draw import line_aa, circle_perimeter_aa
edges/plot_random_shapes.py:from skimage.draw import random_shapes
|
I find |
I think drawing is a job for the different visualization libraries (matplotlip, plotly, napari...)! I agree that |
Note that none of those libraries draw directly to arrays very easily. The purpose of this module was to annotate frames of a video, for example. |
I'm 👍 for keeping draw. It is in fact useful for creating coordinate index lists, which are in turn useful various analysis tasks. (Indeed we ourselves use |
This issue has been mentioned on Image.sc Forum. There might be relevant details there: https://forum.image.sc/t/request-for-comment-plans-for-breaking-changes-in-scikit-image-1-0/55386/3 |
Hi all, I'm just curious: Are there plans for improving type-annotations of parameters in skimage 1.0? Or will parameter-name unification bring type hints implicitly? I'm asking because it might make it easier to explore the API, especially in an automated fashion. For example, if one wanted auto-generate user-interfaces from skimage functions (magicgui), type-annotations would be helpful. |
Hi @haesleinhuepf, I think we will add type annotations eventually, but I don't have a specific time frame in mind. There was an initial start on this about a year ago: #4794, but I don't think there has been any recent progress. Now that NumPy and SciPy are a little farther along on these efforts, we can probably move forward a bit more easily. |
Yup, relevant also @haesleinhuepf, NumPy's tensor typing meeting notes: https://mail.python.org/pipermail/numpy-discussion/2021-June/081863.html |
Apparently we use scipy.ndimage boundary mode names in Functions using scipy.ndimage mode names
Functions using numpy.pad mode names
|
comments moved over from Discussion
@rfezzani |
comment moved over from the discussionHere is a new summary of which items above were already completed via deprecations for skimage 0.19 vs. those that are still remaining. If anyone wants to iterate on these via hackmd or similar, let me know and we can link to it from here: Recently completed deprecations for skimage 0.19:
Proposed API changes surrounding
|
@grlee77 yes! I think it would be convenient to have an interactive/collaborative document to keep track of all these items. I've started https://hackmd.io/f4_EjhYURxGvxqzaEjPeBQ if that's all right. |
Also want to link to the new transition proposal being discussed. |
Thanks @mkcor for starting that document. I've just pulled everything from #5439 (comment) into I intend to use it as a living document. Editing on HackMD has a lower barrier than versioned documents and is less scattered than issue / forum threads. So hopefully it's easy to keep it up to date. I also have the idea to put down a list of guidelines that we can reference when we design our API going forward (not only for skimage2). I have several ideas I'd like to propose and I'm sure there will be more stuff coming up as we start thinking about typing our API. There will probably be a lot of discussion around such guidelines so that's looks like a SKIP could be in order. Edit: moved document from HackMD to our wiki |
|
This issue has been summarized into https://github.com/scikit-image/scikit-image/wiki/API-changes-for-skimage2 |
The "1.0" concept since changed to "2.0", so replace all 1.0 below with 2.0
Description
This issue is just to summarize some of the API considerations we need to make a decision on for the 1.0 release. Please edit and add any additional items I may have forgotten (most of these I copied over from the scikit-image API 1.0 "project" under the Projects tab).
Summary of various proposed Scikit-image API changes to consider for 1.0
Module deprecations
remove skimage.viewer: issue #?
could then close >10 issues: https://github.com/scikit-image/scikit-image/issues?q=is%3Aissue+is%3Aopen+viewer
remove most code in skimage.io, leaving only a thin imageio wrapper: Discussion: deprecating (most of) skimage.io in favour of imageio #5036
Function/module moves
additional issues related to RAG: https://github.com/scikit-image/scikit-image/issues?q=is%3Aissue+is%3Aopen+RAG
Parameter removal
preserve_range
altogether in 1.0 (always using the preserve_range=True behavior)Improved gaussian filter and convert_to_float(#5195) #5281 (comment)
parameter/function renaming
Need to decide on random_seed vs. seed vs. sample_seed: API consistency: seed vs random_seed vs sample_seed #5359
Need to decide on n_jobs vs. workers vs. num_workers vs. ncpu, etc: Terminology: n_jobs vs num_workers vs ncpu etc. #4876
Need to decide on max_iter vs. niter vs. iterations. Also selem vs. structure vs. footprint: Define standard common argument's names #4154
label_image vs labels as a parameter name: issue #?
Harmonizing structure element API to use radius or similar name: Size of structuring elements a bit inconsistent #4536
Rename img_as_* to rescale_to_* or convert_to_*: Rename conversion functions rescale_to_* #1234
Many regionprops are renamed in Introduce a consistent naming scheme for measure.regionprops #5254 (corresponding to issue regionprops: rename
equivalent_diameter
->equivalent_diameter_area
#4821)The old names are still recognized so this should not be a breaking change
Misc
audit usage of img_as_float: Code audit: usage of
img_as_float
#3373Requires some work to further verify which functions have scale-dependent default parameters, etc.
Fixes for data types and other common sources of errors: Fixes for data types and other common sources of errors #3009
involves more prominent and extended version of https://scikit-image.org/docs/stable/user_guide/data_types.html
The text was updated successfully, but these errors were encountered: