gwpy 3.0.11__py3-none-any.whl → 3.0.12__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of gwpy might be problematic. Click here for more details.

gwpy/_version.py CHANGED
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '3.0.11'
16
- __version_tuple__ = version_tuple = (3, 0, 11)
15
+ __version__ = version = '3.0.12'
16
+ __version_tuple__ = version_tuple = (3, 0, 12)
gwpy/timeseries/core.py CHANGED
@@ -425,6 +425,9 @@ class TimeSeriesBase(Series):
425
425
  useful if the same remote data are to be accessed multiple times.
426
426
  Set `GWPY_CACHE=1` in the environment to auto-cache.
427
427
 
428
+ timeout : `float`, optional
429
+ the time to wait for a response from the GWOSC server.
430
+
428
431
  **kwargs
429
432
  any other keyword arguments are passed to the `TimeSeries.read`
430
433
  method that parses the file that was downloaded
@@ -59,10 +59,16 @@ GWOSC_LOCATE_KWARGS = (
59
59
 
60
60
  # -- utilities ----------------------------------------------------------------
61
61
 
62
- def _download_file(url, cache=None, verbose=False):
62
+ def _download_file(url, cache=None, verbose=False, timeout=None, **kwargs):
63
63
  if cache is None:
64
64
  cache = bool_env('GWPY_CACHE', False)
65
- return get_readable_fileobj(url, cache=cache, show_progress=verbose)
65
+ return get_readable_fileobj(
66
+ url,
67
+ cache=cache,
68
+ show_progress=verbose,
69
+ remote_timeout=timeout,
70
+ **kwargs,
71
+ )
66
72
 
67
73
 
68
74
  def _fetch_gwosc_data_file(url, *args, **kwargs):
@@ -71,6 +77,7 @@ def _fetch_gwosc_data_file(url, *args, **kwargs):
71
77
  cls = kwargs.pop('cls', TimeSeries)
72
78
  cache = kwargs.pop('cache', None)
73
79
  verbose = kwargs.pop('verbose', False)
80
+ timeout = kwargs.pop('timeout', None) # astropy will set a default
74
81
 
75
82
  # match file format
76
83
  if url.endswith('.gz'):
@@ -84,7 +91,7 @@ def _fetch_gwosc_data_file(url, *args, **kwargs):
84
91
  elif ext == '.gwf':
85
92
  kwargs.setdefault('format', 'gwf')
86
93
 
87
- with _download_file(url, cache, verbose=verbose) as rem:
94
+ with _download_file(url, cache, verbose=verbose, timeout=timeout) as rem:
88
95
  # get channel for GWF if not given
89
96
  if ext == ".gwf" and (not args or args[0] is None):
90
97
  args = (_gwf_channel(rem, cls, kwargs.get("verbose")),)
@@ -567,6 +567,7 @@ class TestTimeSeries(_TestTimeSeriesBase):
567
567
  *GWOSC_GW150914_SEGMENT,
568
568
  format=format,
569
569
  verbose=True,
570
+ timeout=60,
570
571
  )
571
572
  utils.assert_quantity_sub_equal(ts, gw150914,
572
573
  exclude=['name', 'unit', 'channel'])
@@ -577,6 +578,7 @@ class TestTimeSeries(_TestTimeSeriesBase):
577
578
  *GWOSC_GW150914_SEGMENT,
578
579
  format=format,
579
580
  sample_rate=16384,
581
+ timeout=60,
580
582
  )
581
583
  assert ts.sample_rate == 16384 * units.Hz
582
584
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: gwpy
3
- Version: 3.0.11
3
+ Version: 3.0.12
4
4
  Summary: A python package for gravitational-wave astrophysics
5
5
  Author-email: Duncan Macleod <duncan.macleod@ligo.org>
6
6
  License: GPL-3.0-or-later
@@ -1,5 +1,5 @@
1
1
  gwpy/__init__.py,sha256=3chu5cxfVA08qkFYk3lyXBlFXO6lrgytIIdh_nL9YzU,1533
2
- gwpy/_version.py,sha256=VLIOMgjcQKexoFsz9cgd-G7icKgaCi_9lMWfexXRE3A,413
2
+ gwpy/_version.py,sha256=ooyEHZtQaJBMHgtSIHzjHXZytluD0oK2JQtr3tGaXCw,413
3
3
  gwpy/conftest.py,sha256=nMqidKFNcwTCvDb-vHzzCmzUyyL0TH9DwbmagfdE1II,1639
4
4
  gwpy/astro/__init__.py,sha256=DtaqsbVdlI4Qy6eRlXuLtraTCLXjpQYadk5pEFwXrM8,1909
5
5
  gwpy/astro/range.py,sha256=BcRrJkgxiceL1QsOy1uUtCMslEeic0MUxWFs76LgY0Y,24892
@@ -185,7 +185,7 @@ gwpy/time/tests/__init__.py,sha256=EF4G-IubXcMA_-mucDvcpjqM-ITyp0G_3cvO0VeYdxI,7
185
185
  gwpy/time/tests/test_main.py,sha256=3QV6kTWQ6AkGCYmqxfw-JfAoiR6VXzyrM__7XeyQvTI,1362
186
186
  gwpy/time/tests/test_time.py,sha256=Cj3Yv0N4MYi9C5fzuXPgR6rge6aKgfIbnhUwzeKDRDM,4402
187
187
  gwpy/timeseries/__init__.py,sha256=e-ncacmSPxUUmya8xlQ-Govk4ptr-0TVp26vMIPmxTU,1134
188
- gwpy/timeseries/core.py,sha256=DOGeO3kjk7twinS8aDDwgNKIZLYrGtnfCPOm05KKxi8,57804
188
+ gwpy/timeseries/core.py,sha256=lYc4b6U88K3ur_O4Ld5_S8Xsyhmph-gI_HADJpQTR_A,57908
189
189
  gwpy/timeseries/statevector.py,sha256=9yAlpBbR8eWDMK6PTpuGUAwAGO1tyE07SohfU2DJUJs,35891
190
190
  gwpy/timeseries/timeseries.py,sha256=lg28EEMASBR2IS_4gJfcU0j3uo7tEfFEVjK-Uv64ziw,87809
191
191
  gwpy/timeseries/io/__init__.py,sha256=qviFCaeTVeTZ7ZiIQKQyU1xxh76Ba60yE9vVtm9y1bY,938
@@ -193,7 +193,7 @@ gwpy/timeseries/io/ascii.py,sha256=M05FDTCa06KLJ1Sb0jDh3NxrmMboV73j38nyMacVPkQ,1
193
193
  gwpy/timeseries/io/cache.py,sha256=xN-lSjsBy7Heo_9X7FVRYneA4HaEMpLs4Q1Zc7lJSoA,2794
194
194
  gwpy/timeseries/io/core.py,sha256=1hp7f7UgcEEqw1T9Oa0DGMMg6uyKJih8h4A3rNkx0SQ,4692
195
195
  gwpy/timeseries/io/hdf5.py,sha256=eGiqWQIdD3Lu-74F6qiw9dKq6GSjBHoroanNsdzcy2E,4214
196
- gwpy/timeseries/io/losc.py,sha256=QwBdN-E2CU7L27QRg80RLM1U3TwJ_4abpudci3STt8M,9419
196
+ gwpy/timeseries/io/losc.py,sha256=_ZpfjfkVFyOsxLdqrhvGl-QQA_3AknXD_jAfffehveg,9613
197
197
  gwpy/timeseries/io/nds2.py,sha256=TlUQgKyHzhRQ9kzwEDxt5zgAWAo8viLkokM4P50n3Xk,7811
198
198
  gwpy/timeseries/io/wav.py,sha256=E_EjIa43nzpps18x-ekollMvgPbrKyqt1v_VAXicbPQ,3595
199
199
  gwpy/timeseries/io/gwf/__init__.py,sha256=R1jtuqAw82Vp1LwEFg1hXaok1NEotldCSpHs9QuDZqc,13156
@@ -207,7 +207,7 @@ gwpy/timeseries/tests/test_io_gwf_framecpp.py,sha256=S0MgBEZ2_o6MDrBfAZbj4SWk3LD
207
207
  gwpy/timeseries/tests/test_io_gwf_lalframe.py,sha256=iD9m01menvAgUXoGJnX7Xv-O5t3mgX2C2N2nRN-gitY,5479
208
208
  gwpy/timeseries/tests/test_io_losc.py,sha256=E_bLM3bc4TO2-cMOEF3vDG8cr6TKgQwPY-EBN6DzyUg,1833
209
209
  gwpy/timeseries/tests/test_statevector.py,sha256=-wmDd1GLEXeR1vWa2jixndLyx0WL4eYJLU-BlcEA9JE,13768
210
- gwpy/timeseries/tests/test_timeseries.py,sha256=fa_6tnHEJTgqcDbLgLMsSa8dmUwxq27frWQLj0bURrk,57347
210
+ gwpy/timeseries/tests/test_timeseries.py,sha256=OkkOLkfc6aYMDhQOhS7Ge8Nj9LEcSSz_FmuzDzv-R-M,57395
211
211
  gwpy/types/__init__.py,sha256=JIpXRdi0av2V0BkynOwUhijxQShSAqE5gLrowJ6Nckg,1159
212
212
  gwpy/types/array.py,sha256=D4EwGC80hKFhrRuFD3xnHaqJR7jdT88v5nik-3o-RU0,15595
213
213
  gwpy/types/array2d.py,sha256=NtwW5T6PWHiAS6kFYUfF8fm3WE4qQdPbXN01iaBET0k,12367
@@ -245,9 +245,9 @@ gwpy/utils/tests/test_mp.py,sha256=kZXUTFqCPi4wvCkGgSSk8XrG9pHPGakPNuNUykgSp-k,2
245
245
  gwpy/utils/tests/test_shell.py,sha256=arHzI96Rmje5JPhbQ33vEN0ByRh8qwRVqfl4-jzLUv4,2334
246
246
  gwpy/utils/tests/test_sphinx_ex2rst.py,sha256=KcIBPWTsPp00iTdYT6bZ8g2F7bN66PaX5uLJlcWu0J0,2263
247
247
  gwpy/utils/tests/test_sphinx_zenodo.py,sha256=GL-3R7yFxF6ZQLuVhJI74djdgvE9sX4Q0atdHi3SyiU,5237
248
- gwpy-3.0.11.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
249
- gwpy-3.0.11.dist-info/METADATA,sha256=zIHoWCtK5qxPjCIQOBLHVSCrVcnGopxJyXZ7tDUopy4,4879
250
- gwpy-3.0.11.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
251
- gwpy-3.0.11.dist-info/entry_points.txt,sha256=pcO_XRknobU7b1uuxFb3nTdGMk8FrHQsWBOflnj6Ev8,54
252
- gwpy-3.0.11.dist-info/top_level.txt,sha256=0XRdsSjFdBe_QF_Qst002-CCxuuO13ag2n-11nBpZ4E,5
253
- gwpy-3.0.11.dist-info/RECORD,,
248
+ gwpy-3.0.12.dist-info/LICENSE,sha256=jOtLnuWt7d5Hsx6XXB2QxzrSe2sWWh3NgMfFRetluQM,35147
249
+ gwpy-3.0.12.dist-info/METADATA,sha256=wEde_w2N08kEt3OoVX7T_72gdht3rS2G3rODfl7-wj0,4879
250
+ gwpy-3.0.12.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
251
+ gwpy-3.0.12.dist-info/entry_points.txt,sha256=pcO_XRknobU7b1uuxFb3nTdGMk8FrHQsWBOflnj6Ev8,54
252
+ gwpy-3.0.12.dist-info/top_level.txt,sha256=0XRdsSjFdBe_QF_Qst002-CCxuuO13ag2n-11nBpZ4E,5
253
+ gwpy-3.0.12.dist-info/RECORD,,
File without changes
File without changes