astropy / astropy/astroquery

API: new kwarg for return raw response

Open
#3,524 2 comments 2 reactions 0 assignees View on GitHub
refactor
Dominant language
Python
Stars
791
Forks
451
Avg merge
1d 3h
Merged PRs (30d)
4

Description

Historically we had duplicated method names with "async" that would return the response rather than a parsed astropy Table.

We agreed to clear this behaviour up (e.g. https://github.com/astropy/astroquery/issues/2598), but it also came up that having an easier access to the raw response can be useful (e.g. see the discussion in #3359).

So this is a formal issue to make the latter happen, we should add a `return_raw_response` or similarly named kwarg to the API rather than duplicating methods.

Let's brainstorm the kwarg first and then I recommend doing the API changes incrementally by adding the kwarg and in the same time removing the usage of the duplicating decorator.

Contributor guide

Open the contributing guide

Research direction

Start by reading the discussion in issues #2598 and #3359, then inspect how the API currently uses duplicated methods and the duplicating decorator. Done means agreeing on a kwarg name and incrementally adding raw-response access while removing that duplicated-method usage.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.