oqtopus 0.1.18__tar.gz → 0.1.19__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {oqtopus-0.1.18 → oqtopus-0.1.19}/PKG-INFO +1 -1
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/core/module.py +8 -5
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/core/module_package.py +5 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/logs_widget.py +5 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/module_widget.py +24 -3
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/parameters_groupbox.py +5 -3
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/plugin_widget.py +3 -1
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/database_create_dialog.ui +4 -1
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus.egg-info/PKG-INFO +1 -1
- {oqtopus-0.1.18 → oqtopus-0.1.19}/LICENSE +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/README.md +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/__init__.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/core/module_asset.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/core/modules_config.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/core/package_prepare_task.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/__init__.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/about_dialog.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/database_connection_widget.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/database_create_dialog.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/database_duplicate_dialog.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/main_dialog.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/module_selection_widget.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/project_widget.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/gui/settings_dialog.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/oqtopus.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/oqtopus_plugin.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/__init__.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/about_dialog.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/database_connection_widget.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/database_duplicate_dialog.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/logs_widget.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/main_dialog.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/module_selection_widget.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/module_widget.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/plugin_widget.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/project_widget.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/ui/settings_dialog.ui +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/utils/__init__.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/utils/plugin_utils.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/utils/qt_utils.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/utils/tmmtlogging.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus/utils/translation.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus.egg-info/SOURCES.txt +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus.egg-info/dependency_links.txt +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus.egg-info/requires.txt +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/oqtopus.egg-info/top_level.txt +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/pyproject.toml +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/setup.cfg +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/tests/__init__.py +0 -0
- {oqtopus-0.1.18 → oqtopus-0.1.19}/tests/test_plugin_load.py +0 -0
|
@@ -3,7 +3,7 @@ import json
|
|
|
3
3
|
from qgis.PyQt.QtCore import QByteArray, QObject, QUrl, pyqtSignal
|
|
4
4
|
from qgis.PyQt.QtNetwork import QNetworkAccessManager, QNetworkReply, QNetworkRequest
|
|
5
5
|
|
|
6
|
-
from ..utils.plugin_utils import PluginUtils
|
|
6
|
+
from ..utils.plugin_utils import PluginUtils, logger
|
|
7
7
|
from .module_package import ModulePackage
|
|
8
8
|
|
|
9
9
|
|
|
@@ -25,8 +25,9 @@ class Module(QObject):
|
|
|
25
25
|
return f"Module(name={self.name}, organisation={self.organisation}, repository={self.repository})"
|
|
26
26
|
|
|
27
27
|
def start_load_versions(self):
|
|
28
|
-
url =
|
|
29
|
-
|
|
28
|
+
url = f"https://api.github.com/repos/{self.organisation}/{self.repository}/releases"
|
|
29
|
+
logger.info(f"Loading versions from '{url}'...")
|
|
30
|
+
request = QNetworkRequest(QUrl(url))
|
|
30
31
|
headers = PluginUtils.get_github_headers()
|
|
31
32
|
for key, value in headers.items():
|
|
32
33
|
request.setRawHeader(QByteArray(key.encode()), QByteArray(value.encode()))
|
|
@@ -83,8 +84,10 @@ class Module(QObject):
|
|
|
83
84
|
)
|
|
84
85
|
self.development_versions.append(mainVersion)
|
|
85
86
|
|
|
86
|
-
url =
|
|
87
|
-
|
|
87
|
+
url = f"https://api.github.com/repos/{self.organisation}/{self.repository}/pulls"
|
|
88
|
+
logger.info(f"Loading development versions from '{url}'...")
|
|
89
|
+
|
|
90
|
+
request = QNetworkRequest(QUrl(url))
|
|
88
91
|
headers = PluginUtils.get_github_headers()
|
|
89
92
|
for key, value in headers.items():
|
|
90
93
|
request.setRawHeader(QByteArray(key.encode()), QByteArray(value.encode()))
|
|
@@ -116,3 +116,8 @@ class ModulePackage:
|
|
|
116
116
|
self.created_at = QDateTime.fromString(json_payload["created_at"], Qt.DateFormat.ISODate)
|
|
117
117
|
self.prerelease = False
|
|
118
118
|
self.html_url = json_payload["html_url"]
|
|
119
|
+
|
|
120
|
+
is_on_a_fork = json_payload["head"]["repo"]["fork"]
|
|
121
|
+
if is_on_a_fork:
|
|
122
|
+
self.organisation = json_payload["head"]["repo"]["owner"]["login"]
|
|
123
|
+
self.repository = json_payload["head"]["repo"]["name"]
|
|
@@ -62,6 +62,11 @@ class LogModel(QAbstractItemModel):
|
|
|
62
62
|
| Qt.ItemFlag.ItemNeverHasChildren
|
|
63
63
|
)
|
|
64
64
|
|
|
65
|
+
def clear(self):
|
|
66
|
+
self.beginResetModel()
|
|
67
|
+
self.logs = []
|
|
68
|
+
self.endResetModel()
|
|
69
|
+
|
|
65
70
|
|
|
66
71
|
class LogFilterProxyModel(QSortFilterProxyModel):
|
|
67
72
|
LEVELS = ["DEBUG", "INFO", "WARNING", "ERROR", "CRITICAL"]
|
|
@@ -8,6 +8,7 @@ from qgis.PyQt.QtCore import Qt
|
|
|
8
8
|
from qgis.PyQt.QtWidgets import QMessageBox, QWidget
|
|
9
9
|
|
|
10
10
|
from ..core.module import Module
|
|
11
|
+
from ..core.module_package import ModulePackage
|
|
11
12
|
from ..utils.plugin_utils import PluginUtils, logger
|
|
12
13
|
from ..utils.qt_utils import CriticalMessageBox, OverrideCursor, QtUtils
|
|
13
14
|
|
|
@@ -81,7 +82,16 @@ class ModuleWidget(QWidget, DIALOG_UI):
|
|
|
81
82
|
|
|
82
83
|
logger.info(f"PUM config loaded from '{pumConfigFilename}'")
|
|
83
84
|
|
|
84
|
-
|
|
85
|
+
try:
|
|
86
|
+
self.parameters_groupbox.setParameters(self.__pum_config.parameters())
|
|
87
|
+
except Exception as exception:
|
|
88
|
+
CriticalMessageBox(
|
|
89
|
+
self.tr("Error"),
|
|
90
|
+
self.tr(f"Can't load parameters from PUM config '{pumConfigFilename}':"),
|
|
91
|
+
exception,
|
|
92
|
+
self,
|
|
93
|
+
).exec()
|
|
94
|
+
return
|
|
85
95
|
|
|
86
96
|
self.db_demoData_comboBox.clear()
|
|
87
97
|
for demo_data_name, demo_data_file in self.__pum_config.demo_data().items():
|
|
@@ -107,9 +117,19 @@ class ModuleWidget(QWidget, DIALOG_UI):
|
|
|
107
117
|
).exec()
|
|
108
118
|
return
|
|
109
119
|
|
|
110
|
-
parameters = self.parameters_groupbox.parameters_values()
|
|
111
|
-
|
|
112
120
|
try:
|
|
121
|
+
parameters = self.parameters_groupbox.parameters_values()
|
|
122
|
+
|
|
123
|
+
beta_testing = False
|
|
124
|
+
if (
|
|
125
|
+
self.__current_module_package.type == ModulePackage.Type.PULL_REQUEST
|
|
126
|
+
or self.__current_module_package.type == ModulePackage.Type.BRANCH
|
|
127
|
+
):
|
|
128
|
+
logger.warning(
|
|
129
|
+
"Installing module from branch or pull request: set parameter beta_testing to True"
|
|
130
|
+
)
|
|
131
|
+
beta_testing = True
|
|
132
|
+
|
|
113
133
|
upgrader = Upgrader(
|
|
114
134
|
config=self.__pum_config,
|
|
115
135
|
)
|
|
@@ -119,6 +139,7 @@ class ModuleWidget(QWidget, DIALOG_UI):
|
|
|
119
139
|
connection=self.__database_connection,
|
|
120
140
|
roles=self.db_parameters_CreateAndGrantRoles_checkBox.isChecked(),
|
|
121
141
|
grant=self.db_parameters_CreateAndGrantRoles_checkBox.isChecked(),
|
|
142
|
+
beta_testing=beta_testing,
|
|
122
143
|
)
|
|
123
144
|
|
|
124
145
|
if self.db_demoData_checkBox.isChecked():
|
|
@@ -20,21 +20,21 @@ class ParameterWidget(QWidget):
|
|
|
20
20
|
self.layout.setContentsMargins(0, 0, 0, 0)
|
|
21
21
|
self.setLayout(self.layout)
|
|
22
22
|
self.value = None
|
|
23
|
-
self.__valueChanged = False
|
|
24
23
|
|
|
25
24
|
if parameter_definition.type != ParameterType.BOOLEAN:
|
|
26
25
|
self.layout.addWidget(QLabel(parameter_definition.name, self))
|
|
27
26
|
|
|
28
27
|
if parameter_definition.type == ParameterType.BOOLEAN:
|
|
29
28
|
self.widget = QCheckBox(parameter_definition.name, self)
|
|
30
|
-
|
|
31
|
-
|
|
29
|
+
if parameter_definition.default is not None:
|
|
30
|
+
self.widget.setChecked(parameter_definition.default)
|
|
32
31
|
self.layout.addWidget(self.widget)
|
|
33
32
|
self.value = lambda: self.widget.isChecked()
|
|
34
33
|
elif parameter_definition.type in (
|
|
35
34
|
ParameterType.DECIMAL,
|
|
36
35
|
ParameterType.INTEGER,
|
|
37
36
|
ParameterType.TEXT,
|
|
37
|
+
ParameterType.PATH,
|
|
38
38
|
):
|
|
39
39
|
self.widget = QLineEdit(self)
|
|
40
40
|
if parameter_definition.default is not None:
|
|
@@ -46,6 +46,8 @@ class ParameterWidget(QWidget):
|
|
|
46
46
|
self.value = lambda: float(self.widget.text() or self.widget.placeholderText())
|
|
47
47
|
else:
|
|
48
48
|
self.value = lambda: self.widget.text() or self.widget.placeholderText()
|
|
49
|
+
else:
|
|
50
|
+
raise ValueError(f"Unknown parameter type '{parameter_definition.type}'")
|
|
49
51
|
|
|
50
52
|
|
|
51
53
|
class ParametersGroupBox(QGroupBox):
|
|
@@ -73,7 +73,9 @@ class PluginWidget(QWidget, DIALOG_UI):
|
|
|
73
73
|
QMessageBox.warning(
|
|
74
74
|
self,
|
|
75
75
|
self.tr("Not implemented"),
|
|
76
|
-
self.tr(
|
|
76
|
+
self.tr(
|
|
77
|
+
'Installation is not implemented yet.\nAt the moment, you can only copy the plugin zip file to a directory and use "Install from ZIP" in QGIS.'
|
|
78
|
+
),
|
|
77
79
|
)
|
|
78
80
|
return
|
|
79
81
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<x>0</x>
|
|
8
8
|
<y>0</y>
|
|
9
9
|
<width>513</width>
|
|
10
|
-
<height>
|
|
10
|
+
<height>542</height>
|
|
11
11
|
</rect>
|
|
12
12
|
</property>
|
|
13
13
|
<property name="windowTitle">
|
|
@@ -64,6 +64,9 @@
|
|
|
64
64
|
<layout class="QGridLayout" name="gridLayout_5">
|
|
65
65
|
<item row="5" column="1">
|
|
66
66
|
<widget class="QLineEdit" name="parameters_password_lineEdit">
|
|
67
|
+
<property name="echoMode">
|
|
68
|
+
<enum>QLineEdit::PasswordEchoOnEdit</enum>
|
|
69
|
+
</property>
|
|
67
70
|
<property name="clearButtonEnabled">
|
|
68
71
|
<bool>true</bool>
|
|
69
72
|
</property>
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|