astropy / astropy/pyvo

VOSITables look for <description> tag in child table endpoint

Open
#219 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
88
Forks
64
Avg merge
38m
Merged PRs (30d)
1

Description

When table descriptions are requested for a VOSITable, the individual table information is fetched from the child table resource, including the `` tag. The `` tag is optional in the [child table resource](http://www.ivoa.net/documents/VOSI/20170524/REC-VOSI-1.1.html#tth_sEc5.4). In at least some cases, the `` tag is present in the tables endpoint but that information is ignored.

We discovered this in the IRSA TAP server with this code:
```
import pyvo
service=pyvo.dal.TAPService('https://irsa.ipac.caltech.edu/TAP')
print(service.tables['akari_irc'].name, service.tables['akari_irc'].description)
```
(warning: the `` tag is likely to be added to the child resources for this service, so this example may start returning descriptions.)

In the `VOSITables._get_table(name)` method, the child resource is queried if `table.columns` and `table.foreignkeys` do not exist. But `table.description` is overwritten with None if the child resource does not include ``.

I propose that if the child resource does not include ``, then the existing table description from the tables endpoint should be used instead. If there is agreement that this is the desired behavior, I can make a pull request to implement this inside `dal.vosi.VOSITables._get_table()`.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start in dal.vosi.VOSITables._get_table() and trace how the child table resource replaces information from the tables endpoint. Preserve the existing tables-endpoint description when the child resource has no tag, and verify that the example VOSITable description is no longer lost.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.