From fb6e704411c803b2d1fbb70515382c3b1b4372dd Mon Sep 17 00:00:00 2001 From: Samweli Date: Thu, 12 Sep 2024 13:15:37 +0300 Subject: [PATCH 1/9] draft changes for datasets date filtering tool --- LDMP/gui/WidgetMain.ui | 92 ++++++++++++++++++++++++++++++++++++++++-- LDMP/jobs/mvc.py | 16 +++++++- LDMP/main_widget.py | 11 +++++ 3 files changed, 114 insertions(+), 5 deletions(-) diff --git a/LDMP/gui/WidgetMain.ui b/LDMP/gui/WidgetMain.ui index a1a4eafb3..c16bb0fbf 100644 --- a/LDMP/gui/WidgetMain.ui +++ b/LDMP/gui/WidgetMain.ui @@ -18,7 +18,7 @@ - 0 + 1 @@ -41,7 +41,7 @@ Datasets - + @@ -65,7 +65,7 @@ for running algorithms and their results. Search... - + true @@ -82,6 +82,79 @@ for running algorithms and their results. + + + + + + + Filter by date + + + true + + + false + + + true + + + + + + Start + + + + + + + End + + + + + + + + + + + 0 + 0 + 0 + 2021 + 1 + 1 + + + + + + + + + 0 + 0 + 0 + 2021 + 12 + 1 + + + + + 2021 + 12 + 1 + + + + + + + @@ -154,10 +227,21 @@ for running algorithms and their results. + + QgsCollapsibleGroupBox + QGroupBox +
qgscollapsiblegroupbox.h
+ 1 +
+ + QgsDateTimeEdit + QDateTimeEdit +
qgsdatetimeedit.h
+
QgsFilterLineEdit QLineEdit -
qgis.gui
+
qgsfilterlineedit.h
diff --git a/LDMP/jobs/mvc.py b/LDMP/jobs/mvc.py index 1622af69e..bfe408455 100644 --- a/LDMP/jobs/mvc.py +++ b/LDMP/jobs/mvc.py @@ -99,6 +99,13 @@ class JobsSortFilterProxyModel(QtCore.QSortFilterProxyModel): def __init__(self, current_sort_field: SortField, *args, **kwargs): super().__init__(*args, **kwargs) self.current_sort_field = current_sort_field + self.start_date = None + self.end_date = None + + def set_date_filter(self, start_date, end_date): + self.start_date = start_date + self.end_date = end_date + self.invalidateFilter() def filterAcceptsRow(self, source_row: int, source_parent: QtCore.QModelIndex): jobs_model = self.sourceModel() @@ -118,7 +125,14 @@ def filterAcceptsRow(self, source_row: int, source_parent: QtCore.QModelIndex): elif self.type_filter == TypeFilter.VECTOR: matches_type = job.is_vector() - return matches_filter and matches_type + # Date filtering logic + matches_date = True + if self.start_date and self.end_date: + job_start_date = QtCore.QDate.fromString(job.start_date, "yyyy-MM-dd") + job_end_date = QtCore.QDate.fromString(job.end_date, "yyyy-MM-dd") + matches_date = job_start_date >= self.start_date and job_end_date <= self.end_date + + return matches_filter and matches_type and matches_date def lessThan(self, left: QtCore.QModelIndex, right: QtCore.QModelIndex) -> bool: model = self.sourceModel() diff --git a/LDMP/main_widget.py b/LDMP/main_widget.py index 74c5a6eb9..fd3932823 100644 --- a/LDMP/main_widget.py +++ b/LDMP/main_widget.py @@ -161,6 +161,17 @@ def __init__( self.pushButton_download.setEnabled(True) self.setWindowTitle(DOCK_TITLE) + self.start_dte.dateChanged(self.date_filter_changed) + self.end_dte.dateChanged(self.date_filter_changed) + + + def date_filter_changed(self): + start_date = self.start_dte.dateTime() + end_date = self.end_date.dateTime() + + if self.proxy_model: + self.proxy_model.set_date_filter(start_date, end_date) + def setup_datasets_page_gui(self): self.pushButton_refresh.setIcon( QtGui.QIcon(os.path.join(ICON_PATH, "mActionRefresh.svg")) From c44ea6c518cf8ab4210f0eb6490d1925ceca5f44 Mon Sep 17 00:00:00 2001 From: Samweli Date: Wed, 6 Nov 2024 15:28:14 +0300 Subject: [PATCH 2/9] fix bugs in datasets date filtering --- LDMP/jobs/mvc.py | 8 ++++++-- LDMP/main_widget.py | 6 +++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/LDMP/jobs/mvc.py b/LDMP/jobs/mvc.py index bfe408455..d144b60da 100644 --- a/LDMP/jobs/mvc.py +++ b/LDMP/jobs/mvc.py @@ -128,8 +128,12 @@ def filterAcceptsRow(self, source_row: int, source_parent: QtCore.QModelIndex): # Date filtering logic matches_date = True if self.start_date and self.end_date: - job_start_date = QtCore.QDate.fromString(job.start_date, "yyyy-MM-dd") - job_end_date = QtCore.QDate.fromString(job.end_date, "yyyy-MM-dd") + job_start_date = QtCore.QDateTime.fromString( + job.start_date.strftime("%Y-%m-%d %H:%M:%S"), + "yyyy-MM-dd HH:mm:ss") + job_end_date = QtCore.QDateTime.fromString( + job.end_date.strftime("%Y-%m-%d %H:%M:%S"), + "yyyy-MM-dd HH:mm:ss") matches_date = job_start_date >= self.start_date and job_end_date <= self.end_date return matches_filter and matches_type and matches_date diff --git a/LDMP/main_widget.py b/LDMP/main_widget.py index fd3932823..feed7b297 100644 --- a/LDMP/main_widget.py +++ b/LDMP/main_widget.py @@ -161,13 +161,13 @@ def __init__( self.pushButton_download.setEnabled(True) self.setWindowTitle(DOCK_TITLE) - self.start_dte.dateChanged(self.date_filter_changed) - self.end_dte.dateChanged(self.date_filter_changed) + self.start_dte.dateChanged.connect(self.date_filter_changed) + self.end_dte.dateChanged.connect(self.date_filter_changed) def date_filter_changed(self): start_date = self.start_dte.dateTime() - end_date = self.end_date.dateTime() + end_date = self.end_dte.dateTime() if self.proxy_model: self.proxy_model.set_date_filter(start_date, end_date) From ff01954f86720e91211a29fdc2d4570ecd0ca2fa Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 12:30:01 +0000 Subject: [PATCH 3/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- LDMP/jobs/mvc.py | 12 +++++++----- LDMP/main_widget.py | 1 - 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/LDMP/jobs/mvc.py b/LDMP/jobs/mvc.py index d144b60da..986b4b2ef 100644 --- a/LDMP/jobs/mvc.py +++ b/LDMP/jobs/mvc.py @@ -129,12 +129,14 @@ def filterAcceptsRow(self, source_row: int, source_parent: QtCore.QModelIndex): matches_date = True if self.start_date and self.end_date: job_start_date = QtCore.QDateTime.fromString( - job.start_date.strftime("%Y-%m-%d %H:%M:%S"), - "yyyy-MM-dd HH:mm:ss") + job.start_date.strftime("%Y-%m-%d %H:%M:%S"), "yyyy-MM-dd HH:mm:ss" + ) job_end_date = QtCore.QDateTime.fromString( - job.end_date.strftime("%Y-%m-%d %H:%M:%S"), - "yyyy-MM-dd HH:mm:ss") - matches_date = job_start_date >= self.start_date and job_end_date <= self.end_date + job.end_date.strftime("%Y-%m-%d %H:%M:%S"), "yyyy-MM-dd HH:mm:ss" + ) + matches_date = ( + job_start_date >= self.start_date and job_end_date <= self.end_date + ) return matches_filter and matches_type and matches_date diff --git a/LDMP/main_widget.py b/LDMP/main_widget.py index feed7b297..d402a7574 100644 --- a/LDMP/main_widget.py +++ b/LDMP/main_widget.py @@ -164,7 +164,6 @@ def __init__( self.start_dte.dateChanged.connect(self.date_filter_changed) self.end_dte.dateChanged.connect(self.date_filter_changed) - def date_filter_changed(self): start_date = self.start_dte.dateTime() end_date = self.end_dte.dateTime() From b10281272db9989586ba4c3d4b9033d21dbf2bff Mon Sep 17 00:00:00 2001 From: Samweli Date: Wed, 13 Nov 2024 14:45:58 +0300 Subject: [PATCH 4/9] save date filters input state --- LDMP/conf.py | 7 ++++++ LDMP/main_widget.py | 54 ++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 58 insertions(+), 3 deletions(-) diff --git a/LDMP/conf.py b/LDMP/conf.py index dcc0fdc11..94db36ddc 100644 --- a/LDMP/conf.py +++ b/LDMP/conf.py @@ -52,6 +52,10 @@ class Setting(enum.Enum): UNKNOWN_AREA_OF_INTEREST = "private/unknown_area_of_interest" PRIOR_LOCALE = "private/prior_locale" + DATE_FILTER_ENABLED = "filters/date_filter_enabled" + FILTER_START_DATE = "filters/start_date" + FILTER_END_DATE = "filters/end_date" + DEBUG = "advanced/debug" BINARIES_ENABLED = "advanced/binaries_enabled" BINARIES_DIR = "advanced/binaries_folder" @@ -116,6 +120,9 @@ class SettingsManager: Setting.CUSTOM_CRS: "epsg:4326", Setting.POLL_REMOTE: True, Setting.DOWNLOAD_RESULTS: True, + Setting.DATE_FILTER_ENABLED: False, + Setting.FILTER_START_DATE: "", + Setting.FILTER_END_DATE: "", Setting.BUFFER_CHECKED: False, Setting.AREA_FROM_OPTION: AreaSetting.COUNTRY_REGION.value, Setting.POINT_X: 0.0, diff --git a/LDMP/main_widget.py b/LDMP/main_widget.py index d402a7574..fd45e9600 100644 --- a/LDMP/main_widget.py +++ b/LDMP/main_widget.py @@ -119,6 +119,8 @@ def __init__( self.message_bar_sort_filter = None + self.proxy_model = None + job_manager.refreshed_local_state.connect(self.refresh_after_cache_update) job_manager.refreshed_from_remote.connect(self.refresh_after_cache_update) job_manager.downloaded_job_results.connect(self.refresh_after_cache_update) @@ -161,12 +163,56 @@ def __init__( self.pushButton_download.setEnabled(True) self.setWindowTitle(DOCK_TITLE) + date_filter_enabled = settings_manager.get_value( + Setting.DATE_FILTER_ENABLED + ) + + if not date_filter_enabled: + date_filter_enabled = False + + self.date_filter_group.setChecked( + date_filter_enabled + ) + + settings_start_date = settings_manager.get_value( + Setting.FILTER_START_DATE + ) + settings_end_date = settings_manager.get_value( + Setting.FILTER_END_DATE + ) + if settings_start_date != "" and settings_end_date != "": + start_date = QtCore.QDateTime.fromString( + settings_start_date, "yyyy-MM-dd HH:mm:ss") + end_date = QtCore.QDateTime.fromString( + settings_end_date, "yyyy-MM-dd HH:mm:ss") + + self.start_dte.setDateTime(start_date) + self.end_dte.setDateTime(end_date) + + self.date_filter_group.toggled.connect(self.date_filter_group_toggled) self.start_dte.dateChanged.connect(self.date_filter_changed) self.end_dte.dateChanged.connect(self.date_filter_changed) - def date_filter_changed(self): - start_date = self.start_dte.dateTime() - end_date = self.end_dte.dateTime() + def date_filter_group_toggled(self, value): + settings_manager.write_value( + Setting.DATE_FILTER_ENABLED, + value + ) + self.date_filter_changed(disabled=not value) + + def date_filter_changed(self, disabled=False): + settings_manager.write_value( + Setting.FILTER_START_DATE, + self.start_dte.dateTime().toString("yyyy-MM-dd HH:mm:ss") + ) + + settings_manager.write_value( + Setting.FILTER_END_DATE, + self.end_dte.dateTime().toString("yyyy-MM-dd HH:mm:ss") + ) + + start_date = self.start_dte.dateTime() if not disabled else None + end_date = self.end_dte.dateTime() if not disabled else None if self.proxy_model: self.proxy_model.set_date_filter(start_date, end_date) @@ -299,6 +345,8 @@ def refresh_after_cache_update(self): # self.datasets_tv.setModel(model) self.proxy_model = jobs_mvc.JobsSortFilterProxyModel(SortField.DATE) self.type_filter_changed(TypeFilter.ALL) + self.date_filter_changed() + self.filter_changed("") action = self.filter_menu.actions()[0] action.setChecked(True) From ffb077587365881279d5a838f2eba977dc39c69e Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 11:48:35 +0000 Subject: [PATCH 5/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- LDMP/main_widget.py | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/LDMP/main_widget.py b/LDMP/main_widget.py index fd45e9600..b60df7da3 100644 --- a/LDMP/main_widget.py +++ b/LDMP/main_widget.py @@ -163,28 +163,22 @@ def __init__( self.pushButton_download.setEnabled(True) self.setWindowTitle(DOCK_TITLE) - date_filter_enabled = settings_manager.get_value( - Setting.DATE_FILTER_ENABLED - ) + date_filter_enabled = settings_manager.get_value(Setting.DATE_FILTER_ENABLED) if not date_filter_enabled: date_filter_enabled = False - self.date_filter_group.setChecked( - date_filter_enabled - ) + self.date_filter_group.setChecked(date_filter_enabled) - settings_start_date = settings_manager.get_value( - Setting.FILTER_START_DATE - ) - settings_end_date = settings_manager.get_value( - Setting.FILTER_END_DATE - ) + settings_start_date = settings_manager.get_value(Setting.FILTER_START_DATE) + settings_end_date = settings_manager.get_value(Setting.FILTER_END_DATE) if settings_start_date != "" and settings_end_date != "": start_date = QtCore.QDateTime.fromString( - settings_start_date, "yyyy-MM-dd HH:mm:ss") + settings_start_date, "yyyy-MM-dd HH:mm:ss" + ) end_date = QtCore.QDateTime.fromString( - settings_end_date, "yyyy-MM-dd HH:mm:ss") + settings_end_date, "yyyy-MM-dd HH:mm:ss" + ) self.start_dte.setDateTime(start_date) self.end_dte.setDateTime(end_date) @@ -194,21 +188,18 @@ def __init__( self.end_dte.dateChanged.connect(self.date_filter_changed) def date_filter_group_toggled(self, value): - settings_manager.write_value( - Setting.DATE_FILTER_ENABLED, - value - ) + settings_manager.write_value(Setting.DATE_FILTER_ENABLED, value) self.date_filter_changed(disabled=not value) def date_filter_changed(self, disabled=False): settings_manager.write_value( Setting.FILTER_START_DATE, - self.start_dte.dateTime().toString("yyyy-MM-dd HH:mm:ss") + self.start_dte.dateTime().toString("yyyy-MM-dd HH:mm:ss"), ) settings_manager.write_value( Setting.FILTER_END_DATE, - self.end_dte.dateTime().toString("yyyy-MM-dd HH:mm:ss") + self.end_dte.dateTime().toString("yyyy-MM-dd HH:mm:ss"), ) start_date = self.start_dte.dateTime() if not disabled else None From fdeef672649187a6b76adb0186970c218fd5f6e4 Mon Sep 17 00:00:00 2001 From: Samweli Date: Sat, 16 Nov 2024 20:09:16 +0300 Subject: [PATCH 6/9] added additional metadata dialog for the download tool --- LDMP/dataset_additional_metadata.py | 30 +++++ LDMP/download_data.py | 11 +- LDMP/gui/DlgDatasetAdditionalMetadata.ui | 133 +++++++++++++++++++++++ LDMP/main_widget.py | 2 +- 4 files changed, 172 insertions(+), 4 deletions(-) create mode 100644 LDMP/dataset_additional_metadata.py create mode 100644 LDMP/gui/DlgDatasetAdditionalMetadata.ui diff --git a/LDMP/dataset_additional_metadata.py b/LDMP/dataset_additional_metadata.py new file mode 100644 index 000000000..dac8a3742 --- /dev/null +++ b/LDMP/dataset_additional_metadata.py @@ -0,0 +1,30 @@ +import os + +from pathlib import Path + +from qgis.PyQt import QtCore, QtGui, QtWidgets, uic + +from LDMP.utils import log + +DatasetAdditionalMetadataUi, _ = uic.loadUiType( + str(Path(__file__).parents[0] / "gui/DlgDatasetAdditionalMetadata.ui") +) + +ICON_PATH = os.path.join(os.path.dirname(__file__), "icons") + + +class DataSetAdditionalMetadataDialog(QtWidgets.QDialog, DatasetAdditionalMetadataUi): + dataset: dict + + le_title: QtWidgets.QLineEdit + te_author: QtWidgets.QTextEdit + le_source: QtWidgets.QLineEdit + te_citation: QtWidgets.QTextEdit + + def __init__(self, dataset: dict, parent=None): + super().__init__(parent) + self.setupUi(self) + self.le_title.setText(dataset.get('title', '')) + self.te_author.setPlainText(dataset.get('Data source', '')) + self.le_source.setText(dataset.get('Source', '')) + self.te_citation.setPlainText(dataset.get('Citation', '')) diff --git a/LDMP/download_data.py b/LDMP/download_data.py index ff409e081..267285e30 100644 --- a/LDMP/download_data.py +++ b/LDMP/download_data.py @@ -14,11 +14,14 @@ import json import os from pathlib import Path +from functools import partial import qgis.gui from qgis.PyQt import QtCore, QtGui, QtWidgets, uic from te_schemas.algorithms import ExecutionScript +from .dataset_additional_metadata import DataSetAdditionalMetadataDialog + from . import calculate, conf from .conf import Setting, settings_manager from .jobs.manager import job_manager @@ -185,7 +188,8 @@ def update_data_table(self): # Add "Notes" buttons in cell for row in range(0, len(self.datasets)): btn = QtWidgets.QPushButton(self.tr("Details")) - btn.clicked.connect(self.btn_details) + btn_details = partial(self.btn_details, self.datasets[row]) + btn.clicked.connect(btn_details) self.data_view.setIndexWidget(self.proxy_model.index(row, 8), btn) # Category @@ -227,11 +231,12 @@ def update_data_table(self): self.data_view.setSelectionBehavior(QtWidgets.QAbstractItemView.SelectRows) - def btn_details(self): + def btn_details(self, dataset): # button = self.sender() # index = self.data_view.indexAt(button.pos()) # TODO: Code the details view - pass + dlg = DataSetAdditionalMetadataDialog(dataset) + dlg.exec() def btn_calculate(self): # Note that the super class has several tests in it - if they fail it diff --git a/LDMP/gui/DlgDatasetAdditionalMetadata.ui b/LDMP/gui/DlgDatasetAdditionalMetadata.ui new file mode 100644 index 000000000..3c9e53434 --- /dev/null +++ b/LDMP/gui/DlgDatasetAdditionalMetadata.ui @@ -0,0 +1,133 @@ + + + Dialog + + + + 0 + 0 + 706 + 577 + + + + Additional Metadata + + + + 6 + + + 6 + + + 6 + + + 6 + + + + + QFrame::NoFrame + + + true + + + + + 0 + 0 + 694 + 565 + + + + + + + Metadata + + + + + + true + + + + + + + true + + + + + + + true + + + + + + + Title + + + + + + + true + + + + + + + Bibliographical Citation + + + + + + + Author or Publisher + + + + + + + Source Link or Identifier + + + + + + + + + + + + + + + QgsCollapsibleGroupBox + QGroupBox +
qgscollapsiblegroupbox.h
+ 1 +
+
+ + scrollArea + le_title + te_author + + + +
diff --git a/LDMP/main_widget.py b/LDMP/main_widget.py index b60df7da3..1ab9c9dfa 100644 --- a/LDMP/main_widget.py +++ b/LDMP/main_widget.py @@ -336,7 +336,7 @@ def refresh_after_cache_update(self): # self.datasets_tv.setModel(model) self.proxy_model = jobs_mvc.JobsSortFilterProxyModel(SortField.DATE) self.type_filter_changed(TypeFilter.ALL) - self.date_filter_changed() + # self.date_filter_changed(not self.date_filter_group.isChecked()) self.filter_changed("") action = self.filter_menu.actions()[0] From d5a1622bc20bc3fb363e2ecc9482019f797170c2 Mon Sep 17 00:00:00 2001 From: Samweli Date: Sun, 17 Nov 2024 11:28:35 +0300 Subject: [PATCH 7/9] fix filtering logic --- LDMP/main_widget.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/LDMP/main_widget.py b/LDMP/main_widget.py index 1ab9c9dfa..596a3a39b 100644 --- a/LDMP/main_widget.py +++ b/LDMP/main_widget.py @@ -184,8 +184,10 @@ def __init__( self.end_dte.setDateTime(end_date) self.date_filter_group.toggled.connect(self.date_filter_group_toggled) - self.start_dte.dateChanged.connect(self.date_filter_changed) - self.end_dte.dateChanged.connect(self.date_filter_changed) + date_filter_enabled = functools.partial(self.date_filter_changed, False) + + self.start_dte.dateChanged.connect(date_filter_enabled) + self.end_dte.dateChanged.connect(date_filter_enabled) def date_filter_group_toggled(self, value): settings_manager.write_value(Setting.DATE_FILTER_ENABLED, value) @@ -336,7 +338,7 @@ def refresh_after_cache_update(self): # self.datasets_tv.setModel(model) self.proxy_model = jobs_mvc.JobsSortFilterProxyModel(SortField.DATE) self.type_filter_changed(TypeFilter.ALL) - # self.date_filter_changed(not self.date_filter_group.isChecked()) + self.date_filter_changed(disabled=not self.date_filter_group.isChecked()) self.filter_changed("") action = self.filter_menu.actions()[0] From fec65a30a216270e76cb684595fb333911c0bfa3 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:31:35 +0000 Subject: [PATCH 8/9] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- LDMP/dataset_additional_metadata.py | 9 ++++----- LDMP/download_data.py | 5 ++--- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/LDMP/dataset_additional_metadata.py b/LDMP/dataset_additional_metadata.py index dac8a3742..0357a15af 100644 --- a/LDMP/dataset_additional_metadata.py +++ b/LDMP/dataset_additional_metadata.py @@ -1,5 +1,4 @@ import os - from pathlib import Path from qgis.PyQt import QtCore, QtGui, QtWidgets, uic @@ -24,7 +23,7 @@ class DataSetAdditionalMetadataDialog(QtWidgets.QDialog, DatasetAdditionalMetada def __init__(self, dataset: dict, parent=None): super().__init__(parent) self.setupUi(self) - self.le_title.setText(dataset.get('title', '')) - self.te_author.setPlainText(dataset.get('Data source', '')) - self.le_source.setText(dataset.get('Source', '')) - self.te_citation.setPlainText(dataset.get('Citation', '')) + self.le_title.setText(dataset.get("title", "")) + self.te_author.setPlainText(dataset.get("Data source", "")) + self.le_source.setText(dataset.get("Source", "")) + self.te_citation.setPlainText(dataset.get("Citation", "")) diff --git a/LDMP/download_data.py b/LDMP/download_data.py index 267285e30..64f4dfa90 100644 --- a/LDMP/download_data.py +++ b/LDMP/download_data.py @@ -13,17 +13,16 @@ import json import os -from pathlib import Path from functools import partial +from pathlib import Path import qgis.gui from qgis.PyQt import QtCore, QtGui, QtWidgets, uic from te_schemas.algorithms import ExecutionScript -from .dataset_additional_metadata import DataSetAdditionalMetadataDialog - from . import calculate, conf from .conf import Setting, settings_manager +from .dataset_additional_metadata import DataSetAdditionalMetadataDialog from .jobs.manager import job_manager from .logger import log From d9949176db46e08bce4768120509efdc104c07f1 Mon Sep 17 00:00:00 2001 From: Samweli Date: Mon, 16 Dec 2024 18:41:16 +0300 Subject: [PATCH 9/9] removed unused imports --- LDMP/dataset_additional_metadata.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/LDMP/dataset_additional_metadata.py b/LDMP/dataset_additional_metadata.py index 0357a15af..e1d7833d1 100644 --- a/LDMP/dataset_additional_metadata.py +++ b/LDMP/dataset_additional_metadata.py @@ -1,9 +1,7 @@ import os from pathlib import Path -from qgis.PyQt import QtCore, QtGui, QtWidgets, uic - -from LDMP.utils import log +from qgis.PyQt import QtWidgets, uic DatasetAdditionalMetadataUi, _ = uic.loadUiType( str(Path(__file__).parents[0] / "gui/DlgDatasetAdditionalMetadata.ui")