Skip to content

Commit

Permalink
Merge branch 'main' into MAINT_manifest_and_setup
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian authored Oct 24, 2022
2 parents 37dc0fa + a7f247f commit a39a756
Show file tree
Hide file tree
Showing 21 changed files with 30 additions and 35 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cibuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ jobs:
- name: py310 with online tests, Linux
python-version: '3.10'
tox_env: py310-test-alldeps-online
- name: linkcheck
python-version: '3.10'
tox_env: linkcheck

steps:
- name: Checkout code
Expand Down
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PyVO
===================================

.. image:: http://img.shields.io/badge/powered%20by-AstroPy-orange.svg?style=flat
:target: http://www.astropy.org
:target: https://www.astropy.org
:alt: Powered by Astropy Badge

.. image:: https://github.com/astropy/pyvo/workflows/CI/badge.svg?branch=main
Expand Down
6 changes: 3 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Introduction
------------

This is the documentation for PyVO, an affiliated package for the
`astropy <http://www.astropy.org>`__ package.
`astropy <https://www.astropy.org>`__ package.

PyVO lets you find and retrieve astronomical data available from archives that
support standard `IVOA <http://www.ivoa.net/>`__ virtual observatory service
Expand All @@ -25,7 +25,7 @@ protocols.
.. note::
If you need to access data which is not available via the Virtual Observatory
standards, try the astropy affiliated package
`astroquery <http://astroquery.readthedocs.io/en/latest/>`__ (and, of
`astroquery <https://astroquery.readthedocs.io/en/latest/>`__ (and, of
course, ask the data providers to do the right thing and use the proper
standards for their publication).

Expand Down Expand Up @@ -134,4 +134,4 @@ Using `pyvo`
registry/index
io/index
auth/index
prototypes/index
utils/prototypes
4 changes: 3 additions & 1 deletion docs/registry/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ There are two fundamental modes of searching in the VO:
Both modes are supported by this module.


.. _registry-basic-interface:

Basic interface
===============

Expand All @@ -51,7 +53,7 @@ keyword arguments. The following constraints are available:
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
from the vocabulary at http://www.ivoa.net/messenger giving the rough
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”).
This is a single SQL pattern, and given the sloppy practices in the
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/basic.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/dataset.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/errorstatus.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="ERROR">ERROR</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/firstresource.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/missingcolumns.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/missingresource.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd"/>
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/missingtable.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/overflowstatus.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK"/>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/rootinfo.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
<RESOURCE type="results">
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/query/tableinfo.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 5.0.1
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.4" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.ivoa.net/xml/VOTable/v1.3 http://www.ivoa.net/xml/VOTable/VOTable-1.4.xsd">
<RESOURCE type="results">
<TABLE>
Expand Down
2 changes: 1 addition & 1 deletion pyvo/dal/tests/data/sia/dataset.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Produced with astropy.io.votable version 3.1.dev21501
http://www.astropy.org/ -->
https://www.astropy.org/ -->
<VOTABLE version="1.3" xmlns="http://www.ivoa.net/xml/VOTable/v1.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.ivoa.net/xml/VOTable/v1.3">
<RESOURCE type="results">
<INFO ID="QUERY_STATUS" name="QUERY_STATUS" value="OK">OK</INFO>
Expand Down
4 changes: 1 addition & 3 deletions pyvo/registry/regtap.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,8 @@ def search(*constraints: rtcons.Constraint, includeaux: bool = False, maxrec: in
The function accepts query constraints either as Constraint objects
passed in as positional arguments or as their associated keywords.
For what constraints are available, see
`Basic Interface`_.
For what constraints are available, see ref:`registry_basic_interface`.
.. _Basic Interface: ../registry/index.html#basic-interface
The values of keyword arguments may be tuples or lists when the associated
Constraint objects take multiple arguments.
Expand Down
4 changes: 2 additions & 2 deletions pyvo/registry/rtcons.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class Waveband(Constraint):
This builds a constraint against rr.resource.waveband, i.e.,
a verbal indication of the messenger particle, coming
from the IVOA vocabulary http://www.ivoa.net/messenger.
from the IVOA vocabulary http://www.ivoa.net/rdf/messenger.
The :py:class:`pyvo.registry.Spectral` constraint enables selections by particle energy,
but few resources actually give the necessary metadata (in 2021).
Expand All @@ -341,7 +341,7 @@ def __init__(self, *bands):
Parameters
----------
*bands: tuple of strings
One or more of the terms given in http://www.ivoa.net/messenger.
One or more of the terms given in http://www.ivoa.net/rdf/messenger.
The constraint matches when a resource declares at least
one of the messengers listed.
"""
Expand Down
6 changes: 3 additions & 3 deletions pyvo/utils/protofeature.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ class may have additional information to display.
str: The error message to be displayed to the user.
"""
message = (f'{function_name} is part of a prototype feature ({self.name}) that has not '
'been activated. For information about prototype features please refer to '
'https://pyvo.readthedocs.io/en/latest/prototypes .')
message = f'{function_name} is part of a prototype feature ({self.name}) that has not been activated. ' \
f'For information about prototype features please refer to ' \
f'https://pyvo.readthedocs.io/en/latest/utils/prototypes.html .'
if self.url:
message += f' For more information about the {self.name} feature please visit {self.url}.'
message += (" To suppress this error and enable the feature use "
Expand Down
2 changes: 1 addition & 1 deletion pyvo/utils/tests/test_prototype.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def test_feature_turned_off_by_default(prototype_function):
assert 'i_am_prototype is part of a prototype feature (my-feature) that has not been activated. ' in str(
e.value)
assert 'please visit http://somewhere/else' in str(e.value)
assert 'https://pyvo.readthedocs.io/en/latest/prototypes' in str(e.value)
assert 'https://pyvo.readthedocs.io/en/latest/utils/prototypes.html' in str(e.value)
assert "pyvo.utils.activate_features('my-feature')" in str(e.value)


Expand Down
12 changes: 2 additions & 10 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -45,28 +45,20 @@ commands =
cov: pytest --pyargs --cov pyvo --cov-config={toxinidir}/setup.cfg {env:PYTEST_ARGS}
cov: coverage xml -o {toxinidir}/coverage.xml

[testenv:docs]
description = builds the docs
extras = docs
commands =
pip freeze
sphinx-build -W -b html . _build/html


[testenv:linkcheck]
changedir = docs
deps =
sphinx_astropy
description = check the links in the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b linkcheck . _build/html

[testenv:build_docs]
changedir = docs
description = invoke sphinx-build to build the HTML docs
extras = docs
commands =
pip freeze
sphinx-build -W -b html . _build/html

[testenv:codestyle]
Expand Down

0 comments on commit a39a756

Please sign in to comment.