Gaia timeouts affecting imports
- Dominant language
- Python
- Stars
- 791
- Forks
- 451
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 4
Description
Hi,
This line is causing issues: https://github.com/astropy/astroquery/blob/main/astroquery/gaia/core.py#L1190. What happens is that in the same file where `GaiaClass` is defined, it's instantiated as `Gaia`. However when the Gaia servers are down / timing out, this means that just importing code from that file can take > 30 seconds. This can be a big issue as relying on astroquery.gaia as a dependency can affect your codebase as a whole, slowing things down a lot.
It would be best if these classes were not instantiated in the same file as they are defined, to avoid breaking/slowing imports.
Contributor guide
Research direction
Start in astroquery/gaia/core.py at line 1190 and inspect how GaiaClass and Gaia are imported and used. Separate class definition from instantiation so importing the Gaia module does not wait on unavailable or timing-out Gaia servers. Done means importing astroquery.gaia remains prompt when the service is down.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- api
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100