From e7fb1828a2a76a67818071856a60c8b6916b82a4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 09:33:03 +0100 Subject: [PATCH 01/12] Update pre-commit --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6cb6c1247f..f5d0d43811 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -20,7 +20,7 @@ repos: - id: check-json - id: detect-private-key - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.2 + rev: v0.1.5 hooks: - id: ruff args: [holoviews] From 2ddb563974b3d11af260fe547a2c6d0437e69a37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 09:34:35 +0100 Subject: [PATCH 02/12] Update pytest-settings --- pyproject.toml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 81ea95642b..12ee392dc6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,9 @@ requires = [ ] [tool.pytest.ini_options] -addopts = "-p no:dash" +addopts = ["--strict-config", "--strict-markers"] +minversion = "7" +xfail_strict = true filterwarnings = [ # Numpy warning triggered in Bokeh, when timedelta or datetime numpy scalar are compared to a numerical scalar "ignore:elementwise comparison failed:DeprecationWarning:bokeh.core.property.bases", From 10af2737853a88f22d322925a9d7eee2a9403b5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 09:36:41 +0100 Subject: [PATCH 03/12] Update to ruff.lint --- pyproject.toml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 12ee392dc6..ee0243a7c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,9 +48,7 @@ filterwarnings = [ [tool.coverage] run.concurrency = ["greenlet"] -[tool.ruff] -target-version = "py39" - +[tool.ruff.lint] select = [ "B", "E", @@ -92,14 +90,14 @@ unfixable = [ "F401", # Unused imports ] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "__init__.py" = ["F403"] "holoviews/tests/*" = [ "RUF001", "RUF002", "RUF003", # Ambiguous unicode character "NPY002", # Replace legacy `np.random.rand` call with Generator ] -[tool.ruff.isort] +[tool.ruff.lint.isort] known-first-party = ["holoviews"] combine-as-imports = true From daa7a6352c560a2d212e185875187153a15e3686 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 09:43:54 +0100 Subject: [PATCH 04/12] Update ruff settings --- .pre-commit-config.yaml | 2 +- pyproject.toml | 6 ++++-- scripts/check_latest_packages.py | 4 ++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f5d0d43811..a9aadda216 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -24,7 +24,7 @@ repos: hooks: - id: ruff args: [holoviews] - files: holoviews/ + files: holoviews/|scripts/ - repo: https://github.com/hoxbro/clean_notebook rev: v0.1.13 hooks: diff --git a/pyproject.toml b/pyproject.toml index ee0243a7c7..19ffd394a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,6 +48,9 @@ filterwarnings = [ [tool.coverage] run.concurrency = ["greenlet"] +[tool.ruff] +fix = true + [tool.ruff.lint] select = [ "B", @@ -84,10 +87,9 @@ ignore = [ "RUF005", # Consider {expr} instead of concatenation "RUF012", # Mutable class attributes should use `typing.ClassVar` ] - -fix = true unfixable = [ "F401", # Unused imports + "F841", # Unused variables ] [tool.ruff.lint.per-file-ignores] diff --git a/scripts/check_latest_packages.py b/scripts/check_latest_packages.py index b864435ae3..21af36b8fa 100644 --- a/scripts/check_latest_packages.py +++ b/scripts/check_latest_packages.py @@ -1,7 +1,7 @@ import sys -import requests -from datetime import datetime, date, timedelta +from datetime import date, datetime, timedelta +import requests from packaging.version import Version From 0eefc4167408f439fe5d9c23e4ca3eb29e9b5f95 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 10:07:30 +0100 Subject: [PATCH 05/12] Add rst pre-commit hook --- .pre-commit-config.yaml | 6 +++++ doc/FAQ.rst | 16 ++++++------ doc/index.rst | 2 +- doc/releases.rst | 53 ++++++++++++++++++++-------------------- doc/roadmap.rst | 2 +- doc/user_guide/index.rst | 4 +-- 6 files changed, 45 insertions(+), 38 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a9aadda216..d4977d59b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -35,3 +35,9 @@ repos: - id: codespell additional_dependencies: - tomli + - repo: https://github.com/pre-commit/pygrep-hooks + rev: v1.10.0 + hooks: + - id: rst-backticks + - id: rst-directive-colons + - id: rst-inline-touching-normal diff --git a/doc/FAQ.rst b/doc/FAQ.rst index fc9bd6f715..06153662af 100644 --- a/doc/FAQ.rst +++ b/doc/FAQ.rst @@ -15,7 +15,7 @@ potential pitfalls we hope to help users avoid: which for a Pandas dataframe will default to the name of that column. If you want to define your own specific label to display for a dimension, you can provide a tuple containing the column name and your -preferred label for it. For instance, if the column is named `x_col`, +preferred label for it. For instance, if the column is named ``x_col``, you can make the label 'X Label' using: .. code:: python @@ -33,7 +33,7 @@ passing arguments (or an unpacked dictionary) to ``redim.label``: curve = curve.redim.label(x_col='X Label', y_col='Label for Y') To override a label for plotting it is also possible to use the -`xlabel` and `ylabel` plot options: +``xlabel`` and ``ylabel`` plot options: .. code:: python @@ -45,7 +45,7 @@ To override a label for plotting it is also possible to use the **A:** Pass an unpacked dictionary containing the kdims/vdims' names as keys and a tuple of the bounds as values into ``redim.range``. -This constrains the bounds of x_col to `(0, max(x_col))`. +This constrains the bounds of x_col to ``(0, max(x_col))``. .. code:: python @@ -74,13 +74,13 @@ across all objects that are presented together, so that they can be compared directly. If you don't want objects that share a dimension to be normalized together in your layout, you can change the ``axiswise`` normalization option to True, making each object be normalized -independently, e.g. for a layout of `Curve` objects use: +independently, e.g. for a layout of ``Curve`` objects use: .. code:: python your_layout.opts(opts.Curve(axiswise=True)) -Alternatively you may also set `shared_axes=False` on the Layout itself: +Alternatively you may also set ``shared_axes=False`` on the Layout itself: .. code:: python @@ -96,7 +96,7 @@ normalized independently by changing ``framewise`` to True: **Q: How do I make only a single axis be shared across a layout?** -**A:** Even when `shared_axes=True`, HoloViews will only share axes +**A:** Even when ``shared_axes=True``, HoloViews will only share axes that have the same Dimension, so just make sure that axes that you want to be independent have a different name or label. Here, the x axis should be shared, but the y should be independent: @@ -107,7 +107,7 @@ axis should be shared, but the y should be independent: hv.Curve((xs, ys), 'x', 'y') + hv.Curve((xs, ys), 'x', 'z') -**Q: Why doesn't my DynamicMap respect the `framewise=False` option for axis normalization across frames?** +**Q: Why doesn't my DynamicMap respect the ``framewise=False`` option for axis normalization across frames?** **A:** Unfortunately, HoloViews has no way of knowing the axis ranges of objects that might be returned by future calls to a DynamicMap's @@ -365,7 +365,7 @@ to the return value of that cell, if it's a HoloViews object. So, if you want a given object to get customized, you need to make sure it is returned from the cell, or the options won't ever be applied, and you should only access it after it has been returned, or the options won't -*yet* have been applied. For instance, if you use `renderer.save()` +*yet* have been applied. For instance, if you use ``renderer.save()`` to export an object and only then return that object as the output of a cell, the exported object won't have the options applied, because they don't get applied until the object is returned diff --git a/doc/index.rst b/doc/index.rst index f6b16b2e5c..fdf3210fc9 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -19,7 +19,7 @@ The `Getting-Started `_ guide explains the basic concepts and h The `User Guide `_ goes more deeply into key concepts from HoloViews, when you are ready for further study. -The `API `_ is the definitive guide to each HoloViews object, but the same information is available more conveniently via the `hv.help()` command and tab completion in the Jupyter notebook. +The `API `_ is the definitive guide to each HoloViews object, but the same information is available more conveniently via the ``hv.help()`` command and tab completion in the Jupyter notebook. If you have any `issues `_ or wish to `contribute code `_, you can visit our `GitHub site `_ or file a topic on the `HoloViz Discourse `_. diff --git a/doc/releases.rst b/doc/releases.rst index fa6b14fb3f..911d38faf0 100644 --- a/doc/releases.rst +++ b/doc/releases.rst @@ -649,7 +649,7 @@ Enhancements: - Add support to Python 3.11 (`#5513 `__) -- Cleanup the top `__init__` module +- Cleanup the top ``__init__`` module (`#5516 `__) Documentation: @@ -1054,7 +1054,7 @@ to @douglas-raillard-arm, @jenssss, @w31t1, @Hoxbro, @martinfleis, @maximlt, - Support xyzservices.TileProvider as hv.Tiles input (`#5062 `__) -- Allow reversed layout/overlay binary operators for `+` and `*` to be used with custom objects +- Allow reversed layout/overlay binary operators for ``+`` and ``*`` to be used with custom objects (`#5073 `__) - Fix internal numpy.round usage (`#5095 `__) @@ -1479,11 +1479,11 @@ Bug fixes: (`#4646 `_) - Fixed bug resetting ranges (`#4654 `_) -- Fix bug matching elements to subplots in `DynamicMap` +- Fix bug matching elements to subplots in ``DynamicMap`` (`#4649 `_) -- Ensure consistent split `Violin` color assignment +- Ensure consistent split ``Violin`` color assignment (`#4650 `_) -- Ensure `PolyDrawCallback` always has vdim data +- Ensure ``PolyDrawCallback`` always has vdim data (`#4644 `_) - Set default align in bokeh correctly (`#4637 `_) @@ -1496,12 +1496,12 @@ Enhancements: (`#4572 `_) - Add ability to listen to dataset linked_selection (`#4547 `_) -- Added `selected` parameter to Bokeh PathPlot +- Added ``selected`` parameter to Bokeh PathPlot (`#4641 `_) Documentation: -- Improved `Bars` reference example, demonstrating the dataframe constructor +- Improved ``Bars`` reference example, demonstrating the dataframe constructor (`#4656 `_) - Various documentation fixes (`#4628 `_) @@ -1520,15 +1520,15 @@ and the core maintainer @philippjfr. Bug fixes: -- Fix the `.info` property to return the info +- Fix the ``.info`` property to return the info (`#4513 `_) -- Set `toolbar=True` the default in `save()` +- Set ``toolbar=True`` the default in ``save()`` (`#4518 `_) - Fix bug when the default value is 0 (`#4537 `_) - Ensure operations do not recursively accumulate pipelines (`#4544 `_) -- Fixed whiskers for `BoxWhisker` so that they never point inwards +- Fixed whiskers for ``BoxWhisker`` so that they never point inwards (`#4548 `_) - Fix issues with boomeranging events when aspect is set (`#4569 `_) @@ -1538,9 +1538,9 @@ Bug fixes: (`#4575 `_) - Do not attempt linking axes on annotations (`#4584 `_) -- Reset `RangeXY` when `framewise` is set +- Reset ``RangeXY`` when ``framewise`` is set (`#4585 `_) -- Add automatic collate for `Overlay` of `AdjointLayout`s +- Add automatic collate for ``Overlay`` of ``AdjointLayout`` s (`#4586 `_) - Fixed color-ranging after box select on side histogram (`#4587 `_) @@ -1551,30 +1551,30 @@ Compatibility: - Compatibility with bokeh 2.2 for CDSCallback (`#4568 `_) -- Handle `rcParam` deprecations in matplotlib 3.3 +- Handle ``rcParam`` deprecations in matplotlib 3.3 (`#4583 `_) Enhancements: -- Allow toggling the `selection_mode` on `link_selections` from the +- Allow toggling the ``selection_mode`` on ``link_selections`` from the context menu in the bokeh toolbar (`#4604 `_) - Optimize options machinery (`#4545 `_) -- Add new `Derived` stream class +- Add new ``Derived`` stream class (`#4532 `_) - Set Panel state to busy during callbacks (`#4546 `_) -- Support positional stream args in `DynamicMap` callback +- Support positional stream args in ``DynamicMap`` callback (`#4534 `_) -- `legend_opts` implemented +- ``legend_opts`` implemented (`#4558 `_) -- Add `History` stream +- Add ``History`` stream (`#4554 `_) - Updated spreading operation to support aggregate arrays (`#4562 `_) -- Add ability to supply `dim` transforms for all dimensions +- Add ability to supply ``dim`` transforms for all dimensions (`#4578 `_) - Add 'vline' and 'hline' Hover mode (`#4527 `_) @@ -1603,7 +1603,7 @@ Enhancements: (`#4372 `_) * Add support for lasso tool in linked selections (`#4362 `_) -- Add support for NdOverlay in linked selections +* Add support for NdOverlay in linked selections (`#4481 `_) * Add support for unwatching on ``Params`` stream (`#4417 `_) @@ -1700,7 +1700,7 @@ Enhancements: (`#4319 `_) * Unified datetime formatting in bokeh hover info (`#4318 `_) -* Add explicit `.df` and `.xr` namespaces to `dim` expressions to +* Add explicit ``.df`` and ``.xr`` namespaces to ``dim`` expressions to allow using dataframe and xarray APIs (`#4320 `_) * Allow using dim expressions as accessors @@ -1718,7 +1718,7 @@ Bug fixes: * Fix bug when updating bokeh Arrow elements (`#4313 `_) * Fix bug where Layout/Overlay constructors would drop items - (`#4313 `_) + (`#4323 `_) Compatibility: @@ -2298,8 +2298,8 @@ Enhancements: * Allow defining hook on backend load (`#3429 `_) -* Improvements for handling graph attributes in `Graph.from_networkx` - (``#3432 `_) +* Improvements for handling graph attributes in ``Graph.from_networkx`` + (`#3432 `_) Version 1.11.1 @@ -2332,9 +2332,9 @@ Bug fixes: Enhancements: * Provide control over gridlines ticker and mirrored axis ticker by - default (`#3398 `_) + default (`#3398 `_) * Enabled colorbars on CompositePlot classes such as Graphs, Chords - etc. (`#3397 `_) + etc. (`#3396 `_) * Ensure that xarray backend retains dimension metadata when casting element (`#3401 `_) * Consistently support clim options @@ -3842,6 +3842,7 @@ Features and improvements: - Bokeh plots now support custom tick formatters specified via Dimension value\_format (PR `#728 `__). + Version 1.5 ~~~~~~~~~~~ diff --git a/doc/roadmap.rst b/doc/roadmap.rst index dee5384bb9..382a6544bf 100644 --- a/doc/roadmap.rst +++ b/doc/roadmap.rst @@ -11,7 +11,7 @@ HoloViews is maintained by a core development team who coordinate contributions - Re-implement HoloViews layouts using Panel where feasible, to allow more powerful and flexible arrangements 3. **Separate packages into holoviews-core and extensions**: - HoloViews has always been designed with a backend-independent core that helps you describe and work with your data, along with plotting-library-specific backends that generate visualizations. To make this separation explicit and to make it simpler to generate objects in contexts where no backend is available, the holoviews package needs to be split into a core (probably to be called `holoviews-core`) along with packages per extension and possibly a `holoviews` metapackage that installs all of them as the single current package does. + HoloViews has always been designed with a backend-independent core that helps you describe and work with your data, along with plotting-library-specific backends that generate visualizations. To make this separation explicit and to make it simpler to generate objects in contexts where no backend is available, the holoviews package needs to be split into a core (probably to be called ``holoviews-core``) along with packages per extension and possibly a ``holoviews`` metapackage that installs all of them as the single current package does. 4. **Improved developer docs**: Because HoloViews includes both JavaScript and Python code and both core data-description features and optional backend-specific plotting support, it can be difficult to understand how to contribute to HoloViews development. We need much better developer docs to make it simpler to join the HoloViews team! diff --git a/doc/user_guide/index.rst b/doc/user_guide/index.rst index c1974ae8f2..616965873c 100644 --- a/doc/user_guide/index.rst +++ b/doc/user_guide/index.rst @@ -106,10 +106,10 @@ These guides provide detail about specific additional features in HoloViews: Using the ``Renderer`` and ``Plot`` classes for access to the plotting machinery. `Using linked brushing to cross-filter complex datasets `_ - Explains how to use the `link_selections` helper to cross-filter multiple elements. + Explains how to use the ``link_selections`` helper to cross-filter multiple elements. `Using Annotators to edit and label data `_ - Explains how to use the `annotate` helper to edit and annotate elements with the help of drawing tools and editable tables. + Explains how to use the ``annotate`` helper to edit and annotate elements with the help of drawing tools and editable tables. `Exporting and Archiving `_ Archive both your data and visualization in scripts and notebooks. From 1aca4821166decc03eb609ad61e95c31c2c844a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 11:37:30 +0100 Subject: [PATCH 06/12] Add color --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 19ffd394a8..a7453e6b30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -6,7 +6,7 @@ requires = [ ] [tool.pytest.ini_options] -addopts = ["--strict-config", "--strict-markers"] +addopts = ["--strict-config", "--strict-markers", "--color=yes"] minversion = "7" xfail_strict = true filterwarnings = [ From a28f499044fba6b7a4038812e877824cc510e3b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 11:37:55 +0100 Subject: [PATCH 07/12] Default to error in filterwarnings --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index a7453e6b30..0af7ae47fe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,6 +10,7 @@ addopts = ["--strict-config", "--strict-markers", "--color=yes"] minversion = "7" xfail_strict = true filterwarnings = [ + "error", # Numpy warning triggered in Bokeh, when timedelta or datetime numpy scalar are compared to a numerical scalar "ignore:elementwise comparison failed:DeprecationWarning:bokeh.core.property.bases", "ignore:dropping variables using `drop` will be deprecated; using drop_vars is encouraged:PendingDeprecationWarning:xarray.core.dataarray", From b4d68a82c24c170bb3e513ffafa1fe748f3fa450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 12:01:34 +0100 Subject: [PATCH 08/12] close file --- holoviews/tests/core/test_archives.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/holoviews/tests/core/test_archives.py b/holoviews/tests/core/test_archives.py index f8a44fc379..c698a518c4 100644 --- a/holoviews/tests/core/test_archives.py +++ b/holoviews/tests/core/test_archives.py @@ -124,7 +124,8 @@ def test_filearchive_json_single_file(self): fname = f"{export_name}_metadata.json" if not os.path.isfile(fname): raise AssertionError(f"No file {fname!r} created on export.") - self.assertEqual(json.load(open(fname)), data) + with open(fname) as f: + self.assertEqual(json.load(f), data) self.assertEqual(archive.listing(), []) """ From 1bed13789d297296c426066e5ff34ac31426ca17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 12:39:32 +0100 Subject: [PATCH 09/12] Set event loop --- holoviews/tests/plotting/bokeh/test_server.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/holoviews/tests/plotting/bokeh/test_server.py b/holoviews/tests/plotting/bokeh/test_server.py index 76d2c14918..4f9f21cf8e 100644 --- a/holoviews/tests/plotting/bokeh/test_server.py +++ b/holoviews/tests/plotting/bokeh/test_server.py @@ -1,3 +1,4 @@ +import asyncio import time import param @@ -93,6 +94,13 @@ def tearDown(self): time.sleep(1) def _launcher(self, obj, threaded=True, port=6001): + try: + # In Python 3.12 this will raise a: + # `DeprecationWarning: There is no current event loop` + asyncio.get_event_loop() + except Exception: + asyncio.set_event_loop(asyncio.new_event_loop()) + self._port = port server = serve(obj, threaded=threaded, show=False, port=port) time.sleep(0.5) From 9cd6a7c3b464f7ebe9f83e3c31c3d7309bf1bfce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 12:47:30 +0100 Subject: [PATCH 10/12] Color output of check_latest packages --- scripts/check_latest_packages.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/check_latest_packages.py b/scripts/check_latest_packages.py index 21af36b8fa..c11f64f11b 100644 --- a/scripts/check_latest_packages.py +++ b/scripts/check_latest_packages.py @@ -7,7 +7,8 @@ def main(*packages): allowed_date = date.today() - timedelta(days=5) - is_latest = True + GREEN, RED, RESET = "\033[92m", "\033[91m", "\033[0m" + all_latest = True for package in sorted(packages): url = f"https://pypi.org/pypi/{package}/json" resp = requests.get(url).json() @@ -22,14 +23,16 @@ def main(*packages): ).date() version_check = Version(current) >= Version(latest) - date_check = allowed_date >= latest_release_date - is_latest &= version_check or date_check + date_check = current_release_date >= allowed_date + is_latest = version_check or date_check + all_latest &= is_latest + text_color = GREEN if is_latest else RED print( - f"Package: {package:<10} Current: {current:<7} ({current_release_date})\tLatest: {latest:<7} ({latest_release_date})" + f"{text_color}Package: {package:<10} Current: {current:<7} ({current_release_date})\tLatest: {latest:<7} ({latest_release_date}){RESET}" ) - if not is_latest: + if not all_latest: sys.exit(1) From b9e67c64a4c700cee8c5c4460beaea11ac60a8de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 13:49:03 +0100 Subject: [PATCH 11/12] Remove holoviews from args --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d4977d59b0..d66d594b9b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,6 @@ repos: rev: v0.1.5 hooks: - id: ruff - args: [holoviews] files: holoviews/|scripts/ - repo: https://github.com/hoxbro/clean_notebook rev: v0.1.13 From 65d458f972040e5064176f7ed183b0c6233f4cc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20H=C3=B8xbro=20Hansen?= Date: Fri, 17 Nov 2023 13:54:41 +0100 Subject: [PATCH 12/12] Add timeout --- scripts/check_latest_packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/check_latest_packages.py b/scripts/check_latest_packages.py index c11f64f11b..9fcada6001 100644 --- a/scripts/check_latest_packages.py +++ b/scripts/check_latest_packages.py @@ -11,7 +11,7 @@ def main(*packages): all_latest = True for package in sorted(packages): url = f"https://pypi.org/pypi/{package}/json" - resp = requests.get(url).json() + resp = requests.get(url, timeout=20).json() latest = resp["info"]["version"] current = __import__(package).__version__