ignore hashing for output of delivery objects
@@ -34,6 +34,7 @@ import pydicom
import pymedphys
import timeago
+from pymedphys._utilities.controlpoints import to_tuple
from pymedphys.labs.managelogfiles import index as pmp_index
"""
@@ -237,22 +238,27 @@ def show_status_indicators():
show_status_indicators()
-@st.cache
+def calculate_delivery_hash(delivery):
+ return hash(to_tuple(delivery))
+
+
+@st.cache(allow_output_mutation=True)
def delivery_from_icom(icom_stream):
return pymedphys.Delivery.from_icom(icom_stream)
-@st.cache
+@st.cache(allow_output_mutation=True)
def delivery_from_tel(tel_path):
return pymedphys.Delivery.from_monaco(tel_path)
-@st.cache
+@st.cache(allow_output_mutation=True)
def delivery_from_trf(pandas_table):
- return pymedphys.Delivery._from_pandas(pandas_table)
+ return pymedphys.Delivery._from_pandas( # pylint: disable = protected-access
+ pandas_table
+ )
-@st.cache
def cached_deliveries_loading(inputs, method_function):
deliveries = []
