Albert Y. Shih
Albert Y. Shih
I'm converting this PR to draft since it can't be reviewed without a unit test
The unit test I suggested [here](https://github.com/sunpy/sunpy/issues/6279#issuecomment-1202854417) should work fine. It needs to be added to the bottom of `test_metaframes.py` and then its operation verified.
I think that `sunpy.util` should be renamed to something like `sunpy.devutils`, `sunpy.devtools`, or simply `sunpy.dev` if it's the home for miscellaneous code that's primarily for developers to use. I would...
For completeness in cross-referencing: astropy/sphinx-automodapi#48
My PR to finally fix this issue: astropy/sphinx-automodapi#152
While sphinx-doc/sphinx#10576 will fix in bug in Sphinx, I doubt the bugfix will be backported to releases prior to 5.0. Something in our dependency tree for the docs build is...
No, no existing test. (I don't think we have any pickling tests at all.)
Sorry if I gave you the wrong impression with my earlier response. Although there's no existing test, one definitely needs to be written.
The unit test ought to be more blunt: ``` def test_pickle_rotatedsunframe(): base_coord = SkyCoord(0*u.deg, 0*u.deg, obstime="2001-01-01", frame='heliographic_stonyhurst') rotated_coord = RotatedSunFrame(base=base_coord, duration=1*u.day) pickled_coord = pickle.loads(pickle.dumps(rotated_coord)) assert pickled_coord == rotated_coord ```
I say no. It makes sense for the LOS component, but it wouldn't make sense for the magnitude of the vector field.