pyvo icon indicating copy to clipboard operation
pyvo copied to clipboard

Feature request: pyvo.dal.tap.TAPService.examples

Open trjaffe opened this issue 6 years ago • 5 comments

Just as a TAP service can be asked for its tables by simply asking for the "tables" method/attribute, it would be useful to have the same for "examples". Again, it's just appending "/examples" on the URL. In some case, obviously, the result will be None.

trjaffe avatar Feb 12 '20 16:02 trjaffe

(You can assign it to me, since I think it's easy and harmless.)

trjaffe avatar Feb 12 '20 17:02 trjaffe

Sound like a great idea. Two thoughts:

  • Using the astropy xml handling, altough i dont think this is necessary yet. Shouldn't introduce additional dependecies.
  • examples...execute() method.

funbaker avatar Feb 12 '20 19:02 funbaker

It should probably just use astropy.io.votable.parse.

Sorry, I don't understand what you mean by this

  • examples...execute() method.

trjaffe avatar Feb 12 '20 19:02 trjaffe

A method to execute the example right away.

funbaker avatar Feb 12 '20 19:02 funbaker

Oh, I see. I was just going to return a list of strings, but it could be a list of TAPQuerys.

trjaffe avatar Feb 12 '20 19:02 trjaffe