Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update angle class paths in angle converters based on astropy changes #207

Merged
merged 1 commit into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
as this was never needed and will cause problems building on python 3.12 betas. [#193]
- Use unique uri for extensions that implement converters for core asdf types [#199]
- Add support for astropy.table.NdarrayMixin [#200]
- Update angle converters for new class paths in astropy [#207]

0.4.0 (2023-03-20)
------------------
Expand Down
15 changes: 12 additions & 3 deletions asdf_astropy/converters/coordinates/angle.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@

class AngleConverter(QuantityConverter):
tags = ("tag:astropy.org:astropy/coordinates/angle-*",)
types = ("astropy.coordinates.angles.Angle",)
types = (
"astropy.coordinates.angles.Angle",
"astropy.coordinates.angles.core.Angle",
)

def from_yaml_tree(self, node, tag, ctx):
from astropy.coordinates.angles import Angle
Expand All @@ -13,7 +16,10 @@ def from_yaml_tree(self, node, tag, ctx):

class LatitudeConverter(QuantityConverter):
tags = ("tag:astropy.org:astropy/coordinates/latitude-*",)
types = ("astropy.coordinates.angles.Latitude",)
types = (
"astropy.coordinates.angles.Latitude",
"astropy.coordinates.angles.core.Latitude",
)

def from_yaml_tree(self, node, tag, ctx):
from astropy.coordinates.angles import Latitude
Expand All @@ -23,7 +29,10 @@ def from_yaml_tree(self, node, tag, ctx):

class LongitudeConverter(QuantityConverter):
tags = ("tag:astropy.org:astropy/coordinates/longitude-*",)
types = ("astropy.coordinates.angles.Longitude",)
types = (
"astropy.coordinates.angles.Longitude",
"astropy.coordinates.angles.core.Longitude",
)

def to_yaml_tree(self, obj, tag, ctx):
tree = super().to_yaml_tree(obj, tag, ctx)
Expand Down
Loading