astropy / astropy/astroquery

MAINT/BUG: remove use of `**kwargs` in function signatures

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

Description

This is the extension of #2109 that is about the bug it causes in the `mast` module. Basically, we should be explicit and list all optional keyword parameters rather than blindly covering them in e.g. a `**kwarg`, which should only be used for wrappers that have too many options depending on the different backend.

Being explicit is 1) more useful for the users to see all the options in the signature/docstring, 2) less error-prone by ensuring ineffective keywords are not accepted (and misleading users that they are used while in fact, they have no effect whatsoever).

I'm attaching a checklist for all our current modules as this issue can be closed when it's systematically addressed in all of them (and explicit exceptions are made for the remaining usage of `**kwargs`).

- [ ] astroquery/alfalfa
- [ ] astroquery/alma
- [ ] astroquery/astrometry_net
- [x] astroquery/atomic
- [ ] astroquery/besancon
- [ ] astroquery/cadc
- [ ] astroquery/casda
- [ ] astroquery/cds
- [x] astroquery/cosmosim
- [x] astroquery/dace
- [ ] astroquery/esa/hsa
- [ ] astroquery/esa/hubble
- [ ] astroquery/esa/iso
- [ ] astroquery/esa/jwst
- [ ] astroquery/esa/xmm_newton
- [ ] astroquery/esasky
- [ ] astroquery/eso
- [x] astroquery/exoplanet_orbit_database
- [ ] astroquery/fermi
- [x] astroquery/gaia
- [ ] astroquery/gama
- [ ] astroquery/gemini
- [ ] astroquery/heasarc
- [ ] astroquery/hips2fits
- [ ] astroquery/hitran
- [ ] astroquery/image_cutouts/first
- [ ] astroquery/imcce
- [ ] astroquery/ipac/irsa
- [ ] astroquery/ipac/irsa/ibe
- [ ] astroquery/ipac/irsa/irsa_dust
- [ ] astroquery/ipac/irsa/sha
- [ ] astroquery/ipac/ned
- [ ] astroquery/ipac/nexsci/nasa_exoplanet_archive
- [ ] astroquery/jplhorizons
- [ ] astroquery/jplsbdb
- [x] astroquery/jplspec
- [ ] astroquery/lamda
- [ ] astroquery/linelists/cdms
- [ ] astroquery/magpis
- [ ] astroquery/mast
- [ ] astroquery/mpc
- [ ] astroquery/nasa_ads
- [ ] astroquery/nist
- [ ] astroquery/noirlab
- [ ] astroquery/nrao
- [ ] astroquery/nvas
- [ ] astroquery/oac
- [ ] astroquery/ogle
- [ ] astroquery/open_exoplanet_catalogue
- [ ] astroquery/sdss
- [ ] astroquery/simbad
- [ ] astroquery/skyview
- [ ] astroquery/splatalogue
- [ ] astroquery/svo_fps
- [ ] astroquery/template_module
- [ ] astroquery/ukidss
- [ ] astroquery/utils
- [ ] astroquery/utils/tap
- [x] astroquery/vamdc
- [ ] astroquery/vizier
- [ ] astroquery/vo_conesearch
- [x] astroquery/vsa
- [ ] astroquery/wfau
- [ ] astroquery/xmatch

Contributor guide

Open the contributing guide

Research direction

Start by auditing the function signatures in the astroquery modules listed in the checklist, with the mast module as the stated bug context. Identify uses of **kwargs, compare them with the supported optional parameters, and run the relevant module tests as each area is updated. Done means the checklist is addressed systematically and remaining **kwargs uses are explicit exceptions.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.