Skip to content

Commit

Permalink
Now accepting sia1 as an alias for sia in registry.Servicetype.
Browse files Browse the repository at this point in the history
That's so there is a symmetry to sia2.  When further version 2-standards
appear, I'd suggest we continue that pattern: The official IVOA short name
(without numbers in version 1) remains, but a preferred alias with a 1 is
added in pyVO.

Would it make sense to convince the IVOA to add the 1 to their short names?
Well, it would have all these years ago.  Now... I think it would just
increase the confusion.
  • Loading branch information
msdemlei committed Aug 8, 2024
1 parent 3bb54e5 commit 5344176
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
6 changes: 4 additions & 2 deletions pyvo/registry/rtcons.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
for k, v in [
("image", "sia"),
("sia", "sia"),
("sia1", "sia"),
# SIA2 is irregular
# funky scheme used by SIA2 without breaking everything else
("spectrum", "ssa"),
Expand Down Expand Up @@ -358,14 +359,15 @@ class Servicetype(Constraint):
The constraint normally is a custom keyword, one of:
* ``sia`` (SIAP version 1 services)
* ``sia``, ``sia1`` (SIAP version 1 services; prefer ``sia1`` for symmetry,
although ``sia`` will be kept as the official IVOA short name for SIA1)
* ``sia2`` (SIAP version 2 services)
* ``ssa``, ``ssap`` (synonymous for SSAP services)
* ``scs``, ``conesearch`` (synonymous for cone search services, prefer
``scs``)
* ``line`` (for SLAP services)
* ``tap``, ``table`` (synonymous for TAP services, prefer ``tap``)
* ``image`` (a deprecated alias for sia)
* ``image`` (a deprecated alias for sia1)
* ``spectrum`` (a deprecated alias for ssap)
You can also pass in the standards' ivoid (which
Expand Down
4 changes: 2 additions & 2 deletions pyvo/registry/tests/test_rtcons.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ def test_multi(self):
" 'ivo://ivoa.net/std/sia')")

def test_includeaux(self):
assert (rtcons.Servicetype("http://extstandards/invention", "sia"
assert (rtcons.Servicetype("http://extstandards/invention", "sia1"
).include_auxiliary_services().get_search_condition(FAKE_GAVO)
== "standard_id IN ('http://extstandards/invention',"
" 'http://extstandards/invention#aux',"
Expand All @@ -161,7 +161,7 @@ def test_junk_rejected(self):
rtcons.Servicetype("junk")
assert str(excinfo.value) == ("Service type junk is neither"
" a full standard URI nor one of the bespoke identifiers"
" image, sia, spectrum, ssap, ssa, scs, conesearch, line, slap,"
" image, sia, sia1, spectrum, ssap, ssa, scs, conesearch, line, slap,"
" table, tap, sia2")

def test_legacy_term(self):
Expand Down

0 comments on commit 5344176

Please sign in to comment.