From 44d2b332e61e196e4fe7e243b6070c894bab9fa5 Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 12 Jan 2022 16:37:21 +0100 Subject: [PATCH 1/3] Fix log message duration=0 --- RoofClassify/toolbelt/log_handler.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RoofClassify/toolbelt/log_handler.py b/RoofClassify/toolbelt/log_handler.py index 9857848..7bf6c20 100644 --- a/RoofClassify/toolbelt/log_handler.py +++ b/RoofClassify/toolbelt/log_handler.py @@ -104,7 +104,7 @@ def log( if push: # calc duration - if not duration: + if duration is None: duration = (log_level + 1) * 3 # create message with/out a widget From a053960fd0ffcda926de553a92927816a5809b6b Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 12 Jan 2022 16:37:38 +0100 Subject: [PATCH 2/3] fix minor type warn --- docs/conf.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/conf.py b/docs/conf.py index d73a122..139fa68 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -132,7 +132,7 @@ "version": version, } -myst_url_schemes = ("http", "https", "mailto") +myst_url_schemes = ["http", "https", "mailto"] # OpenGraph ogp_image = f"{__about__.__uri_homepage__}_static/gui_form_classification.png" From d8eaf49416c81a74a56045e56820a6c427a8d4e6 Mon Sep 17 00:00:00 2001 From: Julien Date: Wed, 12 Jan 2022 16:39:55 +0100 Subject: [PATCH 3/3] Enforce missing deps warning --- RoofClassify/plugin_main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/RoofClassify/plugin_main.py b/RoofClassify/plugin_main.py index c8d62fa..2329d40 100644 --- a/RoofClassify/plugin_main.py +++ b/RoofClassify/plugin_main.py @@ -103,11 +103,14 @@ def check_dependencies(self) -> None: QDesktopServices.openUrl, QUrl(f"{__uri_homepage__}/usage/installation"), ), + duration=0, ) for action in self.actions: action.setEnabled(False) else: self.log(message=self.tr("Dependencies satisfied"), log_level=4) + for action in self.actions: + action.setEnabled(True) def tr(self, message): """Get the translation for a string using Qt translation API. @@ -209,7 +212,8 @@ def initGui(self): ) # -- Post UI initialization - self.iface.initializationCompleted.connect(self.check_dependencies) + # self.iface.initializationCompleted.connect(self.check_dependencies) + self.check_dependencies() def unload(self): """Removes the plugin menu item and icon from QGIS GUI."""