q2rad 0.1.209__tar.gz → 0.1.211__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.
Potentially problematic release.
This version of q2rad might be problematic. Click here for more details.
- {q2rad-0.1.209 → q2rad-0.1.211}/PKG-INFO +1 -1
- {q2rad-0.1.209 → q2rad-0.1.211}/pyproject.toml +1 -1
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2appselector.py +9 -3
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2rad.py +19 -7
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2raddb.py +4 -1
- q2rad-0.1.211/q2rad/version.py +1 -0
- q2rad-0.1.209/q2rad/version.py +0 -1
- {q2rad-0.1.209 → q2rad-0.1.211}/LICENSE +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/README.md +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/__init__.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/__main__.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2actions.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2appmanager.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2constants.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2forms.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2lines.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2make.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2market.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2modules.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2packages.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2queries.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2reports.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2stylesettings.py +0 -0
- {q2rad-0.1.209 → q2rad-0.1.211}/q2rad/q2utils.py +0 -0
|
@@ -102,13 +102,14 @@ class Q2AppSelect(Q2Form):
|
|
|
102
102
|
self.add_control(
|
|
103
103
|
"select_data_storage_file",
|
|
104
104
|
_("?"),
|
|
105
|
+
datalen=3,
|
|
105
106
|
mess=_("Open Data Storage sqlite database file"),
|
|
106
107
|
control="button",
|
|
107
108
|
valid=self.openSqliteDataFile,
|
|
108
109
|
)
|
|
109
110
|
self.add_control("/")
|
|
110
111
|
if self.add_control("/h"):
|
|
111
|
-
self.add_control("host_data", _("Host"), gridlabel=_("Data host"), datalen=100)
|
|
112
|
+
self.add_control("host_data", _("Host"), gridlabel=_("Data host"), datalen=100, stretch=90)
|
|
112
113
|
self.add_control("port_data", _("Port"), gridlabel=_("Data port"), datatype="int")
|
|
113
114
|
self.add_control(
|
|
114
115
|
"guest_mode",
|
|
@@ -118,6 +119,7 @@ class Q2AppSelect(Q2Form):
|
|
|
118
119
|
datalen=1,
|
|
119
120
|
mess=_("No database schema changes"),
|
|
120
121
|
)
|
|
122
|
+
self.add_control("/s", stretch=0)
|
|
121
123
|
self.add_control("/")
|
|
122
124
|
|
|
123
125
|
self.add_control("/")
|
|
@@ -145,13 +147,14 @@ class Q2AppSelect(Q2Form):
|
|
|
145
147
|
self.add_control(
|
|
146
148
|
"select_app_storage_file",
|
|
147
149
|
_("?"),
|
|
150
|
+
datalen=3,
|
|
148
151
|
mess=_("Open App Storage sqlite database file"),
|
|
149
152
|
control="button",
|
|
150
153
|
valid=self.openSqliteDataFile,
|
|
151
154
|
)
|
|
152
155
|
self.add_control("/")
|
|
153
156
|
if self.add_control("/h"):
|
|
154
|
-
self.add_control("host_logic", _("Host"), gridlabel=_("Logic host"), datalen=100)
|
|
157
|
+
self.add_control("host_logic", _("Host"), gridlabel=_("Logic host"), datalen=100, stretch=90)
|
|
155
158
|
self.add_control("port_logic", _("Port"), gridlabel=_("Logic port"), datatype="int")
|
|
156
159
|
self.add_control(
|
|
157
160
|
"dev_mode",
|
|
@@ -161,6 +164,7 @@ class Q2AppSelect(Q2Form):
|
|
|
161
164
|
datalen=1,
|
|
162
165
|
mess=_("Allow to change App"),
|
|
163
166
|
)
|
|
167
|
+
self.add_control("/s", stretch=0)
|
|
164
168
|
self.add_control("/")
|
|
165
169
|
self.add_control("/")
|
|
166
170
|
|
|
@@ -307,7 +311,9 @@ class Q2AppSelect(Q2Form):
|
|
|
307
311
|
pinform.add_control("/h")
|
|
308
312
|
pinform.add_control("/s")
|
|
309
313
|
pinform.add_control("", "Application:", control="label")
|
|
310
|
-
pinform.add_control(
|
|
314
|
+
pinform.add_control(
|
|
315
|
+
"appname", app_name, control="label", style="color:green;font-weight:bold;background:white"
|
|
316
|
+
)
|
|
311
317
|
pinform.add_control("/s")
|
|
312
318
|
pinform.add_control("/")
|
|
313
319
|
pinform.add_control("/f")
|
|
@@ -731,6 +731,12 @@ class Q2RadApp(Q2App):
|
|
|
731
731
|
|
|
732
732
|
return latest_version, current_version
|
|
733
733
|
|
|
734
|
+
def get_git_package_version(git_package):
|
|
735
|
+
package_name = os.path.basename(git_package)
|
|
736
|
+
package_path = git_package.replace("github.com", "githubusercontent.com")
|
|
737
|
+
version_url = f"https://raw.{package_path}/main/{package_name}/version.py"
|
|
738
|
+
return read_url(version_url).decode().split("=")[-1].strip()
|
|
739
|
+
|
|
734
740
|
def update_packages(self, packages_list=q2_modules, force=False):
|
|
735
741
|
if self.frozen:
|
|
736
742
|
return
|
|
@@ -760,16 +766,15 @@ class Q2RadApp(Q2App):
|
|
|
760
766
|
continue
|
|
761
767
|
self.process_events()
|
|
762
768
|
if force or latest_version != current_version and latest_version:
|
|
763
|
-
self.pip_install(package, latest_version)
|
|
764
769
|
try:
|
|
765
770
|
self.pip_install(package, latest_version)
|
|
766
771
|
except Exception as error:
|
|
767
772
|
try:
|
|
768
773
|
self.pip_install(package, latest_version)
|
|
769
|
-
except Exception:
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
774
|
+
except Exception as error:
|
|
775
|
+
latest_version = None
|
|
776
|
+
logging.warning(f"pip update {package} error:{error}")
|
|
777
|
+
# latest_version, new_current_version = self.get_package_versions(package)
|
|
773
778
|
if latest_version:
|
|
774
779
|
upgraded.append(
|
|
775
780
|
f"{package if isinstance(package, str) else package[0]} - "
|
|
@@ -786,6 +791,7 @@ class Q2RadApp(Q2App):
|
|
|
786
791
|
mess = ("Upgrading complete!<p>" "The program will be restarted!" "<p><p>") + "<p>".join(upgraded)
|
|
787
792
|
else:
|
|
788
793
|
mess = "Updates not found!<p>"
|
|
794
|
+
q2mess(mess)
|
|
789
795
|
if upgraded:
|
|
790
796
|
self.restart()
|
|
791
797
|
|
|
@@ -912,7 +918,12 @@ class Q2RadApp(Q2App):
|
|
|
912
918
|
for package in rez:
|
|
913
919
|
latest_version, current_version = rez[package]
|
|
914
920
|
if self.db_logic is not None and package not in q2_modules:
|
|
915
|
-
pkg_ver = get(
|
|
921
|
+
pkg_ver = get(
|
|
922
|
+
"packages",
|
|
923
|
+
f"package_name='{package if isinstance(package, str) else package[0]}'",
|
|
924
|
+
"package_version",
|
|
925
|
+
q2_db=self.db_logic,
|
|
926
|
+
)
|
|
916
927
|
pkg_ver = pkg_ver if pkg_ver else "99999"
|
|
917
928
|
if pkg_ver != "":
|
|
918
929
|
try:
|
|
@@ -1133,13 +1144,13 @@ class Q2RadApp(Q2App):
|
|
|
1133
1144
|
return self.get_form(child_form_name)
|
|
1134
1145
|
|
|
1135
1146
|
return worker
|
|
1136
|
-
|
|
1137
1147
|
form.add_action(
|
|
1138
1148
|
x["action_text"],
|
|
1139
1149
|
self.code_runner(x["action_worker"]) if x["action_worker"] else None,
|
|
1140
1150
|
child_form=get_action_form(child_form_name),
|
|
1141
1151
|
child_where=x["child_where"],
|
|
1142
1152
|
hotkey=x["action_key"],
|
|
1153
|
+
mess=x["action_mess"],
|
|
1143
1154
|
icon=x["action_icon"],
|
|
1144
1155
|
tag=x["tag"],
|
|
1145
1156
|
child_noshow=x["child_noshow"],
|
|
@@ -1152,6 +1163,7 @@ class Q2RadApp(Q2App):
|
|
|
1152
1163
|
self.code_runner(x["action_worker"], form=form) if x["action_worker"] else None,
|
|
1153
1164
|
hotkey=x["action_key"],
|
|
1154
1165
|
icon=x["action_icon"],
|
|
1166
|
+
mess=x["action_mess"],
|
|
1155
1167
|
tag=x["tag"],
|
|
1156
1168
|
child_noshow=x["child_noshow"],
|
|
1157
1169
|
child_copy_mode=x["child_copy_mode"],
|
|
@@ -111,7 +111,7 @@ def insert(table, row, q2_db=None):
|
|
|
111
111
|
return q2_db.insert(table, row)
|
|
112
112
|
|
|
113
113
|
|
|
114
|
-
def
|
|
114
|
+
def insert_if_not_exists(table, row, key_column, q2_db=None):
|
|
115
115
|
q2_db: Q2Db = get_default_db(q2_db)
|
|
116
116
|
value = row.get(key_column, "0")
|
|
117
117
|
if q2_db.get(table, f"{key_column} = '{value}'") == {}:
|
|
@@ -124,6 +124,9 @@ def insert_if_not_exist(table, row, key_column, q2_db=None):
|
|
|
124
124
|
return True
|
|
125
125
|
|
|
126
126
|
|
|
127
|
+
insert_if_not_exist = insert_if_not_exists
|
|
128
|
+
|
|
129
|
+
|
|
127
130
|
def raw_insert(table, row, q2_db=None):
|
|
128
131
|
q2_db = get_default_db(q2_db)
|
|
129
132
|
return q2_db.raw_insert(table, row)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.1.211"
|
q2rad-0.1.209/q2rad/version.py
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.1.209"
|
|
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
|