From 50314156925f71481c8d6cecce746de045199af7 Mon Sep 17 00:00:00 2001
From: Falco Weichselbaum <f.weichselbaum@fz-juelich.de>
Date: Tue, 2 Nov 2021 15:45:47 +0100
Subject: [PATCH] removed dask from requirements.txt since it does not load in
 GitLab. Removed __init__.py in keras_legacy, because it was unnecessary and
 wrong. Changed string to rawstring in PyTestRegex() calls.

---
 mlair/keras_legacy/__init__.py                  | 3 ---
 requirements.txt                                | 4 +---
 test/test_helpers/test_helpers.py               | 2 +-
 test/test_model_modules/test_inception_model.py | 2 +-
 test/test_run_modules/test_training.py          | 2 +-
 5 files changed, 4 insertions(+), 9 deletions(-)
 delete mode 100644 mlair/keras_legacy/__init__.py

diff --git a/mlair/keras_legacy/__init__.py b/mlair/keras_legacy/__init__.py
deleted file mode 100644
index b0402569..00000000
--- a/mlair/keras_legacy/__init__.py
+++ /dev/null
@@ -1,3 +0,0 @@
-""" the modules in this directory are TAKEN FROM Keras 2.2.0 """
-from mlair.mlair.keras_legacy import interfaces
-from mlair.mlair.keras_legacy import conv_utils
diff --git a/requirements.txt b/requirements.txt
index 79f08010..8d21c80d 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,4 +1,4 @@
-## this list was generated using pipreqs on mlair/
+## this list was generated using pipreqs on mlair/ directory
 astropy==4.1
 auto_mix_prep==0.2.0
 Cartopy==0.18.0
@@ -21,5 +21,3 @@ tensorflow==2.5.0
 typing_extensions==3.7.4.3
 wget==3.2
 xarray==0.16.2
-
-dask
\ No newline at end of file
diff --git a/test/test_helpers/test_helpers.py b/test/test_helpers/test_helpers.py
index 91f2278a..99a5d65d 100644
--- a/test/test_helpers/test_helpers.py
+++ b/test/test_helpers/test_helpers.py
@@ -284,7 +284,7 @@ class TestLogger:
     def test_setup_logging_path_given(self, mock_makedirs):
         path = "my/test/path"
         log_path = Logger.setup_logging_path(path)
-        assert PyTestRegex("my/test/path/logging_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}\.log") == log_path
+        assert PyTestRegex(r"my/test/path/logging_\d{4}-\d{2}-\d{2}_\d{2}-\d{2}-\d{2}\.log") == log_path
 
     def test_logger_console_level0(self, logger):
         consol = logger.logger_console(0)
diff --git a/test/test_model_modules/test_inception_model.py b/test/test_model_modules/test_inception_model.py
index 0dc5271c..7ab88f41 100644
--- a/test/test_model_modules/test_inception_model.py
+++ b/test/test_model_modules/test_inception_model.py
@@ -226,7 +226,7 @@ class TestInceptionModelBase:
         assert self.step_in(block_pool2._keras_history[0], depth=3).name == 'Block_1d_Pad'
         assert isinstance(self.step_in(block_pool2._keras_history[0], depth=3), ReflectionPadding2D)
         # check naming of concat layer
-        assert block.name == PyTestRegex('Block_1_Co(_\d*)?/concat:0')
+        assert block.name == PyTestRegex(r'Block_1_Co(_\d*)?/concat:0')
         assert block._keras_history[0].name == 'Block_1_Co'
         assert isinstance(block._keras_history[0], keras.layers.merge.Concatenate)
         # next block
diff --git a/test/test_run_modules/test_training.py b/test/test_run_modules/test_training.py
index da63012f..9d633a34 100644
--- a/test/test_run_modules/test_training.py
+++ b/test/test_run_modules/test_training.py
@@ -7,7 +7,7 @@ import shutil
 import tensorflow.keras as keras
 import mock
 import pytest
-from keras.callbacks import History
+from tensorflow.keras.callbacks import History
 
 from mlair.data_handler import DataCollection, KerasIterator, DefaultDataHandler
 from mlair.helpers import PyTestRegex
-- 
GitLab