Skip to content

Deprecate check_broadcast - #15499

Closed
felipekhouri wants to merge 6 commits into
astropy:mainfrom
felipekhouri:deprecate-check_broadcast
Closed

felipekhouri wants to merge 6 commits into
astropy:mainfrom
felipekhouri:deprecate-check_broadcast

Conversation

@felipekhouri

@felipekhouri felipekhouri commented Oct 17, 2023 •

Copy link
Copy Markdown
Contributor

Changed all check_broadcast occurrences to numpy.broadcast_shapes.

Description

This pull request is to address the deprecation of the check_broadcast method, changing it's occurrences to the new numpy.broadcast_shapes() method.

Fixes #15211

Changed all check_broadcast occurrences to numpy.broadcast_shapes.
@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution to Astropy! 🌌 This checklist is meant to remind the package maintainers who will review this pull request of some common things to look for.

  • Do the proposed changes actually accomplish desired goals?
  • Do the proposed changes follow the Astropy coding guidelines?
  • Are tests added/updated as required? If so, do they follow the Astropy testing guidelines?
  • Are docs added/updated as required? If so, do they follow the Astropy documentation guidelines?
  • Is rebase and/or squash necessary? If so, please provide the author with appropriate instructions. Also see instructions for rebase and squash.
  • Did the CI pass? If no, are the failures related? If you need to run daily and weekly cron jobs as part of the PR, please apply the "Extra CI" label. Codestyle issues can be fixed by the bot.
  • Is a change log needed? If yes, did the change log check pass? If no, add the "no-changelog-entry-needed" label. If this is a manual backport, use the "skip-changelog-checks" label unless special changelog handling is necessary.
  • Is this a big PR that makes a "What's new?" entry worthwhile and if so, is (1) a "what's new" entry included in this PR and (2) the "whatsnew-needed" label applied?
  • Is a milestone set? Milestone must be set but we cannot check for it on Actions; do not let the green checkmark fool you.
  • At the time of adding the milestone, if the milestone set requires a backport to release branch(es), apply the appropriate "backport-X.Y.x" label(s) before merge.

@pllim pllim added this to the v6.0 milestone Oct 17, 2023
@pllim pllim added the API change PRs and issues that change an existing API, possibly requiring a deprecation period label Oct 17, 2023
Comment thread astropy/utils/shapes.py Outdated


def check_broadcast(*shapes):
warn("check_broadcast() method has been deprecated. You should use numpy.broadcast_shapes() method instead.")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please use the @deprecated decorator. You can see how we deprecate other things in this code base for example, or other similar PRs. Thanks!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done! Thank you for pointing that out!

@github-actions github-actions Bot 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.

Welcome to Astropy 👋 and congratulations on your first pull request! 🎉

A project member will respond to you as soon as possible; in the meantime, please have a look over the Checklist for Contributed Code and make sure you've addressed as many of the questions there as possible.

If you feel that this pull request has not been responded to in a timely manner, please send a message directly to the development mailing list. If the issue is urgent or sensitive in nature (e.g., a security vulnerability) please send an e-mail directly to the private e-mail [email protected].

@github-actions

Copy link
Copy Markdown
Contributor

👋 Thank you for your draft pull request! Do you know that you can use [ci skip] or [skip ci] in your commit messages to skip running continuous integration tests until you are ready?

@saimn saimn modified the milestones: v6.0, v6.1 Oct 28, 2023

@pllim pllim left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks! Still needs a change log.

Comment thread astropy/utils/shapes.py Resolved
Comment thread astropy/utils/shapes.py Resolved
felipekhouri and others added 2 commits October 31, 2023 15:34
Co-authored-by: P. L. Lim <[email protected]>
Co-authored-by: P. L. Lim <[email protected]>
@pllim

pllim commented Oct 31, 2023

Copy link
Copy Markdown
Member

Test failures are real.

Comment thread astropy/modeling/core.py Resolved
@astrofrog astrofrog modified the milestones: v6.1.0, v7.0.0 Apr 4, 2024
@github-actions github-actions Bot added the Close? Tell stale bot that this issue/PR is stale label Apr 25, 2024
@github-actions

Copy link
Copy Markdown
Contributor

Hi humans 👋 - this pull request hasn't had any new commits for approximately 4 months. I plan to close this in 30 days if the pull request doesn't have any new commits by then.

In lieu of a stalled pull request, please consider closing this and open an issue instead if a reminder is needed to revisit in the future. Maintainers may also choose to add keep-open label to keep this PR open but it is discouraged unless absolutely necessary.

If this PR still needs to be reviewed, as an author, you can rebase it to reset the clock.

If you believe I commented on this pull request incorrectly, please report this here.

@pllim

pllim commented Apr 26, 2024

Copy link
Copy Markdown
Member

Superseded by #16346

@pllim pllim closed this Apr 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API change PRs and issues that change an existing API, possibly requiring a deprecation period Close? Tell stale bot that this issue/PR is stale coordinates modeling utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deprecate check_broadcast

5 participants