Repository: astropy/asdf-astropy

Issue:
Add support for multiple tags in a single FrameConverter
Don't assume that `tag` is always a string.

Discussion:
Cadair: Yep I think so

Patch:
diff --git a/CHANGES.rst b/CHANGES.rst
index e042f01..24510a6 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -4,6 +4,7 @@
 - Add converter for the new ``Schechter1D`` model. [#67]
 - Add CITATION file. [#71]
 - Add migration and quick-start documentation guides, and update minimum Python version [#77]
+- Update ``FrameConverter`` to enable the use of multiple tags. [#81]
 
 0.2.1 (2022-04-18)
 ------------------
diff --git a/asdf_astropy/converters/coordinates/frame.py b/asdf_astropy/converters/coordinates/frame.py
index 11434ef..eafa36d 100644
--- a/asdf_astropy/converters/coordinates/frame.py
+++ b/asdf_astropy/converters/coordinates/frame.py
@@ -4,14 +4,17 @@ from ..utils import import_type
 
 
 class FrameConverter(Converter):
-    def __init__(self, tag, frame_type_name):
-        self._tag = tag
+    def __init__(self, tags, frame_type_name):
         self._frame_type_name = frame_type_name
         self._frame_type = None
 
+        if isinstance(tags, str):
+            tags = [tags]
+        self._tags = tags
+
     @property
     def tags(self):
-        return [self._tag]
+        return self._tags
 
     @property
     def types(self):


Test patch:
diff --git a/asdf_astropy/converters/coordinates/tests/test_frame.py b/asdf_astropy/converters/coordinates/tests/test_frame.py
index 4a5b5e8..103b90d 100644
--- a/asdf_astropy/converters/coordinates/tests/test_frame.py
+++ b/asdf_astropy/converters/coordinates/tests/test_frame.py
@@ -21,6 +21,7 @@ from astropy.coordinates import (
 )
 from astropy.time import Time
 
+from asdf_astropy.converters.coordinates.frame import FrameConverter
 from asdf_astropy.testing.helpers import assert_frame_equal
 
 
@@ -68,3 +69,8 @@ def test_serialization(frame, tmp_path):
 
     with asdf.open(file_path) as af:
         assert_frame_equal(af["frame"], frame)
+
+
+def test_tags():
+    converter = FrameConverter(["tag1", "tag2"], "test")
+    assert converter.tags == ["tag1", "tag2"]