Skip to content

Commit

Permalink
more fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bsipocz committed Jan 28, 2023
1 parent 4ac94d6 commit 4540a48
Show file tree
Hide file tree
Showing 13 changed files with 92 additions and 90 deletions.
4 changes: 4 additions & 0 deletions docs/auth/index.rst
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
.. _pyvo-auth:

******************
Auth (`pyvo.auth`)
******************

This module contains submodules which help handle auth when
communicating with virtual observatory services.

Reference/API
=============

.. automodapi:: pyvo.auth
:no-inheritance-diagram:
2 changes: 1 addition & 1 deletion docs/dal/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ return more than 10000 rows”).

This information is contained in the datastructure
:py:class:`~pyvo.io.vosi.endpoint.CapabilitiesFile` available through
:py:attr:`~pyvo.dal.mixin.CapabilityMixin.capabilities`.
:py:attr:`~pyvo.dal.CapabilityMixin.capabilities`.

Exceptions
----------
Expand Down
32 changes: 16 additions & 16 deletions docs/registry/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,35 +42,35 @@ This function accepts one or more search constraints, which can be
either specificed using constraint objects as positional arguments or as
keyword arguments. The following constraints are available:

* :py:class:`pyvo.registry.Freetext` (``keywords``): one or more
* :py:class:`~pyvo.registry.Freetext` (``keywords``): one or more
freetext words, mached in the title, description or subject of the
resource.
* :py:class:`pyvo.registry.Servicetype` (``servicetype``): constrain to
* :py:class:`~pyvo.registry.Servicetype` (``servicetype``): constrain to
one of tap, ssa, sia, conesearch (or full ivoids for other service
types). This is the constraint you want
to use for service discovery.
* :py:class:`pyvo.registry.UCD` (``ucd``): constrain by one or more UCD
* :py:class:`~pyvo.registry.UCD` (``ucd``): constrain by one or more UCD
patterns; resources match when they serve columns having a matching
UCD (e.g., ``phot.mag;em.ir.%`` for “any infrared magnitude”).
* :py:class:`pyvo.registry.Waveband` (``waveband``): one or more terms
* :py:class:`~pyvo.registry.Waveband` (``waveband``): one or more terms
from the vocabulary at http://www.ivoa.net/rdf/messenger giving the rough
spectral location of the resource.
* :py:class:`pyvo.registry.Author` (``author``): an author (“creator”).
* :py:class:`~pyvo.registry.Author` (``author``): an author (“creator”).
This is a single SQL pattern, and given the sloppy practices in the
VO for how to write author names, you should probably generously use
wildcards.
* :py:class:`pyvo.registry.Datamodel` (``datamodel``): one of obscore,
* :py:class:`~pyvo.registry.Datamodel` (``datamodel``): one of obscore,
epntap, or regtap: only return TAP services having tables of this
kind.
* :py:class:`pyvo.registry.Ivoid` (``ivoid``): exactly match a single
* :py:class:`~pyvo.registry.Ivoid` (``ivoid``): exactly match a single
IVOA identifier (that is, in effect, the primary key in the VO).
* :py:class:`pyvo.registry.Spatial` (``spatial``): match resources
* :py:class:`~pyvo.registry.Spatial` (``spatial``): match resources
covering a certain geometry (point, circle, polygon, or MOC).
*RegTAP 1.2 Extension*
* :py:class:`pyvo.registry.Spectral` (``spectral``): match resources
* :py:class:`~pyvo.registry.Spectral` (``spectral``): match resources
covering a certain part of the spectrum (usually, but not limited to,
the electromagnetic spectrum). *RegTAP 1.2 Extension*
* :py:class:`pyvo.registry.Temporal` (``temporal``): match resources
* :py:class:`~pyvo.registry.Temporal` (``temporal``): match resources
covering a some point or interval in time. *RegTAP 1.2 Extension*

Multiple constraints are combined conjunctively (”AND”).
Expand Down Expand Up @@ -109,7 +109,7 @@ is equivalent to:

>>> resources = registry.search(waveband=["Radio", "Millimeter"])

There is also :py:meth:`pyvo.registry.get_RegTAP_query`, accepting the
There is also :py:meth:`~pyvo.registry.get_RegTAP_query`, accepting the
same arguments as :py:meth:`pyvo.registry.search`. This function simply
returns the ADQL query that search would execute. This is may be useful
to construct custom RegTAP queries, which could then be executed on
Expand All @@ -130,7 +130,7 @@ you would say:
... registry.Freetext("supernova"))

After that, ``resources`` is an instance of
:py:class:`pyvo.registry.RegistryResults`, which you can iterate over. In
:py:class:`~pyvo.registry.regtap.RegistryResults`, which you can iterate over. In
interactive data discovery, however, it is usually preferable to use the
``to_table`` method for an overview of the resources available:

Expand All @@ -152,7 +152,7 @@ title, description, and perhaps the access mode (“interface”) offered.
In the list of interfaces, you will sometimes spot an ``#aux`` after a
standard id; this is a minor VO technicality that you can in practice
ignore. For instance, you can simply construct
:py:class:`pyvo.dal.TAPService`-s from ``tap#aux`` interfaces.
:py:class:`~pyvo.dal.TAPService`-s from ``tap#aux`` interfaces.

Once you have found a resource you would like to query, you can pick it
by index; however,
Expand All @@ -164,7 +164,7 @@ are not), but it is rather clunky, and in the real VO short name
collisions should be very rare.

Use the ``get_service`` method of
:py:class:`pyvo.registry.RegistryResource` to obtain a DAL service
:py:class:`~pyvo.registry.regtap.RegistryResource` to obtain a DAL service
object for a particular sort of interface.
To query the fourth match using simple cone search, you would
thus say:
Expand Down Expand Up @@ -285,7 +285,7 @@ What is coming back from registry.search is rather similar to
the ``to_tables`` method discussed above.

The individual items are instances of
:py:class:`pyvo.registry.regtap.RegistryResource`, which expose many
:py:class:`~pyvo.registry.regtap.RegistryResource`, which expose many
pieces of metadata (e.g., title, description, creators, etc) in
attributes named like their RegTAP counterparts (see the class
documentation). A few attributes deserve a second look.
Expand Down Expand Up @@ -354,7 +354,7 @@ should catch errors and, at least in interactive sessions, provide some
way to interrupt overly long queries. Here is an example for how to
query all obscore services; remove the ``break`` at the end of the loop
to actually do the global query (it's there so that you don't blindly
run all-VO queries without reading at least this sentence)::
run all-VO queries without reading at least this sentence):

.. doctest-remote-data::

Expand Down
2 changes: 1 addition & 1 deletion docs/utils/index.rst
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.. _pyvo.utils:
.. _pyvo-utils:

*************************
PyVO utils (`pyvo.utils`)
Expand Down
20 changes: 10 additions & 10 deletions pyvo/dal/adhoc.py
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ class DatalinkQuery(DALQuery):
The base URL for the query, which controls where the query will be sent
when one of the execute functions is called, is typically set at
construction time; however, it can be updated later via the
:py:attr:`~pyvo.dal.query.DALQuery.baseurl` to send a configured
:py:attr:`~pyvo.dal.DALQuery.baseurl` to send a configured
query to another service.
A session can also optionally be passed in that will be used for
Expand Down Expand Up @@ -457,33 +457,33 @@ class DatalinkResults(DatalinkResultsMixin, DALResults):
This class supports iterable semantics; thus,
individual records (in the form of
:py:class:`~pyvo.dal.query.Record` instances) are typically
:py:class:`~pyvo.dal.Record` instances) are typically
accessed by iterating over an ``DatalinkResults`` instance.
Alternatively, records can be accessed randomly via
:py:meth:`getrecord` or through a Python Database API (v2)
Cursor (via :py:meth:`~pyvo.dal.query.DALResults.cursor`).
Cursor (via :py:meth:`~pyvo.dal.DALResults.cursor`).
Column-based data access is possible via the
:py:meth:`~pyvo.dal.query.DALResults.getcolumn` method.
:py:meth:`~pyvo.dal.DALResults.getcolumn` method.
``DatalinkResults`` is essentially a wrapper around an Astropy
:py:mod:`~astropy.io.votable`
:py:class:`~astropy.io.votable.tree.Table` instance where the
columns contain the various metadata describing the images.
One can access that VOTable directly via the
:py:attr:`~pyvo.dal.query.DALResults.votable` attribute. Thus,
:py:attr:`~pyvo.dal.DALResults.votable` attribute. Thus,
when one retrieves a whole column via
:py:meth:`~pyvo.dal.query.DALResults.getcolumn`, the result is
:py:meth:`~pyvo.dal.DALResults.getcolumn`, the result is
a Numpy array. Alternatively, one can manipulate the results
as an Astropy :py:class:`~astropy.table.table.Table` via the
as an Astropy :py:class:`~astropy.table.Table` via the
following conversion:
``table = results.to_table()``
``DatalinkResults`` supports the array item operator ``[...]`` in a
read-only context. When the argument is numerical, the result
is an
:py:class:`~pyvo.dal.query.Record` instance, representing the
:py:class:`~pyvo.dal.Record` instance, representing the
record at the position given by the numerical index. If the
argument is a string, it is interpreted as the name of a column,
and the data from the column matching that name is returned as
Expand All @@ -495,7 +495,7 @@ def getrecord(self, index):
return a representation of a datalink result record that follows
dictionary semantics. The keys of the dictionary are those returned by
this instance's fieldnames attribute. The returned record has the
additional function :py:meth:`~pyvo.dal.query.DALResults.getdataset`
additional function :py:meth:`~pyvo.dal.DALResults.getdataset`
Parameters
----------
Expand Down Expand Up @@ -786,7 +786,7 @@ def getdataurl(self):
"""
return the URL contained in the access URL column which can be used
to retrieve the dataset described by this record. Raises
:py:class:`~pyvo.dal.query.DALServiceError` if theres an error.
:py:class:`~pyvo.dal.DALServiceError` if theres an error.
"""
if self.error_message:
raise DALServiceError(self.error_message)
Expand Down
18 changes: 9 additions & 9 deletions pyvo/dal/scs.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ def search(url, pos, radius=1.0, verbosity=2, **keywords):
See Also
--------
SCSResults
pyvo.dal.query.DALServiceError
pyvo.dal.query.DALQueryError
pyvo.dal.DALServiceError
pyvo.dal.DALQueryError
"""
return SCSService(url).search(pos, radius, verbosity, **keywords)

Expand Down Expand Up @@ -181,8 +181,8 @@ def search(self, pos, radius=1.0, verbosity=2, **keywords):
See Also
--------
SCSResults
pyvo.dal.query.DALServiceError
pyvo.dal.query.DALQueryError
pyvo.dal.DALServiceError
pyvo.dal.DALQueryError
"""
return self.create_query(pos, radius, verbosity, **keywords).execute()

Expand Down Expand Up @@ -262,7 +262,7 @@ class SCSQuery(DALQuery):
The base URL for the query, which controls where the query will be sent
when one of the execute functions is called, is typically set at
construction time; however, it can be updated later via the
:py:attr:`~pyvo.dal.query.DALQuery.baseurl` to send a configured
:py:attr:`~pyvo.dal.DALQuery.baseurl` to send a configured
query to another service.
In addition to the search constraint attributes described below, search
Expand Down Expand Up @@ -428,18 +428,18 @@ class SCSResults(DatalinkResultsMixin, DALResults):
Alternatively, records can be accessed randomly via
:py:meth:`getrecord` or through a Python Database API (v2)
Cursor (via :py:meth:`~pyvo.dal.query.DALResults.cursor`).
Cursor (via :py:meth:`~pyvo.dal.DALResults.cursor`).
Column-based data access is possible via the
:py:meth:`~pyvo.dal.query.DALResults.getcolumn` method.
:py:meth:`~pyvo.dal.DALResults.getcolumn` method.
``SCSResults`` is essentially a wrapper around an Astropy
:py:mod:`~astropy.io.votable`
:py:class:`~astropy.io.votable.tree.Table` instance where the
columns contain the various metadata describing the images.
One can access that VOTable directly via the
:py:attr:`~pyvo.dal.query.DALResults.votable` attribute. Thus,
:py:attr:`~pyvo.dal.DALResults.votable` attribute. Thus,
when one retrieves a whole column via
:py:meth:`~pyvo.dal.query.DALResults.getcolumn`, the result is
:py:meth:`~pyvo.dal.DALResults.getcolumn`, the result is
a Numpy array. Alternatively, one can manipulate the results
as an Astropy :py:class:`~astropy.table.table.Table` via the
following conversion:
Expand Down
18 changes: 9 additions & 9 deletions pyvo/dal/sia.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ def search(
See Also
--------
SIAResults
pyvo.dal.query.DALServiceError
pyvo.dal.query.DALQueryError
pyvo.dal.DALServiceError
pyvo.dal.DALQueryError
"""
service = SIAService(url)
return service.search(pos, size, format, intersect, verbosity, **keywords)
Expand Down Expand Up @@ -251,8 +251,8 @@ def search(
See Also
--------
SIAResults
pyvo.dal.query.DALServiceError
pyvo.dal.query.DALQueryError
pyvo.dal.DALServiceError
pyvo.dal.DALQueryError
"""
return self.create_query(
pos, size, format, intersect, verbosity, **keywords).execute()
Expand Down Expand Up @@ -333,7 +333,7 @@ class SIAQuery(DALQuery):
The base URL for the query, which controls where the query will be sent
when one of the execute functions is called, is typically set at
construction time; however, it can be updated later via the
:py:attr:`~pyvo.dal.query.DALQuery.baseurl` to send a configured
:py:attr:`~pyvo.dal.DALQuery.baseurl` to send a configured
query to another service.
In addition to the search constraint attributes described below, search
Expand Down Expand Up @@ -588,18 +588,18 @@ class SIAResults(DatalinkResultsMixin, DALResults):
Alternatively, records can be accessed randomly via
:py:meth:`getrecord` or through a Python Database API (v2)
Cursor (via :py:meth:`~pyvo.dal.query.DALResults.cursor`).
Cursor (via :py:meth:`~pyvo.dal.DALResults.cursor`).
Column-based data access is possible via the
:py:meth:`~pyvo.dal.query.DALResults.getcolumn` method.
:py:meth:`~pyvo.dal.DALResults.getcolumn` method.
``SIAResults`` is essentially a wrapper around an Astropy
:py:mod:`~astropy.io.votable`
:py:class:`~astropy.io.votable.tree.Table` instance where the
columns contain the various metadata describing the images.
One can access that VOTable directly via the
:py:attr:`~pyvo.dal.query.DALResults.votable` attribute. Thus,
:py:attr:`~pyvo.dal.DALResults.votable` attribute. Thus,
when one retrieves a whole column via
:py:meth:`~pyvo.dal.query.DALResults.getcolumn`, the result is
:py:meth:`~pyvo.dal.DALResults.getcolumn`, the result is
a Numpy array. Alternatively, one can manipulate the results
as an Astropy :py:class:`~astropy.table.table.Table` via the
following conversion:
Expand Down
14 changes: 7 additions & 7 deletions pyvo/dal/sia2.py
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ def search(self, pos=None, band=None, time=None, pol=None,

class SIAQuery(DALQuery, AxisParamMixin):
"""
a class very similar to :py:attr:`~pyvo.dal.query.SIAQuery` class but
a class very similar to :py:attr:`~pyvo.dal.SIAQuery` class but
used to interact with SIAv2 services.
"""

Expand Down Expand Up @@ -259,8 +259,8 @@ def __init__(self, url, pos=None, band=None, time=None, pol=None,
See Also
--------
SIAResults
pyvo.dal.query.DALServiceError
pyvo.dal.query.DALQueryError
pyvo.dal.DALServiceError
pyvo.dal.DALQueryError
"""
super().__init__(url, session=session)
Expand Down Expand Up @@ -466,18 +466,18 @@ class SIAResults(DatalinkResultsMixin, DALResults):
Alternatively, records can be accessed randomly via
:py:meth:`getrecord` or through a Python Database API (v2)
Cursor (via :py:meth:`~pyvo.dal.query.DALResults.cursor`).
Cursor (via :py:meth:`~pyvo.dal.DALResults.cursor`).
Column-based data access is possible via the
:py:meth:`~pyvo.dal.query.DALResults.getcolumn` method.
:py:meth:`~pyvo.dal.DALResults.getcolumn` method.
``SIAResults`` is essentially a wrapper around an Astropy
:py:mod:`~astropy.io.votable`
:py:class:`~astropy.io.votable.tree.Table` instance where the
columns contain the various metadata describing the images.
One can access that VOTable directly via the
:py:attr:`~pyvo.dal.query.DALResults.votable` attribute. Thus,
:py:attr:`~pyvo.dal.DALResults.votable` attribute. Thus,
when one retrieves a whole column via
:py:meth:`~pyvo.dal.query.DALResults.getcolumn`, the result is
:py:meth:`~pyvo.dal.DALResults.getcolumn`, the result is
a Numpy array. Alternatively, one can manipulate the results
as an Astropy :py:class:`~astropy.table.table.Table` via the
following conversion:
Expand Down
14 changes: 7 additions & 7 deletions pyvo/dal/sla.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,8 @@ def search(self, wavelength, **keywords):
See Also
--------
SLAResults
pyvo.dal.query.DALServiceError
pyvo.dal.query.DALQueryError
pyvo.dal.DALServiceError
pyvo.dal.DALQueryError
"""
return self.create_query(wavelength, **keywords).execute()

Expand Down Expand Up @@ -229,7 +229,7 @@ class SLAQuery(DALQuery):
The base URL for the query, which controls where the query will be sent
when one of the execute functions is called, is typically set at
construction time; however, it can be updated later via the
:py:attr:`~pyvo.dal.query.DALQuery.baseurl` to send a configured
:py:attr:`~pyvo.dal.DALQuery.baseurl` to send a configured
query to another service.
In addition to the search constraint attributes described below, search
Expand Down Expand Up @@ -361,18 +361,18 @@ class SLAResults(DALResults):
Alternatively, records can be accessed randomly via
:py:meth:`getrecord` or through a Python Database API (v2)
Cursor (via :py:meth:`~pyvo.dal.query.DALResults.cursor`).
Cursor (via :py:meth:`~pyvo.dal.DALResults.cursor`).
Column-based data access is possible via the
:py:meth:`~pyvo.dal.query.DALResults.getcolumn` method.
:py:meth:`~pyvo.dal.DALResults.getcolumn` method.
``SLAResults`` is essentially a wrapper around an Astropy
:py:mod:`~astropy.io.votable`
:py:class:`~astropy.io.votable.tree.Table` instance where the
columns contain the various metadata describing the images.
One can access that VOTable directly via the
:py:attr:`~pyvo.dal.query.DALResults.votable` attribute. Thus,
:py:attr:`~pyvo.dal.DALResults.votable` attribute. Thus,
when one retrieves a whole column via
:py:meth:`~pyvo.dal.query.DALResults.getcolumn`, the result is
:py:meth:`~pyvo.dal.DALResults.getcolumn`, the result is
a Numpy array. Alternatively, one can manipulate the results
as an Astropy :py:class:`~astropy.table.table.Table` via the
following conversion:
Expand Down
Loading

0 comments on commit 4540a48

Please sign in to comment.