From 6949c2c35dd7a0022586cc68e693df60e0a22611 Mon Sep 17 00:00:00 2001 From: Kris Kristoffer Dreher <40358298+kdreher@users.noreply.github.com> Date: Fri, 11 Oct 2024 10:50:36 +0200 Subject: [PATCH 1/3] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0693fe7e..7f89dd3d 100755 --- a/README.md +++ b/README.md @@ -263,4 +263,4 @@ Gröhl, Janek, Kris K. Dreher, Melanie Schellenberg, Tom Rix, Niklas Holzwarth, This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No. [101002198]). -![ERC](docs/source/images/LOGO_ERC-FLAG_EU_.jpg "ERC") +![ERC](https://github.com/IMSY-DKFZ/simpa/raw/main/docs/source/images/LOGO_ERC-FLAG_EU_.jpg "ERC") From 63b09d70a675cd9b4ee5d4e40067b67a370a12e1 Mon Sep 17 00:00:00 2001 From: faberno Date: Thu, 7 Nov 2024 17:13:44 +0100 Subject: [PATCH 2/3] added .get() to settings class --- simpa/utils/settings.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/simpa/utils/settings.py b/simpa/utils/settings.py index 447ff48d..27f0871f 100644 --- a/simpa/utils/settings.py +++ b/simpa/utils/settings.py @@ -69,6 +69,11 @@ def __delitem__(self, key): except KeyError: raise KeyError("The key '{}' is not in the Settings dictionary".format(key)) from None + def get(self, key, default=None): + if self.__contains__(key): + return self[key] + return default + def get_volume_dimensions_voxels(self): """ returns: tuple From 66fa6c5b726bd5c61288573dfd29230dd8f3ad9a Mon Sep 17 00:00:00 2001 From: faberno Date: Fri, 15 Nov 2024 11:55:24 +0100 Subject: [PATCH 3/3] changed to idiomatic syntax --- simpa/utils/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simpa/utils/settings.py b/simpa/utils/settings.py index 27f0871f..9d9d496f 100644 --- a/simpa/utils/settings.py +++ b/simpa/utils/settings.py @@ -70,7 +70,7 @@ def __delitem__(self, key): raise KeyError("The key '{}' is not in the Settings dictionary".format(key)) from None def get(self, key, default=None): - if self.__contains__(key): + if key in self: return self[key] return default