Skip to content

Commit 8d10133

Browse files
authored
Merge pull request #3420 from bsipocz/MAINT_pre-release-fixes
2 parents 8a0a427 + c588b25 commit 8d10133

File tree

7 files changed

+51
-29
lines changed

7 files changed

+51
-29
lines changed

.github/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
changelog:
2+
exclude:
3+
authors:
4+
- dependabot
5+
- pre-commit-ci
6+
- dependabot[bot]

.mailmap

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ Eric Koch <[email protected]>
3232
Erwan Pannier <[email protected]>
3333
3434
Fred Moolekamp <[email protected]>
35+
Gregory Dubois-Felsmann <[email protected]>
3536
Hadrien Devillepoix <[email protected]>
3637
Hans Moritz Guenter <[email protected]>
3738
@@ -67,6 +68,8 @@ Juanjo Bazán <[email protected]>
6768
Julien Milli <[email protected]>
6869
6970
71+
Jure Zakrajšek <[email protected]>
72+
7073
7174
Kelvin Lee <[email protected]>
7275
Kyle Willett <[email protected]>
@@ -86,6 +89,8 @@ Michael St. Clair <[email protected]>
8689
8790
Michele Costa <[email protected]>
8891
Miguel de Val-Borro <[email protected]> <[email protected]>
92+
Mitchell Stringfellow <[email protected]>
93+
Natanael Cardoso <[email protected]>
8994
9095
Naveen Srinivasan <[email protected]>
9196
Nicholas Earl <[email protected]>
@@ -98,7 +103,9 @@ Raul Gutierrez <[email protected]> <[email protected]>
98103
Rounak Agarwal <[email protected]>
99104
100105
101-
Sashank Mishra <[email protected]>
106+
Sashank Mishra <[email protected]
107+
Simon Alinder <[email protected]>
108+
102109
103110
104111
Simon Liedtke <[email protected]>
@@ -108,5 +115,6 @@ Syed Gilani <[email protected]>
108115
Tinuade Adeleke <[email protected]>
109116
Tim Galvin <[email protected]>
110117
Tomas Alonso Albi <[email protected]>
118+
Tristan Dijkstra <[email protected]>
111119
Volodymyr Savchenko <[email protected]> <[email protected]>
112120
Volodymyr Savchenko <[email protected]> <[email protected]>

astroquery/esa/integral/tests/test_isla_remote.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ def test_get_source_metadata(self):
8585

8686
assert len(metadata) >= 1
8787
assert metadata[0]['name'] == 'Integral'
88-
assert metadata[0]['metadata'][0]['value'] == 'Crab'
88+
assert metadata[0]['metadata']['rows'][0]['value'] == 'Crab'
8989

9090
# Query a target that does not exist
9191
with pytest.raises(ValueError) as err:

astroquery/heasarc/tests/test_heasarc_remote.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,10 @@
66
import astropy.units as u
77
from astropy.table import Table
88
from astropy.coordinates import SkyCoord
9-
from packaging.version import Version
109

1110
from astropy.utils.exceptions import AstropyDeprecationWarning
1211
from astroquery.exceptions import NoResultsWarning
13-
import pyvo
12+
1413
from pyvo.dal.exceptions import DALOverflowWarning
1514

1615
from astroquery.heasarc import Heasarc
@@ -157,10 +156,6 @@ def test_list_catalogs__keywords(self):
157156
assert "rosmaster" in catalogs
158157
assert "rassmaster" in catalogs
159158

160-
@pytest.mark.skipif(
161-
Version(pyvo.__version__) < Version('1.4'),
162-
reason="DALOverflowWarning is available only in pyvo>=1.4"
163-
)
164159
def test_tap__maxrec(self):
165160
query = "SELECT TOP 10 ra,dec FROM xray"
166161
with pytest.warns(expected_warning=DALOverflowWarning, match=overflow_message):

conftest.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import os
44
from pathlib import Path
5+
import sys
56

67
from astropy.utils import minversion
78
import numpy as np
@@ -60,3 +61,9 @@ def tmp_cwd(tmp_path):
6061
yield tmp_path
6162
finally:
6263
os.chdir(old_dir)
64+
65+
66+
def pytest_runtestloop(session):
67+
if sys.platform == 'win32':
68+
session.add_marker(pytest.mark.filterwarnings(
69+
'ignore:OverflowError converting to IntType in column:astropy.utils.exceptions.AstropyWarning'))

docs/esa/integral/integral.rst

Lines changed: 21 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
ESA Integral Science Legacy Archive (ISLA) (`astroquery.esa.integral`)
55
**********************************************************************
66

7-
INTEGRAL is the INTernational Gamma-Ray Astrophysics Laboratory of the
8-
European Space Agency. It observes the Universe in the X-ray and soft
9-
gamma-ray band. Since its launch, on October 17, 2002, the ISDC receives
10-
the spacecraft telemetry within seconds and provides alerts, processed
7+
INTEGRAL is the INTernational Gamma-Ray Astrophysics Laboratory of the
8+
European Space Agency. It observes the Universe in the X-ray and soft
9+
gamma-ray band. Since its launch, on October 17, 2002, the ISDC receives
10+
the spacecraft telemetry within seconds and provides alerts, processed
1111
data and analysis software to the worldwide scientific community.
1212

1313
========
@@ -26,8 +26,8 @@ file in the chosen format, and queries may be executed asynchronously.
2626

2727
>>> from astroquery.esa.integral import IntegralClass
2828
>>> isla = IntegralClass()
29-
>>> isla.query_tap(query='select * from ivoa.obscore')
30-
29+
>>> isla.query_tap(query='select * from ivoa.obscore') # doctest: +IGNORE_OUTPUT
30+
<Table length=6743>
3131
access_estsize access_format access_url calib_level ... t_max t_min t_resolution t_xel
3232
int64 object object int32 ... float64 float64 float64 int64
3333
-------------- ----------------- ------------------------------------------------------------------------------ ----------- ... ----------- ----------- ------------ -----
@@ -51,7 +51,7 @@ The output can be formatted and saved as needed.
5151
>>> from astroquery.esa.integral import IntegralClass
5252
>>> isla = IntegralClass()
5353
>>> isla.get_sources(target_name='crab')
54-
54+
<Table length=1>
5555
name ra dec source_id
5656
object float64 float64 object
5757
------ ----------------- ----------------- ----------------
@@ -69,7 +69,7 @@ identified by its target name. The metadata provides in-depth information about
6969
>>> from astroquery.esa.integral import IntegralClass
7070
>>> isla = IntegralClass()
7171
>>> metadata = isla.get_source_metadata(target_name='Crab')
72-
>>> metadata
72+
>>> metadata # doctest: +IGNORE_OUTPUT
7373
[{'name': 'Integral', 'link': None, 'metadata': [{'param': 'Name', 'value': 'Crab'}, {'param': 'Id', 'value': 'J053432.0+220052'}, {'param': 'Coordinates degrees', 'value': '83.6324 22.0174'}, {'param': 'Coordinates', 'value': '05 34 31.78 22 01 02.64'}, {'param': 'Galactic', 'value': '184.55 -5.78'}, {'param': 'Isgri flag2', 'value': 'very bright source'}, {'param': 'Jemx flag', 'value': 'detected'}, {'param': 'Spi flag', 'value': 'detected'}, {'param': 'Picsit flag', 'value': 'detected'}]}, {'name': 'Simbad', 'link': 'https://simbad.cds.unistra.fr/simbad/sim-id?Ident=Crab', 'metadata': [{'param': 'Id', 'value': 'NAME Crab'}, {'param': 'Type', 'value': 'SuperNova Remnant'}, {'param': 'Other types', 'value': 'HII|IR|Psr|Rad|SNR|X|gam'}]}]
7474

7575
------------------------------------
@@ -85,8 +85,9 @@ operation asynchronously.
8585

8686
>>> from astroquery.esa.integral import IntegralClass
8787
>>> isla = IntegralClass()
88-
>>> isla.get_observations(target_name='crab', radius=12.0, start_revno='0290', end_revno='0599')
89-
dec email end_revno endtime ... starttime surname title
88+
>>> isla.get_observations(target_name='crab', radius=12.0, start_revno='0290', end_revno='0599') # doctest: +IGNORE_OUTPUT
89+
<Table length=27>
90+
dec email end_revno endtime ... starttime surname title
9091
float64 str60 object object ... object str20 str120
9192
---------- ------------------------------ --------- ------------------- ... ------------------- ---------- --------------------------------------------------------------
9293
26.3157778 [email protected] 0352 2005-09-02 21:20:59 ... 2005-08-31 11:07:06 Kretschmar Target of Opportunity Observations of an Outburst in A 0535+26
@@ -114,7 +115,7 @@ An additional parameter, read_fits (default value True) reads automatically the
114115

115116
>>> from astroquery.esa.integral import IntegralClass
116117
>>> isla = IntegralClass()
117-
>>> isla.download_science_windows(science_windows=['008100430010', '033400230030'], output_file=None)
118+
>>> results = isla.download_science_windows(science_windows=['008100430010', '033400230030'], output_file=None) # doctest: +IGNORE_OUTPUT
118119

119120

120121
---------------------
@@ -132,7 +133,7 @@ to refine their search.
132133
>>> isla = IntegralClass()
133134
>>> coordinates = SkyCoord(83.63320922851562, 22.01447105407715, unit="deg")
134135
>>> timeline = isla.get_timeline(coordinates=coordinates)
135-
>>> timeline
136+
>>> timeline # doctest: +IGNORE_OUTPUT
136137
{'total_items': 8714, 'fraFC': 0.8510442965343126, 'totEffExpo': 16416293.994214607, 'timeline': <Table length=8714>
137138
scwExpo scwRevs scwTimes scwOffAxis
138139
float64 float64 object float64
@@ -157,6 +158,7 @@ specific target, instrument, or energy band is available.
157158
>>> from astroquery.esa.integral import IntegralClass
158159
>>> isla = IntegralClass()
159160
>>> isla.get_epochs(target_name='J011705.1-732636', band='28_40')
161+
<Table length=50>
160162
epoch
161163
object
162164
----------------
@@ -190,7 +192,8 @@ Users can refine their results by selecting an instrument or energy band.
190192

191193
>>> from astroquery.esa.integral import IntegralClass
192194
>>> isla = IntegralClass()
193-
>>> ltt = isla.get_long_term_timeseries(target_name='J174537.0-290107', instrument='jem-x')
195+
>>> ltt = isla.get_long_term_timeseries(target_name='J174537.0-290107', instrument='jem-x') # doctest: +IGNORE_OUTPUT
196+
194197

195198
8.2. Retrieving Short-Term Timeseries
196199
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -203,7 +206,8 @@ the results are saved to a file for detailed examination.
203206

204207
>>> from astroquery.esa.integral import IntegralClass
205208
>>> isla = IntegralClass()
206-
>>> stt = isla.get_short_term_timeseries(target_name='J011705.1-732636', band='28_40', epoch='0745_06340000001')
209+
>>> stt = isla.get_short_term_timeseries(target_name='J011705.1-732636', band='28_40', epoch='0745_06340000001') # doctest: +IGNORE_OUTPUT
210+
207211

208212
8.3. Retrieving spectra
209213
~~~~~~~~~~~~~~~~~~~~~~~
@@ -216,7 +220,7 @@ output file for further processing.
216220

217221
>>> from astroquery.esa.integral import IntegralClass
218222
>>> isla = IntegralClass()
219-
>>> spectra = isla.get_spectra(target_name='J011705.1-732636', instrument='ibis', epoch='0745_06340000001')
223+
>>> spectra = isla.get_spectra(target_name='J011705.1-732636', instrument='ibis', epoch='0745_06340000001') # doctest: +IGNORE_OUTPUT
220224

221225

222226
8.4. Retrieving mosaics
@@ -229,11 +233,10 @@ Users can filter by instrument or energy band and save the resulting image to a
229233

230234
>>> from astroquery.esa.integral import IntegralClass
231235
>>> isla = IntegralClass()
232-
>>> mosaics = isla.get_mosaic(epoch='0727_88601650001', instrument='ibis')
233-
236+
>>> mosaics = isla.get_mosaic(epoch='0727_88601650001', instrument='ibis') # doctest: +IGNORE_OUTPUT +IGNORE_WARNINGS
234237

235238
Reference/API
236239
=============
237240

238241
.. automodapi:: astroquery.esa.integral
239-
:no-inheritance-diagram:
242+
:no-inheritance-diagram:

setup.cfg

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ text_file_format = rst
4444
xfail_strict = true
4545
remote_data_strict = true
4646
addopts = --color=yes --doctest-rst --doctest-continue-on-failure
47+
# Ideally this should be lower and individual, problematic tests and doc pages should have one-off higher numbers.
48+
timeout = 300
49+
4750
filterwarnings =
4851
error
4952
# Remove along with astropy-helpers, once we switch to a new versioning scheme
@@ -145,12 +148,12 @@ install_requires=
145148
html5lib>=0.999
146149
keyring>=15.0
147150
pyvo>=1.5
148-
tests_require =
149-
pytest-doctestplus>=0.13
150-
pytest-astropy
151151

152152
[options.extras_require]
153153
test=
154+
pytest>=7.4
155+
pytest-doctestplus>=1.4
156+
pytest-timeout
154157
pytest-astropy
155158
matplotlib
156159
pytest-dependency

0 commit comments

Comments
 (0)