Skip to content

Commit

Permalink
skip registering 1.0.0 manifest if others are available
Browse files Browse the repository at this point in the history
  • Loading branch information
braingram committed Aug 21, 2023
1 parent aa40ea1 commit 16a9a31
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions gwcs/extension.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,19 @@
for path in sorted((importlib.resources.files("asdf_wcs_schemas.resources") / "manifests").iterdir(), reverse=True)
]

# 1.0.0 contains multiple versions of the same tag, a bug fixed in
# 1.0.1 so only register 1.0.0 if it's the only available manifest
TRANSFORM_EXTENSIONS = [
ManifestExtension.from_uri(
uri,
legacy_class_names=["gwcs.extension.GWCSExtension"],
converters=WCS_MODEL_CONVERTERS,
)
for uri in WCS_MANIFEST_URIS
if len(WCS_MANIFEST_URIS) == 1 or '1.0.0' not in uri
]


def get_extensions():
"""
Get the gwcs.converters extension.
Expand Down

0 comments on commit 16a9a31

Please sign in to comment.