Skip to content

Commit

Permalink
Add a dataset 1.2.0 tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Cadair committed Oct 23, 2023
1 parent 5448526 commit 1d5f53f
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
4 changes: 3 additions & 1 deletion dkist/io/asdf/converters/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

class DatasetConverter(Converter):
tags = [
"asdf://dkist.nso.edu/tags/dataset-1.2.0",
"asdf://dkist.nso.edu/tags/dataset-1.1.0",
"asdf://dkist.nso.edu/tags/dataset-1.0.0",
"tag:dkist.nso.edu:dkist/dataset-0.3.0",
Expand All @@ -29,7 +30,8 @@ def from_yaml_tree(self, node, tag, ctx):
mask = node.get("mask")

# If we have a tag older than 1.2.0 then we are going to see if we can
# find a stokes table
# find a stokes table, and if we do then we are going to change it to be
# compatible with gWCS 0.19
if tag_version[0] == 0 or (tag_version[0] == 1 and tag_version[1] < 2):
# Put imports here to reduce import time on entry point load
import numpy as np
Expand Down
2 changes: 2 additions & 0 deletions dkist/io/asdf/entry_points.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ def get_extensions():
dkist_converters = [FileManagerConverter(), DatasetConverter(), TiledDatasetConverter()]
wcs_converters = [VaryingCelestialConverter(), CoupledCompoundConverter(), RavelConverter(), AsymmetricMappingConverter()]
return [
ManifestExtension.from_uri("asdf://dkist.nso.edu/manifests/dkist-1.2.0",
converters=dkist_converters),
ManifestExtension.from_uri("asdf://dkist.nso.edu/manifests/dkist-1.1.0",
converters=dkist_converters),
ManifestExtension.from_uri("asdf://dkist.nso.edu/manifests/dkist-1.0.0",
Expand Down
14 changes: 14 additions & 0 deletions dkist/io/asdf/resources/manifests/dkist-1.2.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
%YAML 1.1
---
id: asdf://dkist.nso.edu/dkist/manifests/dkist-1.2.0
extension_uri: asdf://dkist.nso.edu/dkist/extensions/dkist-1.0.0
title: DKIST extension
description: ASDF schemas and tags for DKIST classes.

tags:
- schema_uri: "asdf://dkist.nso.edu/schemas/file_manager-1.0.0"
tag_uri: "asdf://dkist.nso.edu/tags/file_manager-1.0.0"
- schema_uri: "asdf://dkist.nso.edu/schemas/dataset-1.2.0"
tag_uri: "asdf://dkist.nso.edu/tags/dataset-1.2.0"
- schema_uri: "asdf://dkist.nso.edu/schemas/tiled_dataset-1.0.0"
tag_uri: "asdf://dkist.nso.edu/tags/tiled_dataset-1.0.0"

0 comments on commit 1d5f53f

Please sign in to comment.