From 22baff33fe71851c384fb591927b8f688c64a69c Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Mon, 20 Nov 2023 11:09:00 +0100 Subject: [PATCH 1/3] Use https for pytables docs --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index 4bcb2131e40..5d49b172a0c 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -388,7 +388,7 @@ def setup(app): "numpy": ("https://numpy.org/doc/stable/", None), "scipy": ("https://docs.scipy.org/doc/scipy/", None), "astropy": ("https://docs.astropy.org/en/latest/", None), - "pytables": ("http://www.pytables.org/", None), + "pytables": ("https://www.pytables.org/", None), "pandas": ("https://pandas.pydata.org/pandas-docs/stable/", None), "matplotlib": ("https://matplotlib.org/stable", None), "cython": ("https://docs.cython.org/en/latest/", None), From a503333c89cf12c0cf328fa2b1471b41d6c72397 Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Mon, 20 Nov 2023 11:10:05 +0100 Subject: [PATCH 2/3] Use example.org instead of google.com in test --- ctapipe/io/tests/test_metadata.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctapipe/io/tests/test_metadata.py b/ctapipe/io/tests/test_metadata.py index 1a9177f89af..a69e9be76ab 100644 --- a/ctapipe/io/tests/test_metadata.py +++ b/ctapipe/io/tests/test_metadata.py @@ -115,7 +115,7 @@ def test_from_dict(): data_association="Subarray", data_model_name="Unofficial DL1", data_model_version="1.0", - data_model_url="http://google.com", + data_model_url="https://example.org", format="hdf5", ), process=meta.Process(type_="Simulation", subtype="Prod3b", id_="423442"), From 30fd288f7e1729a3653a61b3549372a917cb3f9b Mon Sep 17 00:00:00 2001 From: Maximilian Linhoff Date: Mon, 20 Nov 2023 11:29:24 +0100 Subject: [PATCH 3/3] Use NamedTemporayFile instead of mktemp --- ctapipe/visualization/bokeh.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ctapipe/visualization/bokeh.py b/ctapipe/visualization/bokeh.py index cdfeceebf7b..0a764ac70b9 100644 --- a/ctapipe/visualization/bokeh.py +++ b/ctapipe/visualization/bokeh.py @@ -1,6 +1,6 @@ import sys -import tempfile from abc import ABCMeta +from tempfile import NamedTemporaryFile import astropy.units as u import matplotlib.pyplot as plt @@ -134,7 +134,10 @@ def show(self): output_notebook() else: # this only sets the default name, created only when show is called - output_file(tempfile.mktemp(prefix="ctapipe_bokeh_", suffix=".html")) + tmp = NamedTemporaryFile( + delete=False, prefix="ctapipe_bokeh_", suffix=".html" + ) + output_file(tmp.name) self._handle = show(self.figure, notebook_handle=self._use_notebook)