Skip to content

Commit d5582a1

Browse files
authored
Merge pull request #583 from bsipocz/servicetype_sia1
Adding `sia1` as servicetype
2 parents 32d3a7c + babcc5e commit d5582a1

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

CHANGES.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ Deprecations and Removals
5252
- SodaRecordMixin no longer will use a datalink#links endpoint for soda [#580]
5353

5454

55+
1.5.3 (unreleased)
56+
==================
57+
58+
- Added `'sia1'` as servicetype for registry searches. [#583]
59+
60+
5561
1.5.2 (2024-05-22)
5662
==================
5763

docs/registry/index.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ keyword arguments. The following constraints are available:
4848
freetext words, mached in the title, description or subject of the
4949
resource.
5050
* :py:class:`~pyvo.registry.Servicetype` (``servicetype``): constrain to
51-
one of tap, ssa, sia, conesearch (or full ivoids for other service
51+
one of tap, ssa, sia1, sia2, conesearch (or full ivoids for other service
5252
types). This is the constraint you want
5353
to use for service discovery.
5454
* :py:class:`~pyvo.registry.UCD` (``ucd``): constrain by one or more UCD
@@ -358,7 +358,7 @@ it returns 33 matching services.
358358
>>> import warnings
359359
>>> warnings.filterwarnings('ignore', module="astropy.io.votable.*")
360360
>>>
361-
>>> archives = vo.regsearch(servicetype='image', waveband='x-ray')
361+
>>> archives = vo.regsearch(servicetype='sia1', waveband='x-ray')
362362
>>> pos = SkyCoord.from_name('Cas A')
363363
>>> len(archives) # doctest: +IGNORE_OUTPUT
364364
33
@@ -404,7 +404,7 @@ NRAO VLA Sky Survey (NVSS):
404404

405405
.. doctest-remote-data::
406406

407-
>>> colls = vo.regsearch(keywords=['NVSS'], servicetype='sia')
407+
>>> colls = vo.regsearch(keywords=['NVSS'], servicetype='sia1')
408408
>>> for coll in colls:
409409
... print(coll.res_title, coll.access_url)
410410
NRA) VLA Sky Survey https://skyview.gsfc.nasa.gov/cgi-bin/vo/sia.pl?survey=nvss&
@@ -428,7 +428,7 @@ documentation). Some attributes deserve a second look.
428428
.. doctest-remote-data::
429429

430430
>>> import pyvo as vo
431-
>>> colls = vo.regsearch(keywords=["NVSS"], servicetype='sia')
431+
>>> colls = vo.regsearch(keywords=["NVSS"], servicetype='sia1')
432432
>>> nvss = colls["NVSS"]
433433
>>> nvss.res_title
434434
'NRA) VLA Sky Survey'
@@ -492,7 +492,7 @@ that takes the form of a
492492

493493
.. doctest-remote-data::
494494

495-
>>> colls = vo.regsearch(keywords=["NVSS"], servicetype='sia')
495+
>>> colls = vo.regsearch(keywords=["NVSS"], servicetype='sia1')
496496
>>> for coll in colls:
497497
... print(coll.ivoid)
498498
ivo://nasa.heasarc/skyview/nvss
@@ -503,7 +503,7 @@ registry.
503503

504504
.. doctest-remote-data::
505505

506-
>>> nvss = vo.registry.search(ivoid='ivo://nasa.heasarc/skyview/nvss')[0].get_service(service_type='sia')
506+
>>> nvss = vo.registry.search(ivoid='ivo://nasa.heasarc/skyview/nvss')[0].get_service(service_type='sia1')
507507
>>> nvss.search(pos=(350.85, 58.815),size=0.25,format="image/fits")
508508
<DALResultsTable length=1>
509509
Survey Ra ... LogicalName

pyvo/registry/rtcons.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
for k, v in [
3535
("image", "sia"),
3636
("sia", "sia"),
37+
("sia1", "sia"),
3738
# SIA2 is irregular
3839
# funky scheme used by SIA2 without breaking everything else
3940
("spectrum", "ssa"),
@@ -356,16 +357,18 @@ class Servicetype(Constraint):
356357
357358
The constraint normally is a custom keyword, one of:
358359
359-
* ``image`` (image services; at this point equivalent to sia, but
360-
scheduled to include sia2, too)
361-
* ``sia`` (SIAP version 1 services)
360+
361+
* ``sia``, ``sia1`` (SIAP version 1 services; prefer ``sia1`` for symmetry,
362+
although ``sia`` will be kept as the official IVOA short name for SIA1)
362363
* ``sia2`` (SIAP version 2 services)
363364
* ``spectrum``, ``ssa``, ``ssap`` (all synonymous for spectral
364365
services, prefer ``spectrum``)
365366
* ``scs``, ``conesearch`` (synonymous for cone search services, prefer
366367
``scs``)
367368
* ``line`` (for SLAP services)
368369
* ``tap``, ``table`` (synonymous for TAP services, prefer ``tap``)
370+
* ``image`` (a to be deprecated alias for sia1)
371+
* ``spectrum`` (a to be deprecated alias for ssap)
369372
370373
You can also pass in the standards' ivoid (which
371374
generally looks like

pyvo/registry/tests/test_rtcons.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def test_multi(self):
147147
" 'ivo://ivoa.net/std/sia')")
148148

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

165165
def test_legacy_term(self):

0 commit comments

Comments
 (0)