Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-gwpy for openSUSE:Factory 
checked in at 2023-10-15 19:27:56
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-gwpy (Old)
 and      /work/SRC/openSUSE:Factory/.python-gwpy.new.20540 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-gwpy"

Sun Oct 15 19:27:56 2023 rev:4 rq:1117822 version:3.0.7

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-gwpy/python-gwpy.changes  2023-06-21 
22:41:20.954909227 +0200
+++ /work/SRC/openSUSE:Factory/.python-gwpy.new.20540/python-gwpy.changes       
2023-10-15 19:30:07.450482074 +0200
@@ -1,0 +2,15 @@
+Tue Oct 10 22:34:47 UTC 2023 - Atri Bhattacharya <badshah...@gmail.com>
+
+- Update to version 3.0.7:
+  * No code changes.
+- Changes from version 3.0.6:
+  * [gh#gwpy/gwpy#1636] Drop support for Python 3.7.
+  * [gh#gwpy/gwpy#1649] Don't round TimeSeries.dt when setting via
+    sample_rate.
+  * [gh#gwpy/gwpy#1654] Fix type comparison lint.
+  * [gh#gwpy/gwpy#1661] Fix compatibility with matplotlib 3.8.0.
+  * [gh#gwpy/gwpy#1676] Improve tests of TimeSeriesDict.find error
+    handling.
+  * [gh#gwpy/gwpy#1677] Fix all executable lint issues.
+
+-------------------------------------------------------------------

Old:
----
  gwpy-3.0.5.tar.gz

New:
----
  gwpy-3.0.7.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-gwpy.spec ++++++
--- /var/tmp/diff_new_pack.cC5gui/_old  2023-10-15 19:30:07.978501095 +0200
+++ /var/tmp/diff_new_pack.cC5gui/_new  2023-10-15 19:30:07.978501095 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           python-gwpy
-Version:        3.0.5
+Version:        3.0.7
 Release:        0
 Summary:        A python package for gravitational-wave astrophysics
 License:        GPL-3.0-only

++++++ gwpy-3.0.5.tar.gz -> gwpy-3.0.7.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/.github/workflows/conda.yml 
new/gwpy-3.0.7/.github/workflows/conda.yml
--- old/gwpy-3.0.5/.github/workflows/conda.yml  2023-04-14 17:14:06.000000000 
+0200
+++ new/gwpy-3.0.7/.github/workflows/conda.yml  2023-10-05 11:47:18.000000000 
+0200
@@ -38,7 +38,6 @@
           - Ubuntu
           - Windows
         python-version:
-          - "3.7"
           - "3.8"
           - "3.9"
           - "3.10"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/.github/workflows/dependencies.yml 
new/gwpy-3.0.7/.github/workflows/dependencies.yml
--- old/gwpy-3.0.5/.github/workflows/dependencies.yml   2023-04-06 
12:37:11.000000000 +0200
+++ new/gwpy-3.0.7/.github/workflows/dependencies.yml   2023-10-05 
11:47:18.000000000 +0200
@@ -40,7 +40,7 @@
       matrix:
         include:
           - name: "Minimum"
-            python-version: "3.7"
+            python-version: "3.8"
             experimental: false
             extras: "test"
             pip-opts: "--upgrade-strategy=only-if-needed"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/.github/workflows/dist.yml 
new/gwpy-3.0.7/.github/workflows/dist.yml
--- old/gwpy-3.0.5/.github/workflows/dist.yml   2023-04-06 12:37:11.000000000 
+0200
+++ new/gwpy-3.0.7/.github/workflows/dist.yml   2023-10-05 11:47:18.000000000 
+0200
@@ -80,10 +80,10 @@
           - Ubuntu
           - Windows
         python-version:
-          - "3.7"
           - "3.8"
           - "3.9"
           - "3.10"
+          - "3.11"
     runs-on: ${{ matrix.os }}-latest
 
     defaults:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/PKG-INFO new/gwpy-3.0.7/PKG-INFO
--- old/gwpy-3.0.5/PKG-INFO     2023-06-02 10:36:27.297606200 +0200
+++ new/gwpy-3.0.7/PKG-INFO     2023-10-05 12:29:52.674749000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: gwpy
-Version: 3.0.5
+Version: 3.0.7
 Summary: A python package for gravitational-wave astrophysics
 Author-email: Duncan Macleod <duncan.macl...@ligo.org>
 License: GPL-3.0-or-later
@@ -15,21 +15,63 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Topic :: Scientific/Engineering :: Astronomy
 Classifier: Topic :: Scientific/Engineering :: Physics
-Requires-Python: >=3.7
+Requires-Python: >=3.8
 Description-Content-Type: text/markdown
+License-File: LICENSE
+Requires-Dist: astropy>=4.3.0
+Requires-Dist: dqsegdb2
+Requires-Dist: gwdatafind>=1.1.0
+Requires-Dist: gwosc>=0.5.3
+Requires-Dist: h5py>=3.0.0
+Requires-Dist: ligo-segments>=1.0.0
+Requires-Dist: ligotimegps>=1.2.1
+Requires-Dist: matplotlib>=3.3.0
+Requires-Dist: numpy>=1.19
+Requires-Dist: python-dateutil
+Requires-Dist: requests
+Requires-Dist: scipy>=1.5.0
+Requires-Dist: tqdm>=4.10.0
 Provides-Extra: test
+Requires-Dist: coverage[toml]>=5.0; extra == "test"
+Requires-Dist: pytest>=3.9.1; extra == "test"
+Requires-Dist: pytest-freezegun; extra == "test"
+Requires-Dist: pytest-cov>=2.4.0; extra == "test"
+Requires-Dist: pytest-requires; extra == "test"
+Requires-Dist: pytest-socket; extra == "test"
+Requires-Dist: pytest-xdist; extra == "test"
+Requires-Dist: requests-mock; extra == "test"
 Provides-Extra: astro
+Requires-Dist: inspiral-range; extra == "astro"
 Provides-Extra: docs
+Requires-Dist: numpydoc>=0.8.0; extra == "docs"
+Requires-Dist: Sphinx>=4.4.0; extra == "docs"
+Requires-Dist: sphinx-automodapi; extra == "docs"
+Requires-Dist: sphinx-immaterial>=0.7.3; extra == "docs"
+Requires-Dist: sphinx-panels>=0.6.0; extra == "docs"
+Requires-Dist: sphinxcontrib-programoutput; extra == "docs"
 Provides-Extra: dev
+Requires-Dist: ciecplib; extra == "dev"
+Requires-Dist: dateparser>=1.1.2; extra == "dev"
+Requires-Dist: lalsuite; sys_platform != "win32" and extra == "dev"
+Requires-Dist: lscsoft-glue; sys_platform != "win32" and extra == "dev"
+Requires-Dist: maya; python_version < "3.11" and extra == "dev"
+Requires-Dist: psycopg2; extra == "dev"
+Requires-Dist: pycbc>=1.13.4; sys_platform != "win32" and extra == "dev"
+Requires-Dist: pymysql; extra == "dev"
+Requires-Dist: pyRXP; extra == "dev"
+Requires-Dist: python-ligo-lw>=1.7.0; sys_platform != "win32" and extra == 
"dev"
+Requires-Dist: sqlalchemy; extra == "dev"
+Requires-Dist: uproot>=4.1.5; extra == "dev"
 Provides-Extra: conda
-License-File: LICENSE
+Requires-Dist: python-framel>=8.40.1; extra == "conda"
+Requires-Dist: python-ldas-tools-framecpp; sys_platform != "win32" and extra 
== "conda"
+Requires-Dist: python-nds2-client; extra == "conda"
 
 GWpy is a collaboration-driven Python package providing tools for
 studying data from ground-based gravitational-wave detectors.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/_version.py 
new/gwpy-3.0.7/gwpy/_version.py
--- old/gwpy-3.0.5/gwpy/_version.py     2023-06-02 10:36:26.000000000 +0200
+++ new/gwpy-3.0.7/gwpy/_version.py     2023-10-05 12:29:52.000000000 +0200
@@ -1,4 +1,16 @@
 # file generated by setuptools_scm
 # don't change, don't track in version control
-__version__ = version = '3.0.5'
-__version_tuple__ = version_tuple = (3, 0, 5)
+TYPE_CHECKING = False
+if TYPE_CHECKING:
+    from typing import Tuple, Union
+    VERSION_TUPLE = Tuple[Union[int, str], ...]
+else:
+    VERSION_TUPLE = object
+
+version: str
+__version__: str
+__version_tuple__: VERSION_TUPLE
+version_tuple: VERSION_TUPLE
+
+__version__ = version = '3.0.7'
+__version_tuple__ = version_tuple = (3, 0, 7)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/cli/gwpy_plot.py 
new/gwpy-3.0.7/gwpy/cli/gwpy_plot.py
--- old/gwpy-3.0.5/gwpy/cli/gwpy_plot.py        2023-04-06 12:37:11.000000000 
+0200
+++ new/gwpy-3.0.7/gwpy/cli/gwpy_plot.py        2023-10-05 11:47:18.000000000 
+0200
@@ -1,4 +1,3 @@
-#!/usr/bin/env python
 # -*- coding: utf-8 -*-
 # Copyright (C) Joseph Areeda (2015-2020)
 #
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/detector/channel.py 
new/gwpy-3.0.7/gwpy/detector/channel.py
--- old/gwpy-3.0.5/gwpy/detector/channel.py     2023-04-06 12:37:11.000000000 
+0200
+++ new/gwpy-3.0.7/gwpy/detector/channel.py     2023-10-05 11:47:18.000000000 
+0200
@@ -34,11 +34,6 @@
 
 __author__ = 'Duncan Macleod <duncan.macl...@ligo.org>'
 
-try:  # python >= 3.7
-    Pattern = re.Pattern
-except AttributeError:  # python < 3.7
-    Pattern = re._pattern_type
-
 QUOTE_REGEX = re.compile(r'^[\s\"\']+|[\s\"\']+$')
 
 
@@ -729,7 +724,7 @@
             a new `ChannelList` containing the matching channels
         """
         # format name regex
-        if isinstance(name, Pattern):
+        if isinstance(name, re.Pattern):
             flags = name.flags
             name = name.pattern
         else:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/plot/axes.py 
new/gwpy-3.0.7/gwpy/plot/axes.py
--- old/gwpy-3.0.5/gwpy/plot/axes.py    2023-04-06 12:37:11.000000000 +0200
+++ new/gwpy-3.0.7/gwpy/plot/axes.py    2023-10-05 11:47:18.000000000 +0200
@@ -162,7 +162,10 @@
         super().__init__(*args, **kwargs)
 
         # handle Series in `ax.plot()`
-        self._get_lines = PlotArgsProcessor(self)
+        if matplotlib_version >= "3.8.0":
+            self._get_lines = PlotArgsProcessor()
+        else:
+            self._get_lines = PlotArgsProcessor(self)
 
         # reset data formatters (for interactive plots) to support
         # GPS time display
@@ -635,6 +638,10 @@
         """Find `Series` data in `plot()` args and unwrap
         """
         newargs = []
+        # matplotlib 3.8.0 includes the Axes object up-front
+        if args and isinstance(args[0], Axes):
+            newargs.append(args[0])
+            args = args[1:]
         while args:
             # strip first argument
             this, args = args[:1], args[1:]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/plot/plot.py 
new/gwpy-3.0.7/gwpy/plot/plot.py
--- old/gwpy-3.0.5/gwpy/plot/plot.py    2023-04-24 14:31:10.000000000 +0200
+++ new/gwpy-3.0.7/gwpy/plot/plot.py    2023-10-05 11:47:18.000000000 +0200
@@ -519,9 +519,11 @@
             pass
 
         # add new axes
-        if ax.get_axes_locator():
+        try:
             divider = ax.get_axes_locator()._axes_divider
-        else:
+        except AttributeError:
+            # get_axes_locator() is None _or_ the _axes_divider property
+            # has been removed
             from mpl_toolkits.axes_grid1 import make_axes_locatable
             divider = make_axes_locatable(ax)
         if location not in {'top', 'bottom'}:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/plot/tests/test_axes.py 
new/gwpy-3.0.7/gwpy/plot/tests/test_axes.py
--- old/gwpy-3.0.5/gwpy/plot/tests/test_axes.py 2023-04-14 17:14:06.000000000 
+0200
+++ new/gwpy-3.0.7/gwpy/plot/tests/test_axes.py 2023-10-05 11:47:18.000000000 
+0200
@@ -23,7 +23,10 @@
 
 import numpy
 
-from matplotlib import rcParams
+from matplotlib import (
+    __version__ as matplotlib_version,
+    rcParams,
+)
 from matplotlib.collections import PolyCollection
 from matplotlib.lines import Line2D
 
@@ -169,7 +172,10 @@
         array = Array2D(numpy.random.random((10, 10)), dx=.1, dy=.2)
         ax.grid(True, which="both", axis="both")
         mesh = ax.pcolormesh(array)
-        utils.assert_array_equal(mesh.get_array(), array.T.flatten())
+        if matplotlib_version >= "3.8.0":
+            utils.assert_array_equal(mesh.get_array(), array.T)
+        else:  # matplotlib < 3.8.0
+            utils.assert_array_equal(mesh.get_array(), array.T.flatten())
         utils.assert_array_equal(mesh.get_paths()[-1].vertices[2],
                                  (array.xspan[1], array.yspan[1]))
         # check that restore_grid decorator did its job
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/timeseries/core.py 
new/gwpy-3.0.7/gwpy/timeseries/core.py
--- old/gwpy-3.0.5/gwpy/timeseries/core.py      2023-06-02 10:29:18.000000000 
+0200
+++ new/gwpy-3.0.7/gwpy/timeseries/core.py      2023-10-05 11:47:18.000000000 
+0200
@@ -245,8 +245,6 @@
             del self.dt
             return
         self.dt = (1 / units.Quantity(val, units.Hertz)).to(self.xunit)
-        if numpy.isclose(self.dt.value, round(self.dt.value)):
-            self.dt = units.Quantity(round(self.dt.value), self.dt.unit)
 
     # -- duration
     @property
@@ -1187,48 +1185,61 @@
              verbose=False, allow_tape=True, observatory=None, **readargs):
         """Find and read data from frames for a number of channels.
 
+        This method uses :mod:`gwdatafind` to discover the (`file://`) URLs
+        that provide the requested data, then reads those files using
+        :meth:`TimeSeriesDict.read()`.
+
         Parameters
         ----------
         channels : `list`
-            required data channels.
+            Required data channels.
 
         start : `~gwpy.time.LIGOTimeGPS`, `float`, `str`
             GPS start time of required data,
             any input parseable by `~gwpy.time.to_gps` is fine
 
-        end : `~gwpy.time.LIGOTimeGPS`, `float`, `str`, optional
+        end : `~gwpy.time.LIGOTimeGPS`, `float`, `str`
             GPS end time of required data, defaults to end of data found;
             any input parseable by `~gwpy.time.to_gps` is fine
 
-        frametype : `str`, optional
-            name of frametype in which this channel is stored, by default
-            will search for all required frame types
+        frametype : `str`
+            Name of frametype in which this channel is stored; if not given
+            all frametypes discoverable via GWDataFind will be searched for
+            the required channels.
 
-        frametype_match : `str`, optional
-            regular expression to use for frametype matching
+        frametype_match : `str`
+            Regular expression to use for frametype matching.
 
-        pad : `float`, optional
-            value with which to fill gaps in the source data,
+        pad : `float`
+            Value with which to fill gaps in the source data,
             by default gaps will result in a `ValueError`.
 
-        scaled : `bool`, optional
-            apply slope and bias calibration to ADC data, for non-ADC data
+        scaled : `bool`
+            Apply slope and bias calibration to ADC data, for non-ADC data
             this option has no effect.
 
-        nproc : `int`, optional, default: `1`
-            number of parallel processes to use, serial process by
-            default.
+        nproc : `int`
+            Number of parallel processes to use.
 
-        allow_tape : `bool`, optional, default: `True`
-            allow reading from frame files on (slow) magnetic tape
+        allow_tape : `bool`
+            Allow reading from frame files on (slow) magnetic tape.
 
         verbose : `bool`, optional
-            print verbose output about read progress, if ``verbose``
+            Print verbose output about read progress, if ``verbose``
             is specified as a string, this defines the prefix for the
-            progress meter
+            progress meter.
 
-        **readargs
-            any other keyword arguments to be passed to `.read()`
+        readargs
+            Any other keyword arguments to be passed to `.read()`.
+
+        Raises
+        ------
+        requests.exceptions.HTTPError
+            If the GWDataFind query fails for any reason.
+
+        RuntimeError
+            If no files are found to read, or if the read operation
+            fails.
         """
         from ..io import datafind as io_datafind
 
@@ -1236,11 +1247,18 @@
         end = to_gps(end)
 
         # -- find frametype(s)
+
+        frametypes = {}
+
         if frametype is None:
             matched = io_datafind.find_best_frametype(
-                channels, start, end, frametype_match=frametype_match,
-                allow_tape=allow_tape)
-            frametypes = {}
+                channels,
+                start,
+                end,
+                frametype_match=frametype_match,
+                allow_tape=allow_tape,
+            )
+
             # flip dict to frametypes with a list of channels
             for name, ftype in matched.items():
                 try:
@@ -1249,30 +1267,34 @@
                     frametypes[ftype] = [name]
 
             if verbose and len(frametypes) > 1:
-                gprint("Determined %d frametypes to read" % len(frametypes))
+                gprint(f"Determined {len(frametypes)} frametypes to read")
             elif verbose:
-                gprint("Determined best frametype as %r"
-                       % list(frametypes.keys())[0])
-        else:
-            frametypes = {frametype: channels}
+                gprint(f"Determined best frametype as '{list(frametypes)[0]}'")
+        else:  # use the given frametype for all channels
+            frametypes[frametype] = channels
 
         # -- read data
+
         out = cls()
         for frametype, clist in frametypes.items():
             if verbose:
-                verbose = "Reading {} frames".format(frametype)
+                verbose = f"Reading '{frametype}' data"
+
             # parse as a ChannelList
             channellist = ChannelList.from_names(*clist)
             # strip trend tags from channel names
             names = [c.name for c in channellist]
+
             # find observatory for this group
             if observatory is None:
                 try:
                     observatory = ''.join(
                         sorted(set(c.ifo[0] for c in channellist)))
                 except TypeError as exc:
-                    exc.args = "Cannot parse list of IFOs from channel names",
-                    raise
+                    raise ValueError(
+                        "Cannot parse list of IFOs from channel names",
+                    ) from exc
+
             # find frames
             cache = io_datafind.find_urls(
                 observatory,
@@ -1282,16 +1304,28 @@
                 on_gaps="error" if pad is None else "warn",
             )
             if not cache:
-                raise RuntimeError("No %s-%s frame files found for [%d, %d)"
-                                   % (observatory, frametype, start, end))
+                raise RuntimeError(
+                    f"No {observatory}-{frametype} URLs found for "
+                    f"[{start}, {end})",
+                )
+
             # read data
-            readargs.setdefault('format', 'gwf')
-            new = cls.read(cache, names, start=start, end=end, pad=pad,
-                           scaled=scaled, nproc=nproc,
-                           verbose=verbose, **readargs)
+            new = cls.read(
+                cache,
+                names,
+                start=start,
+                end=end,
+                pad=pad,
+                scaled=scaled,
+                nproc=nproc,
+                verbose=verbose,
+                **readargs,
+            )
+
             # map back to user-given channel name and append
-            out.append(type(new)((key, new[chan]) for
-                                 (key, chan) in zip(clist, names)))
+            out.append(type(new)(
+                (key, new[chan]) for (key, chan) in zip(clist, names)
+            ))
         return out
 
     @classmethod
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/timeseries/tests/test_core.py 
new/gwpy-3.0.7/gwpy/timeseries/tests/test_core.py
--- old/gwpy-3.0.5/gwpy/timeseries/tests/test_core.py   2023-06-02 
10:29:18.000000000 +0200
+++ new/gwpy-3.0.7/gwpy/timeseries/tests/test_core.py   2023-10-05 
11:47:18.000000000 +0200
@@ -107,26 +107,48 @@
             a.t0, units.Quantity(1126259462, 's'))
 
     def test_sample_rate(self):
-        """Test `gwpy.timeseries.TimeSeriesBase.sample_rate`
+        """Test `gwpy.timeseries.TimeSeriesBase.sample_rate`.
         """
         # check basic conversion from dt -> sample_rate
         a = self.create(dt=0.5)
         assert a.sample_rate == 2 * units.Hz
 
+    def test_sample_rate_del(self, array):
+        """Test that `sample_rate` cannot be deleted.
+        """
         # test that we can't delete sample_rate
-        with pytest.raises(AttributeError):
-            del a.sample_rate
+        with pytest.raises(
+            AttributeError,
+            match="(can't delete attribute|has no deleter)",
+        ):
+            del array.sample_rate
 
+    def test_sample_rate_none(self, array):
+        """Test that `sample_rate = None` is effectively a deletion.
+        """
         # check None gets preserved
-        a.sample_rate = None
-        with pytest.raises(AttributeError):
-            a._t0
-
-        # check other types
-        a.sample_rate = units.Quantity(128, units.Hz)
-        utils.assert_quantity_equal(a.dt, units.s / 128.)
-        a.sample_rate = units.Quantity(16.384, units.kiloHertz)
-        utils.assert_quantity_equal(a.dt, units.s / 16384)
+        array.sample_rate = None
+        with pytest.raises(AttributeError, match="_t0"):
+            array._t0
+
+    @pytest.mark.parametrize(("samp", "dt"), [
+        (128 * units.Hz, units.s / 128.),
+        (16.384 * units.kiloHertz, units.s / 16384),
+        (10 / units.s, units.s / 10),
+    ])
+    def test_sample_rate_type(self, array, samp, dt):
+        """Test that units and types are handled when setting `sample_rate`.
+        """
+        array.sample_rate = samp
+        utils.assert_quantity_equal(array.dt, dt)
+
+    def test_sample_rate_ghz(self, array):
+        """Test that very large sample rates don't get rounded to dt=0.
+
+        Regression: https://github.com/gwpy/gwpy/issues/1646
+        """
+        array.sample_rate = 1e9
+        assert array.dt.value > 0.
 
     def test_duration(self, array):
         assert array.duration == array.t0 + array.shape[0] * array.dt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/timeseries/tests/test_timeseries.py 
new/gwpy-3.0.7/gwpy/timeseries/tests/test_timeseries.py
--- old/gwpy-3.0.5/gwpy/timeseries/tests/test_timeseries.py     2023-06-02 
10:29:18.000000000 +0200
+++ new/gwpy-3.0.7/gwpy/timeseries/tests/test_timeseries.py     2023-10-05 
11:47:18.000000000 +0200
@@ -30,6 +30,8 @@
 import numpy
 from numpy import testing as nptest
 
+from requests.exceptions import HTTPError
+
 from scipy import signal
 
 from astropy import units
@@ -646,24 +648,34 @@
         "os.environ",
         {"GWDATAFIND_SERVER": GWOSC_DATAFIND_SERVER},
     )
-    def test_find(self, gw150914_16384):
+    @pytest.mark.parametrize("kwargs", [
+        pytest.param({"verbose": True}, id="default"),
+        pytest.param({"observatory": GWOSC_GW150914_IFO[0]}, id="observatory"),
+    ])
+    def test_find(self, gw150914_16384, kwargs):
+        """Test that `TimeSeries.find()` can actually find data.
+        """
         ts = self.TEST_CLASS.find(
             GWOSC_GW150914_CHANNEL,
             *GWOSC_GW150914_SEGMENT,
             frametype=GWOSC_GW150914_FRAMETYPE,
+            **kwargs,
         )
-        utils.assert_quantity_sub_equal(ts, gw150914_16384,
-                                        exclude=['name', 'channel', 'unit'])
-
-        # test observatory
-        ts2 = self.TEST_CLASS.find(
-            GWOSC_GW150914_CHANNEL,
-            *GWOSC_GW150914_SEGMENT,
-            frametype=GWOSC_GW150914_FRAMETYPE,
-            observatory=GWOSC_GW150914_IFO[0],
+        utils.assert_quantity_sub_equal(
+            ts,
+            gw150914_16384,
+            exclude=['name', 'channel', 'unit'],
         )
-        utils.assert_quantity_sub_equal(ts, ts2)
-        with pytest.raises(RuntimeError):
+
+    @pytest_skip_network_error
+    @mock.patch.dict(
+        "os.environ",
+        {"GWDATAFIND_SERVER": GWOSC_DATAFIND_SERVER},
+    )
+    def test_find_datafind_httperror(self):
+        """Test that HTTPErrors are presented in `find()`.
+        """
+        with pytest.raises(HTTPError):
             self.TEST_CLASS.find(
                 GWOSC_GW150914_CHANNEL,
                 *GWOSC_GW150914_SEGMENT,
@@ -671,6 +683,32 @@
                 observatory='X',
             )
 
+    @mock.patch.dict(
+        "os.environ",
+        {"GWDATAFIND_SERVER": GWOSC_DATAFIND_SERVER},
+    )
+    def test_find_datafind_runtimeerror(self):
+        """Test that empty datafind caches result in RuntimeErrors in `find()`.
+        """
+        with pytest.raises(RuntimeError):
+            self.TEST_CLASS.find(
+                GWOSC_GW150914_CHANNEL,
+                *GWOSC_GW150914_SEGMENT.shift(-1e8),  # no data available here!
+                frametype=GWOSC_GW150914_FRAMETYPE,
+            )
+
+    def test_find_observatory_error(self):
+        with pytest.raises(
+            ValueError,
+            match="Cannot parse list of IFOs from channel names",
+        ):
+            self.TEST_CLASS.find(
+                "Test",
+                0,
+                1,
+                frametype="X1_TEST",
+            )
+
     @_gwosc_cvmfs
     @mock.patch.dict(
         "os.environ",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/types/series.py 
new/gwpy-3.0.7/gwpy/types/series.py
--- old/gwpy-3.0.5/gwpy/types/series.py 2023-06-02 10:29:18.000000000 +0200
+++ new/gwpy-3.0.7/gwpy/types/series.py 2023-10-05 11:47:18.000000000 +0200
@@ -839,8 +839,7 @@
             N = min(self.shape[0], other.shape[0])
 
         # if units are the same, can shortcut
-        # NOTE: why not use isinstance here?
-        if type(other) == type(self) and other.unit == self.unit:
+        if isinstance(other, Series) and other.unit == self.unit:
             self.value[-N:] = other.value[-N:]
         # otherwise if its just a numpy array
         elif type(other) is type(self.value) or (  # noqa: E721
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy/utils/tests/test_misc.py 
new/gwpy-3.0.7/gwpy/utils/tests/test_misc.py
--- old/gwpy-3.0.5/gwpy/utils/tests/test_misc.py        2023-04-14 
17:14:06.000000000 +0200
+++ new/gwpy-3.0.7/gwpy/utils/tests/test_misc.py        2023-10-05 
11:47:18.000000000 +0200
@@ -60,7 +60,7 @@
     base = 10.
     rounded = utils_misc.round_to_power(9, base=base)
     assert base == rounded
-    assert type(base) == type(rounded)
+    assert type(base) == type(rounded)  # noqa: E721
 
 
 def test_round_to_power_error():
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy.egg-info/PKG-INFO 
new/gwpy-3.0.7/gwpy.egg-info/PKG-INFO
--- old/gwpy-3.0.5/gwpy.egg-info/PKG-INFO       2023-06-02 10:36:26.000000000 
+0200
+++ new/gwpy-3.0.7/gwpy.egg-info/PKG-INFO       2023-10-05 12:29:52.000000000 
+0200
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: gwpy
-Version: 3.0.5
+Version: 3.0.7
 Summary: A python package for gravitational-wave astrophysics
 Author-email: Duncan Macleod <duncan.macl...@ligo.org>
 License: GPL-3.0-or-later
@@ -15,21 +15,63 @@
 Classifier: Operating System :: OS Independent
 Classifier: Programming Language :: Python
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Topic :: Scientific/Engineering :: Astronomy
 Classifier: Topic :: Scientific/Engineering :: Physics
-Requires-Python: >=3.7
+Requires-Python: >=3.8
 Description-Content-Type: text/markdown
+License-File: LICENSE
+Requires-Dist: astropy>=4.3.0
+Requires-Dist: dqsegdb2
+Requires-Dist: gwdatafind>=1.1.0
+Requires-Dist: gwosc>=0.5.3
+Requires-Dist: h5py>=3.0.0
+Requires-Dist: ligo-segments>=1.0.0
+Requires-Dist: ligotimegps>=1.2.1
+Requires-Dist: matplotlib>=3.3.0
+Requires-Dist: numpy>=1.19
+Requires-Dist: python-dateutil
+Requires-Dist: requests
+Requires-Dist: scipy>=1.5.0
+Requires-Dist: tqdm>=4.10.0
 Provides-Extra: test
+Requires-Dist: coverage[toml]>=5.0; extra == "test"
+Requires-Dist: pytest>=3.9.1; extra == "test"
+Requires-Dist: pytest-freezegun; extra == "test"
+Requires-Dist: pytest-cov>=2.4.0; extra == "test"
+Requires-Dist: pytest-requires; extra == "test"
+Requires-Dist: pytest-socket; extra == "test"
+Requires-Dist: pytest-xdist; extra == "test"
+Requires-Dist: requests-mock; extra == "test"
 Provides-Extra: astro
+Requires-Dist: inspiral-range; extra == "astro"
 Provides-Extra: docs
+Requires-Dist: numpydoc>=0.8.0; extra == "docs"
+Requires-Dist: Sphinx>=4.4.0; extra == "docs"
+Requires-Dist: sphinx-automodapi; extra == "docs"
+Requires-Dist: sphinx-immaterial>=0.7.3; extra == "docs"
+Requires-Dist: sphinx-panels>=0.6.0; extra == "docs"
+Requires-Dist: sphinxcontrib-programoutput; extra == "docs"
 Provides-Extra: dev
+Requires-Dist: ciecplib; extra == "dev"
+Requires-Dist: dateparser>=1.1.2; extra == "dev"
+Requires-Dist: lalsuite; sys_platform != "win32" and extra == "dev"
+Requires-Dist: lscsoft-glue; sys_platform != "win32" and extra == "dev"
+Requires-Dist: maya; python_version < "3.11" and extra == "dev"
+Requires-Dist: psycopg2; extra == "dev"
+Requires-Dist: pycbc>=1.13.4; sys_platform != "win32" and extra == "dev"
+Requires-Dist: pymysql; extra == "dev"
+Requires-Dist: pyRXP; extra == "dev"
+Requires-Dist: python-ligo-lw>=1.7.0; sys_platform != "win32" and extra == 
"dev"
+Requires-Dist: sqlalchemy; extra == "dev"
+Requires-Dist: uproot>=4.1.5; extra == "dev"
 Provides-Extra: conda
-License-File: LICENSE
+Requires-Dist: python-framel>=8.40.1; extra == "conda"
+Requires-Dist: python-ldas-tools-framecpp; sys_platform != "win32" and extra 
== "conda"
+Requires-Dist: python-nds2-client; extra == "conda"
 
 GWpy is a collaboration-driven Python package providing tools for
 studying data from ground-based gravitational-wave detectors.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/gwpy.egg-info/requires.txt 
new/gwpy-3.0.7/gwpy.egg-info/requires.txt
--- old/gwpy-3.0.5/gwpy.egg-info/requires.txt   2023-06-02 10:36:26.000000000 
+0200
+++ new/gwpy-3.0.7/gwpy.egg-info/requires.txt   2023-10-05 12:29:52.000000000 
+0200
@@ -6,10 +6,10 @@
 ligo-segments>=1.0.0
 ligotimegps>=1.2.1
 matplotlib>=3.3.0
-numpy>=1.17
+numpy>=1.19
 python-dateutil
 requests
-scipy>=1.2.0
+scipy>=1.5.0
 tqdm>=4.10.0
 
 [astro]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/gwpy-3.0.5/pyproject.toml 
new/gwpy-3.0.7/pyproject.toml
--- old/gwpy-3.0.5/pyproject.toml       2023-06-02 10:29:18.000000000 +0200
+++ new/gwpy-3.0.7/pyproject.toml       2023-10-05 11:47:18.000000000 +0200
@@ -24,7 +24,6 @@
   "Operating System :: OS Independent",
   "Programming Language :: Python",
   "Programming Language :: Python :: 3",
-  "Programming Language :: Python :: 3.7",
   "Programming Language :: Python :: 3.8",
   "Programming Language :: Python :: 3.9",
   "Programming Language :: Python :: 3.10",
@@ -34,7 +33,7 @@
 ]
 
 # requirements
-requires-python = ">=3.7"
+requires-python = ">=3.8"
 dependencies = [
   "astropy >=4.3.0",
   "dqsegdb2",
@@ -44,10 +43,10 @@
   "ligo-segments >=1.0.0",
   "ligotimegps >=1.2.1",
   "matplotlib >=3.3.0",
-  "numpy >=1.17",
+  "numpy >=1.19",
   "python-dateutil",
   "requests",
-  "scipy >=1.2.0",
+  "scipy >=1.5.0",
   "tqdm >=4.10.0",
 ]
 

Reply via email to