q2rad 0.1.233__py3-none-any.whl → 0.1.235__py3-none-any.whl
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/q2rad.py +15 -9
- q2rad/q2utils.py +21 -3
- q2rad/version.py +1 -1
- {q2rad-0.1.233.dist-info → q2rad-0.1.235.dist-info}/METADATA +1 -1
- {q2rad-0.1.233.dist-info → q2rad-0.1.235.dist-info}/RECORD +8 -8
- {q2rad-0.1.233.dist-info → q2rad-0.1.235.dist-info}/LICENSE +0 -0
- {q2rad-0.1.233.dist-info → q2rad-0.1.235.dist-info}/WHEEL +0 -0
- {q2rad-0.1.233.dist-info → q2rad-0.1.235.dist-info}/entry_points.txt +0 -0
q2rad/q2rad.py
CHANGED
|
@@ -699,11 +699,11 @@ class Q2RadApp(Q2App):
|
|
|
699
699
|
else "q2rad/bin/q2rad\n"
|
|
700
700
|
),
|
|
701
701
|
)
|
|
702
|
-
elif os.path.isdir("python.loc"):
|
|
702
|
+
elif os.path.isdir(f"python.loc.{sys.version.split()[0]}"):
|
|
703
703
|
self.write_restore_file(
|
|
704
704
|
"run_q2rad",
|
|
705
705
|
("" if "win32" in sys.platform else "#!/bin/bash\n")
|
|
706
|
-
+ ("python.loc\\scripts\\q2rad" if "win32" in sys.platform else "python.loc/bin/q2rad\n"),
|
|
706
|
+
+ (f"python.loc.{sys.version.split()[0]}\\scripts\\q2rad" if "win32" in sys.platform else f"python.loc.{sys.version.split()[0]}/bin/q2rad\n"),
|
|
707
707
|
)
|
|
708
708
|
else:
|
|
709
709
|
self.write_restore_file(
|
|
@@ -713,10 +713,16 @@ class Q2RadApp(Q2App):
|
|
|
713
713
|
)
|
|
714
714
|
|
|
715
715
|
if "win32" in sys.platform:
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
716
|
+
if os.path.isdir(f"python.loc.{sys.version.split()[0]}"):
|
|
717
|
+
open("run_q2rad.vbs", "w").write(
|
|
718
|
+
'WScript.CreateObject("WScript.Shell").Run '
|
|
719
|
+
f'"python.loc.{sys.version.split()[0]}\\pythonw.exe -m q2rad", 1, false'
|
|
720
|
+
)
|
|
721
|
+
else: # venv
|
|
722
|
+
open("run_q2rad.vbs", "w").write(
|
|
723
|
+
'WScript.CreateObject("WScript.Shell").Run '
|
|
724
|
+
'"q2rad\\scripts\\pythonw.exe -m q2rad", 1, false'
|
|
725
|
+
)
|
|
720
726
|
|
|
721
727
|
open("make_shortcut.vbs", "w").write(
|
|
722
728
|
'Set oWS = WScript.CreateObject("WScript.Shell")\n'
|
|
@@ -733,10 +739,10 @@ class Q2RadApp(Q2App):
|
|
|
733
739
|
def write_reinstall_files(self):
|
|
734
740
|
if sys.prefix != sys.base_prefix: # in virtualenv
|
|
735
741
|
pip_command = (
|
|
736
|
-
"q2rad\\scripts\\python -m " if "win32" in sys.platform else "q2rad/
|
|
742
|
+
"q2rad\\scripts\\python -m " if "win32" in sys.platform else "q2rad/bin/python -m "
|
|
737
743
|
)
|
|
738
|
-
elif os.path.isdir("python.loc"):
|
|
739
|
-
pip_command = "python.loc\\python -m " if "win32" in sys.platform else "python.loc/python -m "
|
|
744
|
+
elif os.path.isdir(f"python.loc.{sys.version.split()[0]}"):
|
|
745
|
+
pip_command = f"python.loc.{sys.version.split()[0]}\\python -m " if "win32" in sys.platform else f"python.loc{sys.version.split()[0]}/python -m "
|
|
740
746
|
else:
|
|
741
747
|
pip_command = "python -m " if "win32" in sys.platform else "python -m "
|
|
742
748
|
|
q2rad/q2utils.py
CHANGED
|
@@ -503,10 +503,11 @@ class Q2_save_and_run:
|
|
|
503
503
|
|
|
504
504
|
|
|
505
505
|
class auto_filter:
|
|
506
|
-
def __init__(self, form_name, mem, lines_per_tab=10):
|
|
506
|
+
def __init__(self, form_name, mem, lines_per_tab=10, exclude=[]):
|
|
507
507
|
self.form_name = form_name
|
|
508
508
|
self.mem = mem
|
|
509
509
|
self.filter_columns = []
|
|
510
|
+
self.exclude = exclude
|
|
510
511
|
self.mem.ok_button = True
|
|
511
512
|
self.mem.cancel_button = True
|
|
512
513
|
self.mem.add_ok_cancel_buttons()
|
|
@@ -515,6 +516,12 @@ class auto_filter:
|
|
|
515
516
|
self.auto_filter()
|
|
516
517
|
|
|
517
518
|
def auto_filter(self):
|
|
519
|
+
if len(self.exclude) > 0:
|
|
520
|
+
exclude_columns = " and column not in ("
|
|
521
|
+
exclude_columns += ",".join([f'"{x}"' for x in self.exclude]) + ")"
|
|
522
|
+
else:
|
|
523
|
+
exclude_columns = ""
|
|
524
|
+
|
|
518
525
|
cu = q2cursor(
|
|
519
526
|
f"""
|
|
520
527
|
select *
|
|
@@ -523,19 +530,24 @@ class auto_filter:
|
|
|
523
530
|
and migrate<>''
|
|
524
531
|
and (label <>'' or gridlabel <> '')
|
|
525
532
|
and noform = ''
|
|
533
|
+
{exclude_columns}
|
|
526
534
|
order by seq
|
|
527
535
|
""",
|
|
528
536
|
self.mem.q2_app.db_logic,
|
|
529
537
|
)
|
|
538
|
+
manual_controls_count = len(self.mem.controls)
|
|
530
539
|
make_tabs = cu.row_count() > self.lines_per_tab
|
|
531
540
|
if not make_tabs:
|
|
532
541
|
self.mem.add_control("/f")
|
|
533
542
|
for col in cu.records():
|
|
543
|
+
if col["column"] in self.exclude:
|
|
544
|
+
continue
|
|
534
545
|
if make_tabs and cu.current_row() % self.lines_per_tab == 0:
|
|
535
|
-
self.mem.add_control("/t", f"
|
|
546
|
+
self.mem.add_control("/t", f"={1+ cu.current_row() // self.lines_per_tab}")
|
|
536
547
|
self.mem.add_control("/f")
|
|
537
548
|
if col["control"] == "text":
|
|
538
549
|
col["control"] = "line"
|
|
550
|
+
col["datatype"] = "char"
|
|
539
551
|
col = Q2Controls.validate(col)
|
|
540
552
|
self.filter_columns.append(cu.r.column)
|
|
541
553
|
if col["datatype"] in ["date"] or (
|
|
@@ -566,11 +578,17 @@ class auto_filter:
|
|
|
566
578
|
col["check"] = 1
|
|
567
579
|
|
|
568
580
|
self.mem.add_control(**col)
|
|
569
|
-
self.mem.add_control("/")
|
|
581
|
+
# self.mem.add_control("/")
|
|
582
|
+
if manual_controls_count > 0:
|
|
583
|
+
for x in range(manual_controls_count):
|
|
584
|
+
self.mem.controls.append(self.mem.controls.pop(0))
|
|
585
|
+
self._valid = self.mem.valid
|
|
570
586
|
self.mem.valid = self.valid
|
|
571
587
|
|
|
572
588
|
def valid(self):
|
|
573
589
|
where = []
|
|
590
|
+
if custom_whr := self._valid():
|
|
591
|
+
where.append(custom_whr)
|
|
574
592
|
for x in self.filter_columns:
|
|
575
593
|
where.append(self.mem.prepare_where(x))
|
|
576
594
|
where_string = " and ".join([x for x in where if x])
|
q2rad/version.py
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
__version__ = "0.1.
|
|
1
|
+
__version__ = "0.1.235"
|
|
@@ -12,14 +12,14 @@ q2rad/q2market.py,sha256=RNXTNv-fFUgbzBGhHPNXlzGjsAHAtz71BRbTErJarNo,2641
|
|
|
12
12
|
q2rad/q2modules.py,sha256=RwemVJwfxth0lBN4K96tKz62VOW71C7CmmKyhIoH5mc,4632
|
|
13
13
|
q2rad/q2packages.py,sha256=y72L1RAw1OgtKGaL8lJ1KHIaers5I6kTZSiphwwrY0M,3808
|
|
14
14
|
q2rad/q2queries.py,sha256=YYJEpC_0rXAV8W_lx2604yqnkooHzheFmDCfqbW02zY,13203
|
|
15
|
-
q2rad/q2rad.py,sha256=
|
|
15
|
+
q2rad/q2rad.py,sha256=TFb2uluiMwqsv34nH7bMWZWGo2QOyi_rWMTVgHfda20,57283
|
|
16
16
|
q2rad/q2raddb.py,sha256=9sQuod4Ws0xiWu4ejv1lODMSUtijJTUHGgCKmV61qGQ,5975
|
|
17
17
|
q2rad/q2reports.py,sha256=tAOm54_P_NN8nRDsZy8N6vbw0YOTNQ_9xtvT6NMG724,86155
|
|
18
18
|
q2rad/q2stylesettings.py,sha256=_aK-44kFfkaEGdwH7FzRs1KP7nsP08bL8t8OmdjM2eY,4767
|
|
19
|
-
q2rad/q2utils.py,sha256=
|
|
20
|
-
q2rad/version.py,sha256=
|
|
21
|
-
q2rad-0.1.
|
|
22
|
-
q2rad-0.1.
|
|
23
|
-
q2rad-0.1.
|
|
24
|
-
q2rad-0.1.
|
|
25
|
-
q2rad-0.1.
|
|
19
|
+
q2rad/q2utils.py,sha256=rZe4sxpXU0UCg1s50zueQOgX0GCt_d7OYR3s5p0v9ek,19554
|
|
20
|
+
q2rad/version.py,sha256=Ha3i0TzVJUOaC3CSX9IQT4bWoilQPZfSI4LPVJpLuuQ,23
|
|
21
|
+
q2rad-0.1.235.dist-info/entry_points.txt,sha256=DmsJQE6f3wYuhdN2h6ARYxSe8_d03paeepfGpdVj5rs,42
|
|
22
|
+
q2rad-0.1.235.dist-info/LICENSE,sha256=JRR3LlR18ghhYXT4G2cWgXmnxRvcuVcKlqncWWK4MRY,10347
|
|
23
|
+
q2rad-0.1.235.dist-info/METADATA,sha256=9C_6xcIaaZMeF0F6FCTADHl7p0VusLOs87T_Xe1xw3A,3369
|
|
24
|
+
q2rad-0.1.235.dist-info/WHEEL,sha256=WGfLGfLX43Ei_YORXSnT54hxFygu34kMpcQdmgmEwCQ,88
|
|
25
|
+
q2rad-0.1.235.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|