Skip to content

Commit 7642491

Browse files
committed
register extensions with new manifests
1 parent e52b2ef commit 7642491

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

asdf_astropy/extensions.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
via an ``entry-point`` in the ``pyproject.toml`` file.
44
"""
55

6+
import asdf_standard
67
from asdf.extension import Extension, ManifestExtension
78

89
from .converters.coordinates.angle import AngleConverter, LatitudeConverter, LongitudeConverter
@@ -499,6 +500,7 @@
499500

500501

501502
_ASTROPY_EXTENSION_MANIFEST_URIS = [
503+
"asdf://astropy.org/astropy/manifests/astropy-1.4.0",
502504
"asdf://astropy.org/astropy/manifests/astropy-1.3.0",
503505
"asdf://astropy.org/astropy/manifests/astropy-1.2.0",
504506
"asdf://astropy.org/astropy/manifests/astropy-1.1.0",
@@ -543,13 +545,13 @@
543545

544546
CORE_CONVERTERS = _FITS_CONVERTERS + _TIME_CONVERTERS + _TABLE_CONVERTERS + _UNIT_CONVERTERS
545547

546-
UNIT_EXTENSIONS = [
547-
ManifestExtension.from_uri(
548-
"asdf://astropy.org/astropy/manifests/units-1.0.0",
549-
converters=_UNIT_CONVERTERS,
550-
),
548+
ASTROPY_UNIT_MANIFESTS = [
549+
"asdf://astropy.org/astropy/manifests/units-1.1.0",
550+
"asdf://astropy.org/astropy/manifests/units-1.0.0",
551551
]
552552

553+
UNIT_EXTENSIONS = [ManifestExtension.from_uri(u, converters=_UNIT_CONVERTERS) for u in ASTROPY_UNIT_MANIFESTS]
554+
553555
# up to asdf 1.5.0 many tags supported by asdf-astropy
554556
# were defined in core manifests
555557
CORE_MANIFEST_URIS = [
@@ -561,6 +563,8 @@
561563
"asdf://asdf-format.org/core/manifests/core-1.1.0",
562564
"asdf://asdf-format.org/core/manifests/core-1.0.0",
563565
]
566+
if asdf_standard.__version__ > "1.1.1":
567+
CORE_MANIFEST_URIS.insert(0, "asdf://asdf-format.org/astronomy/manifests/astronomy-1.1.0")
564568

565569
CORE_EXTENSIONS = [ManifestExtension.from_uri(u, converters=CORE_CONVERTERS) for u in CORE_MANIFEST_URIS]
566570

0 commit comments

Comments
 (0)