Skip to content

fix serialization of bounding_box with quantities#8052

Merged
bsipocz merged 6 commits into
astropy:masterfrom
nden:fix-bbox-serialization
Nov 2, 2018
Merged

fix serialization of bounding_box with quantities#8052
bsipocz merged 6 commits into
astropy:masterfrom
nden:fix-bbox-serialization

Conversation

@nden

@nden nden commented Oct 31, 2018

Copy link
Copy Markdown
Contributor

Fixes issue brought up in #8037.

@astropy-bot

astropy-bot Bot commented Oct 31, 2018

Copy link
Copy Markdown

Hi there @nden 👋 - thanks for the pull request! I'm just a friendly 🤖 that checks for issues related to the changelog and making sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part 😃.

Everything looks good from my point of view! 👍

If there are any issues with this message, please report them here.

@nden nden requested review from Cadair and drdavella October 31, 2018 15:45
@nden nden added Bug modeling zzz 💤 io.misc.asdf archived: Go to asdf-astropy repo labels Oct 31, 2018
@nden nden added this to the v3.1 milestone Oct 31, 2018
@pllim

pllim commented Oct 31, 2018

Copy link
Copy Markdown
Member

Does this close or complement #8037? Does this need a test?

@nden

nden commented Oct 31, 2018

Copy link
Copy Markdown
Contributor Author

@pllim It replaces #8037. It has a test.

@nden nden force-pushed the fix-bbox-serialization branch from f2a7307 to 40fd626 Compare October 31, 2018 20:19

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

Looks good but just one small comment - I'm approving so that this can be merged once that small comment is addressed (or not if no changes are needed)

model.bounding_box = cls._domain_to_bounding_box(node['domain'])
elif 'bounding_box' in node:
model.bounding_box = node['bounding_box']
if 'bounding_box' in node:

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.

Why the change from elif to if? If you want the 'bounding_box' clause to take precedence, maybe put it first and then use an elif?

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.

I was considering removing domain. It was replaced by bounding_box quite a while ago.
@drdavella Is there any reason NOT to remove domain? I believe it was only used by jwst and by now there shouldn't be any files left with it.

@drdavella drdavella Nov 1, 2018

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.

@nden it's okay with me to remove. It was removed in v1.1.0 of the standard, so there's no requirement to support backwards compatibility here given that the version of TransformType is already pinned to 1.1.0.

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.

After more conversations locally - removing it now doesn't appear to be a problem.

@bsipocz

bsipocz commented Nov 2, 2018

Copy link
Copy Markdown
Member

Comment has been addressed, so I'm merging this one, too.

@bsipocz bsipocz merged commit d78b3cb into astropy:master Nov 2, 2018
@bsipocz

bsipocz commented Nov 2, 2018

Copy link
Copy Markdown
Member

Thank you @nden!

bsipocz added a commit that referenced this pull request Nov 2, 2018
fix serialization of bounding_box with quantities
nden pushed a commit to nden/astropy that referenced this pull request May 24, 2019
fix serialization of bounding_box with quantities

(cherry picked from commit d78b3cb)
@nden nden deleted the fix-bbox-serialization branch January 22, 2026 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Bug modeling zzz 💤 io.misc.asdf archived: Go to asdf-astropy repo

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants