Skip to content

Tidy up SlicedLowLevelWCS to facilitate more development - #10229

Merged
astrofrog merged 5 commits into
astropy:masterfrom
Cadair:wrapper_refactor
May 4, 2020
Merged

astrofrog merged 5 commits into
astropy:masterfrom
Cadair:wrapper_refactor

Conversation

@Cadair

@Cadair Cadair commented Apr 29, 2020 •

Copy link
Copy Markdown
Member

Following discussion with @nden, @astrofrog and @perrygreenfield we decided that #9736 requires more time in the oven (and experimentation outside of core) so that development will likely move to ndcube for the next dev cycle or two.

Therefore, this replaces #9736 for 4.1 and is to facilitate further development of those classes outside of core.

This does the following main things:

  • Moves SlicedLowLevelWCS to wrappers/sliced_wcs.py
  • Implements a BaseWrapper class, to reduce duplication of APE 14 wrappers.
  • Moves the implementation of array_index_to_world_values and world_to_array_index_values to BaseLowLevelWCS as they can be implemented based on the pixel_ versions.
  • Adds a bunch of useful pytest fixtures which can be use inside and outside core.

@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 to me - it would be good for @nden or @perrygreenfield to take a look at this too, but since this is just internal refactoring, it can be merged later today if no objections.

Comment thread astropy/wcs/wcsapi/high_level_api.py Resolved
Comment thread astropy/wcs/wcsapi/wrappers/base.py Resolved
@mhvk

mhvk commented May 3, 2020

Copy link
Copy Markdown
Contributor

Bit less confident here, but removing milestone as it would seem that one can develop against master and that, therefore, this is not release-critical for 4.1.

@mhvk mhvk modified the milestones: v4.1, v4.2 May 3, 2020
@Cadair
Cadair force-pushed the wrapper_refactor branch from 2786f31 to 6e02a60 Compare May 4, 2020 09:54
@Cadair

Cadair commented May 4, 2020

Copy link
Copy Markdown
Member Author

I appreciate I didn't get this one across the line so if it slips I will live with it, but a word for its inclusion in 4.1.

This PR came out of #9736 and discussions with interested people around it. The idea is for us to bundle the contents of #9736 in the upcoming release of ndcube, to give them some time out in the wild and see how well they work. Therefore, I would really like this in 4.1 so that NDCube 2.0 can depend upon 4.1 and make my life a whole lot easier.

Also the contents of this PR is mostly refactoring and docstring improvements at this point, it's just a nice no API change cleanup PR.

@Cadair
Cadair force-pushed the wrapper_refactor branch from 6e02a60 to 5b00d7d Compare May 4, 2020 11:24
@astrofrog astrofrog modified the milestones: v4.2, v4.1 May 4, 2020

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

@nden's comments have been addressed, so I think this is good to go. This is only really internal code reorganization from a public API point of view (and no new features), so I'm happy to merge this even though the feature freeze deadline has passed.

@astrofrog
astrofrog merged commit d447b8e into astropy:master May 4, 2020
@Cadair
Cadair deleted the wrapper_refactor branch May 4, 2020 12:18
@pllim

pllim commented May 4, 2020

Copy link
Copy Markdown
Member

Did this break a test? See #10299

@pllim pllim mentioned this pull request May 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants