astropy / astropy/pyvo

Support for Custom `REQUEST` Methods in `TAPService` Queries

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

Description

### Description:
I am proposing an enhancement to the `pyvo.dal.TAPService` functionality to support custom `REQUEST `methods, such as `doQueryFilteredByDistance`, in addition to the default `doQuery`. This feature will provide greater flexibility and utility for users, particularly in the context of integrating the `TAPService` with the `sunpy-soar` module.

### Context:
The current implementation of the `pyvo.dal.TAPService` class hardcodes the `REQUEST ` parameter to `doQuery`. However, there are scenarios where alternative `REQUEST `methods are required to perform more specialized queries, such as filtering results by distance using `doQueryFilteredByDistance`. This was identified during the development and integration efforts within the `sunpy-soar `project, where the ability to perform such queries would be helpful for effectively interfacing with the Solar Orbiter Archive (SOAR) API.

### Proposed Solution:
Enhance the `TAPService ` class to accept an ` request_type` argument, with the default value set to `doQuery`. This argument will allow users to specify the desired `REQUEST ` method when constructing their queries.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at pyvo.dal.TAPService and trace where TAP queries hardcode the REQUEST method to doQuery. Preserve doQuery as the default, allow request_type to select custom methods, and verify both default and custom query behavior in the relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api, backend-api-design
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.