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

MAINTENANCE: rename sum to sum_labels and add a deprecation warning #123 #172

Merged
merged 15 commits into from
Nov 1, 2020

Conversation

tkoyama010
Copy link
Contributor

@tkoyama010 tkoyama010 commented Nov 1, 2020

MAINTENANCE: rename sum to sum_labels and add a deprecation warning #123

Join the big image sprint at SciPy Japan 2020 (#163)

Co-authored-by: Genevieve Buckley <30920819+GenevieveBuckley@users.noreply.github.com>
@tkoyama010
Copy link
Contributor Author

Thanks. It WFM. I will also add DeprecationWarning .

@GenevieveBuckley
Copy link
Collaborator

Ok, now we need asum function that will produce a deprecation warning and return the new sum_labels function instead.
Similar to this:

def sum(image, label_image=None, index=None):
   """Docstring goes here"""
    warnings.warn("Deprecation message goes here", DeprecationWarning)
    return sum_labels(image, label_image=label_image, index=index)

@tkoyama010 tkoyama010 marked this pull request as ready for review November 1, 2020 06:39
Copy link
Contributor Author

@tkoyama010 tkoyama010 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Collaborator

@GenevieveBuckley GenevieveBuckley left a comment

Choose a reason for hiding this comment

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

Looks good to me! Excellent work @tkoyama010

@GenevieveBuckley GenevieveBuckley merged commit 59b84d2 into dask:master Nov 1, 2020
@tkoyama010 tkoyama010 deleted the patch-5 branch November 1, 2020 07:35
@tkoyama010
Copy link
Contributor Author

@GenevieveBuckley Thanks for great help ☺

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants