Skip to content

Commit

Permalink
TST: skipping and xfailing tests failing due to #361
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Sep 21, 2022
1 parent ca6a640 commit 217c041
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
27 changes: 17 additions & 10 deletions docs/dal/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,8 @@ The total number of rows in the answer is available as its ``len()``:

If the row contains datasets, they are exposed by several retrieval methods:

.. doctest-remote-data::
.. remove skip once https://github.com/astropy/pyvo/issues/361 is fixed
.. doctest-skip::

>>> url = row.getdataurl()
>>> fileobj = row.getdataset()
Expand Down Expand Up @@ -475,7 +476,8 @@ To get an iterator yielding specific datasets, call
:py:meth:`pyvo.dal.adhoc.DatalinkResults.bysemantics` with the identifier
identifying the dataset you want it to return.

.. doctest-remote-data::
.. remove skip once https://github.com/astropy/pyvo/issues/361 is fixed
.. doctest-skip::

>>> preview = next(row.getdatalink().bysemantics('#preview')).getdataset()

Expand All @@ -485,7 +487,8 @@ identifying the dataset you want it to return.

Of course one can also build a datalink object from it's url.

.. doctest-remote-data::
.. TODO: define DatalinkResults
.. doctest-skip::

>>> datalink = DatalinkResults.from_result_url(url)

Expand All @@ -500,35 +503,38 @@ Datalink
Generic access to processing services is provided through the datalink
interface.

.. doctest-remote-data::
.. remove skip once https://github.com/astropy/pyvo/issues/361 is fixed
.. doctest-skip::

>>> datalink_proc = next(row.getdatalink().bysemantics('#proc'))

.. note::
most times there is only one processing service per result, and thats all you
need.

.. doctest-remote-data::

>>> datalink_proc = row.getdatalink().get_first_proc()

The returned object lets you access the available input parameters which you
can pass as keywords to the ``process`` method.

.. doctest-remote-data::
.. remove skip once https://github.com/astropy/pyvo/issues/361 is fixed
.. doctest-skip::

>>> datalink_proc = row.getdatalink().get_first_proc()
>>> print(datalink_proc.input_params)

>>> print(datalink_proc.input_params)

For more details about this have a look at
:py:class:`astropy.io.votable.tree.Param`.

Calling the method will return a file-like object on sucess.

.. doctest-remote-data::
.. remove skip once https://github.com/astropy/pyvo/issues/361 is fixed
.. doctest-skip::

>>> print(datalink_proc)
>>> fobj = datalink.process(circle=(1, 1, 1))


SODA
^^^^
SODA is a service with predefined parameters, available on row-level through
Expand All @@ -544,6 +550,7 @@ parameters who are dependend on the type of service.
:py:class:`astropy.units.Quantity` with two bandwitdh values. The right sort
order will be ensured if converting from frequency to wavelength.


Interoperabillity over SAMP
---------------------------
Tables and datasets can be send to other astronomical applications, providing
Expand Down
1 change: 1 addition & 0 deletions pyvo/dal/tests/test_sia2_remote.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def test_service(self):
assert cadc.availability.notes[0] == 'service is accepting queries'
assert cadc.capabilities

@pytest.mark.xfail(reason="https://github.com/astropy/pyvo/issues/361")
@pytest.mark.filterwarnings("ignore::pyvo.dal.exceptions.DALOverflowWarning")
def test_datalink_batch(self):
# Maximum batch size in CADC SIA is around 25
Expand Down

0 comments on commit 217c041

Please sign in to comment.