Skip to content

BUG: Fix imperials import from astropy.units#11977

Merged
eteq merged 2 commits into
astropy:mainfrom
pllim:imperial-strikes-back
Jul 27, 2021
Merged

BUG: Fix imperials import from astropy.units#11977
eteq merged 2 commits into
astropy:mainfrom
pllim:imperial-strikes-back

Conversation

@pllim

@pllim pllim commented Jul 27, 2021

Copy link
Copy Markdown
Member

Description

This pull request is to re-enable old usage of imperials within astropy.units namespace.

Fixes #11975 . This is a follow-up of #11204 and #11592 . cc @namurphy

I will also enable cron jobs, just in case...

Checklist for package maintainer(s)

This checklist is meant to remind the package maintainer(s) who will review this pull request of some common things to look for. This list is not exhaustive.

  • 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 "When to rebase and squash commits".
  • 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.
  • Is a change log needed? If yes, did the change log check pass? If no, add the no-changelog-entry-needed label.
  • Is a milestone set? Milestone must be set but astropy-bot check might be missing; 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 Bug 🔥 Critical Extra CI Run cron CI as part of PR labels Jul 27, 2021
@pllim pllim added this to the v4.3.1 milestone Jul 27, 2021
@github-actions github-actions Bot added the units label Jul 27, 2021
@pllim pllim requested review from mhvk and nstarman July 27, 2021 13:00

@eteq eteq 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.

FWIW, I also double-checked this test fails without the fix, so this LGTM modulo my small clarification suggestion.

Comment thread astropy/units/physical.py Outdated
@adrn

adrn commented Jul 27, 2021

Copy link
Copy Markdown
Member

Good catch @pllim ! LGTM

Co-authored-by: Erik Tollerud <erik.tollerud@gmail.com>
@pllim

pllim commented Jul 27, 2021

Copy link
Copy Markdown
Member Author

Cron jobs from first commit still running. I'll leave it to your good judgement on when you want to merge this. Thanks for the reviews!

@mhvk mhvk 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.

Nice!

@eteq

eteq commented Jul 27, 2021

Copy link
Copy Markdown
Member

Alright, I'm going to merge this now so that we can try to roll this into a quick 4.3.1 . Thanks for the quick action, @pllim , and @adrn and @mhvk on the quick reviews!

@eteq eteq merged commit 4ae21da into astropy:main Jul 27, 2021
@pllim pllim deleted the imperial-strikes-back branch July 27, 2021 17:38
eteq added a commit that referenced this pull request Jul 27, 2021
BUG: Fix imperials import from astropy.units
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug Extra CI Run cron CI as part of PR 🔥 Critical units

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot import name 'imperials' from 'astropy.units'

4 participants