From e47961947f5bc65563276cbbe899fe3db888f95b Mon Sep 17 00:00:00 2001
From: leufen1 <l.leufen@fz-juelich.de>
Date: Wed, 3 Nov 2021 17:29:35 +0100
Subject: [PATCH] pipreqs does not return all required packages. added
 requirements_tf2.txt with all dependencies. Check on other platforms for
 compatibility

---
 mlair/plotting/data_insight_plotting.py |  9 +++
 requirements_tf2.txt                    | 82 +++++++++++++++++++++++++
 2 files changed, 91 insertions(+)
 create mode 100644 requirements_tf2.txt

diff --git a/mlair/plotting/data_insight_plotting.py b/mlair/plotting/data_insight_plotting.py
index 61804937..68068533 100644
--- a/mlair/plotting/data_insight_plotting.py
+++ b/mlair/plotting/data_insight_plotting.py
@@ -864,6 +864,15 @@ def f_proc_2(g, m, pos, variables_dim, time_dim, f_index):  # pragma: no cover
         g.id_class.load_lazy() if g.id_class.lazy is True else None
     if m == 0:
         d = g.id_class._data
+        if d is None:
+            window_dim = g.id_class.window_dim
+            history = g.id_class.history
+            last_entry = history.coords[window_dim][-1]
+            d1 = history.sel({window_dim: last_entry}, drop=True)
+            label = g.id_class.label
+            first_entry = label.coords[window_dim][0]
+            d2 = label.sel({window_dim: first_entry}, drop=True)
+            d = (d1, d2)
     else:
         gd = g.id_class
         filter_sel = {"filter": gd.input_data.coords["filter"][m - 1]}
diff --git a/requirements_tf2.txt b/requirements_tf2.txt
new file mode 100644
index 00000000..ceb92601
--- /dev/null
+++ b/requirements_tf2.txt
@@ -0,0 +1,82 @@
+absl-py==0.15.0
+astropy==4.1
+astunparse==1.6.3
+attrs==21.2.0
+auto-mix-prep==0.2.0
+cached-property==1.5.2
+cachetools==4.2.4
+certifi==2021.10.8
+cftime==1.5.1.1
+chardet==4.0.0
+cycler==0.11.0
+dask==2021.3.0
+dataclasses==0.8
+dill==0.3.3
+flatbuffers==1.12
+fsspec==2021.10.1
+gast==0.4.0
+google-auth==2.3.3
+google-auth-oauthlib==0.4.6
+google-pasta==0.2.0
+grpcio==1.34.1
+h5py==3.1.0
+idna==2.10
+importlib-metadata==4.8.1
+iniconfig==1.1.1
+keras==2.6.0
+keras-nightly==2.5.0.dev2021032900
+Keras-Preprocessing==1.1.2
+kiwisolver==1.3.1
+locket==0.2.1
+Markdown==3.3.4
+matplotlib==3.3.4
+mock==4.0.3
+netCDF4==1.5.8
+numpy==1.19.5
+oauthlib==3.1.1
+opt-einsum==3.3.0
+packaging==21.2
+pandas==1.1.5
+partd==1.2.0
+patsy==0.5.2
+Pillow==8.4.0
+pluggy==0.13.1
+protobuf==3.19.1
+psutil==5.8.0
+py==1.10.0
+pyasn1==0.4.8
+pyasn1-modules==0.2.8
+pydot==1.4.2
+pydub==0.25.1
+pyparsing==2.4.7
+pyshp==2.1.3
+pytest==6.2.2
+python-dateutil==2.8.2
+pytz==2021.3
+PyYAML==6.0
+requests==2.25.1
+requests-oauthlib==1.3.0
+rsa==4.7.2
+scipy==1.5.2
+seaborn==0.11.1
+six==1.15.0
+statsmodels==0.12.2
+tabulate==0.8.9
+tensorboard==2.7.0
+tensorboard-data-server==0.6.1
+tensorboard-plugin-wit==1.8.0
+tensorflow==2.5.0
+tensorflow-estimator==2.5.0
+termcolor==1.1.0
+toml==0.10.2
+toolz==0.11.1
+typing-extensions==3.7.4.3
+urllib3==1.26.7
+Werkzeug==2.0.2
+wget==3.2
+wrapt==1.12.1
+xarray==0.16.2
+zipp==3.6.0
+
+--no-binary shapely Shapely==1.7.0
+Cartopy==0.18.0
\ No newline at end of file
-- 
GitLab