not1mm 24.10.6__py3-none-any.whl → 24.10.8__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.
not1mm/__main__.py CHANGED
@@ -2609,13 +2609,16 @@ class MainWindow(QtWidgets.QMainWindow):
2609
2609
  self.rig_control.poll_callback.connect(self.poll_radio)
2610
2610
  self.radio_thread.start()
2611
2611
 
2612
- if self.pref.get("cwtype", 0) == 0:
2613
- self.cw = None
2614
- else:
2612
+ self.cw = None
2613
+ if (
2614
+ self.pref.get("cwport")
2615
+ and self.pref.get("cwip")
2616
+ and self.pref.get("cwtype")
2617
+ ):
2615
2618
  self.cw = CW(
2616
2619
  int(self.pref.get("cwtype")),
2617
2620
  self.pref.get("cwip"),
2618
- int(self.pref.get("cwport", 6789)),
2621
+ int(self.pref.get("cwport")),
2619
2622
  )
2620
2623
  self.cw.speed = 20
2621
2624
  if self.cw.servertype == 2:
@@ -2646,13 +2649,9 @@ class MainWindow(QtWidgets.QMainWindow):
2646
2649
  self.pref["bands"] = [
2647
2650
  "160",
2648
2651
  "80",
2649
- "60",
2650
2652
  "40",
2651
- "30",
2652
2653
  "20",
2653
- "17",
2654
2654
  "15",
2655
- "12",
2656
2655
  "10",
2657
2656
  ]
2658
2657
 
@@ -2711,7 +2710,8 @@ class MainWindow(QtWidgets.QMainWindow):
2711
2710
  self.callsign_changed()
2712
2711
  self.callsign.setFocus()
2713
2712
  self.callsign.activateWindow()
2714
- window.raise_()
2713
+ # This broke somehow.
2714
+ # window.raise_()
2715
2715
  continue
2716
2716
 
2717
2717
  if (
not1mm/lib/settings.py CHANGED
@@ -20,6 +20,9 @@ class Settings(QtWidgets.QDialog):
20
20
  self.logger = logging.getLogger("settings")
21
21
  uic.loadUi(app_data_path / "configuration.ui", self)
22
22
  self.buttonBox.accepted.connect(self.save_changes)
23
+ self.usecwdaemon_radioButton.clicked.connect(self.set_cwdaemon_port_hint)
24
+ self.usepywinkeyer_radioButton.clicked.connect(self.set_winkeyer_port_hint)
25
+ self.usecwviacat_radioButton.clicked.connect(self.set_catforcw_port_hint)
23
26
  self.preference = pref
24
27
  if sd:
25
28
  self.devices = sd.query_devices()
@@ -37,7 +40,6 @@ class Settings(QtWidgets.QDialog):
37
40
  if index != -1:
38
41
  self.sounddevice.setCurrentIndex(index)
39
42
  self.useqrz_radioButton.setChecked(bool(self.preference.get("useqrz")))
40
- # self.usehamdb_radioButton.setChecked(bool(self.preference.get("usehamdb")))
41
43
  self.usehamqth_radioButton.setChecked(bool(self.preference.get("usehamqth")))
42
44
  self.lookup_user_name_field.setText(
43
45
  str(self.preference.get("lookupusername", ""))
@@ -51,7 +53,10 @@ class Settings(QtWidgets.QDialog):
51
53
  self.useflrig_radioButton.setChecked(bool(self.preference.get("useflrig")))
52
54
 
53
55
  self.cwip_field.setText(str(self.preference.get("cwip", "")))
54
- self.cwport_field.setText(str(self.preference.get("cwport", "")))
56
+ if self.preference.get("cwport", ""):
57
+ self.cwport_field.setText(str(self.preference.get("cwport", "")))
58
+ else:
59
+ self.cwport_field.setText("")
55
60
  self.usecwdaemon_radioButton.setChecked(
56
61
  bool(self.preference.get("cwtype") == 1)
57
62
  )
@@ -61,6 +66,13 @@ class Settings(QtWidgets.QDialog):
61
66
  self.usecwviacat_radioButton.setChecked(
62
67
  bool(self.preference.get("cwtype") == 3)
63
68
  )
69
+ if self.preference.get("cwtype") == 1:
70
+ self.set_cwdaemon_port_hint()
71
+ elif self.preference.get("cwtype") == 2:
72
+ self.set_winkeyer_port_hint()
73
+ elif self.preference.get("cwtype") == 3:
74
+ self.set_catforcw_port_hint()
75
+
64
76
  self.connect_to_server.setChecked(bool(self.preference.get("useserver")))
65
77
  self.multicast_group.setText(str(self.preference.get("multicast_group", "")))
66
78
  self.multicast_port.setText(str(self.preference.get("multicast_port", "")))
@@ -73,13 +85,14 @@ class Settings(QtWidgets.QDialog):
73
85
  str(self.preference.get("n1mm_station_name", ""))
74
86
  )
75
87
  self.n1mm_operator.setText(str(self.preference.get("n1mm_operator", "")))
76
- # self.n1mm_ip.setText(str(self.preference.get("n1mm_ip", "")))
77
88
  self.n1mm_radioport.setText(str(self.preference.get("n1mm_radioport", "")))
78
89
  self.n1mm_contactport.setText(str(self.preference.get("n1mm_contactport", "")))
79
90
  self.n1mm_lookupport.setText(str(self.preference.get("n1mm_lookupport", "")))
80
91
  self.n1mm_scoreport.setText(str(self.preference.get("n1mm_scoreport", "")))
81
92
  self.send_n1mm_radio.setChecked(bool(self.preference.get("send_n1mm_radio")))
82
- self.send_n1mm_contact.setChecked(bool(self.preference.get("send_n1mm_contact")))
93
+ self.send_n1mm_contact.setChecked(
94
+ bool(self.preference.get("send_n1mm_contact"))
95
+ )
83
96
  self.send_n1mm_lookup.setChecked(bool(self.preference.get("send_n1mm_lookup")))
84
97
  self.send_n1mm_score.setChecked(bool(self.preference.get("send_n1mm_score")))
85
98
 
@@ -105,11 +118,28 @@ class Settings(QtWidgets.QDialog):
105
118
  self.activate_6m.setChecked(bool("6" in self.preference.get("bands", [])))
106
119
  self.activate_4m.setChecked(bool("4" in self.preference.get("bands", [])))
107
120
  self.activate_2m.setChecked(bool("2" in self.preference.get("bands", [])))
108
- self.activate_1dot25.setChecked(bool("1.25" in self.preference.get("bands", [])))
121
+ self.activate_1dot25.setChecked(
122
+ bool("1.25" in self.preference.get("bands", []))
123
+ )
109
124
  self.activate_70cm.setChecked(bool("70cm" in self.preference.get("bands", [])))
110
125
  self.activate_33cm.setChecked(bool("33cm" in self.preference.get("bands", [])))
111
126
  self.activate_23cm.setChecked(bool("23cm" in self.preference.get("bands", [])))
112
127
 
128
+ def set_cwdaemon_port_hint(self):
129
+ """Sets placeholder hint for the CW interface."""
130
+ self.cwip_field.setPlaceholderText("127.0.0.1")
131
+ self.cwport_field.setPlaceholderText("6789")
132
+
133
+ def set_winkeyer_port_hint(self):
134
+ """Sets placeholder hint for the CW interface."""
135
+ self.cwip_field.setPlaceholderText("127.0.0.1")
136
+ self.cwport_field.setPlaceholderText("8000")
137
+
138
+ def set_catforcw_port_hint(self):
139
+ """Sets placeholder hint for the CW interface."""
140
+ self.cwip_field.setPlaceholderText("")
141
+ self.cwport_field.setPlaceholderText("")
142
+
113
143
  def save_changes(self):
114
144
  """
115
145
  Write preferences to json file.
@@ -131,6 +161,7 @@ class Settings(QtWidgets.QDialog):
131
161
  try:
132
162
  self.preference["cwport"] = int(self.cwport_field.text())
133
163
  except ValueError:
164
+ self.preference["cwport"] = None
134
165
  ...
135
166
  self.preference["cwtype"] = 0
136
167
  if self.usecwdaemon_radioButton.isChecked():
not1mm/lib/version.py CHANGED
@@ -1,3 +1,3 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "24.10.6"
3
+ __version__ = "24.10.8"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 24.10.6
3
+ Version: 24.10.8
4
4
  Summary: NOT1MM Logger
5
5
  Author-email: Michael Bridak <michael.bridak@gmail.com>
6
6
  Project-URL: Homepage, https://github.com/mbridak/not1mm
@@ -219,6 +219,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
219
219
 
220
220
  ## Recent Changes
221
221
 
222
+ - [24-10-8] Fix crash on Tune to spot. Change placeholder text for the CW port for those unable to read documentation.
222
223
  - [24-10-6] Removed 60, 30, 17 and 12M from the default list of bands.
223
224
  - [24-10-5-1] Store the bandmap spots age timer in the preferences.
224
225
  - [24-10-5] Force reselction of contest after different DB opened.
@@ -1,5 +1,5 @@
1
1
  not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- not1mm/__main__.py,sha256=jShyKC6PnUdyT9htancQg_m5j1KlFnKmPdjmNV_he60,131520
2
+ not1mm/__main__.py,sha256=IjYrGDuq8T-Noe8gJ736-Mo7pyVepAHDGcMUigUGb-Y,131546
3
3
  not1mm/bandmap.py,sha256=P91rYGmd8r5K6TRNZt7kqqW6zCBVlFA1_n9-V7as1WE,31672
4
4
  not1mm/checkwindow.py,sha256=aI-nr8OF90IWV7R_XRdmitvBJ9M85evCs72HoU3Jnvc,10374
5
5
  not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
@@ -112,9 +112,9 @@ not1mm/lib/new_contest.py,sha256=IznTDMq7yXHB6zBoGUEC_WDYPCPpsSZW4wwMJi16zK0,816
112
112
  not1mm/lib/playsound.py,sha256=kxkcitBFbZCXJ2wxQ1lxg4rBwfxiSpuNpJSXHOPCoXA,9241
113
113
  not1mm/lib/plugin_common.py,sha256=TbFUbftjELFt4QRdsjSHbqnXSngZOlSwlCTClqosDXA,9727
114
114
  not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
115
- not1mm/lib/settings.py,sha256=0Su8BQM4haVhc_P74q8UhzRZxtgWhM40UmVtQdMJQeM,10022
115
+ not1mm/lib/settings.py,sha256=YYAAdvhqlQ6y4GOJSxNmE4eDlgsIt2MvLxxOAbcpscY,11184
116
116
  not1mm/lib/super_check_partial.py,sha256=p5l3u2ZOCBtlWgbvskC50FpuoaIpR07tfC6zTdRWbh4,2334
117
- not1mm/lib/version.py,sha256=-VK621TV7vjdeRUalV4nYjao7hyeK_a1xlqZJIMqY7A,48
117
+ not1mm/lib/version.py,sha256=UYQ03Ct1PZCaboAlM47NoWvd3H9bDtVzUrLc-mKQ5h8,48
118
118
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
119
119
  not1mm/plugins/10_10_fall_cw.py,sha256=IttjX1yy4nDdACGsiYlPteFG8eVseX_WtoFio6bqHE8,10953
120
120
  not1mm/plugins/10_10_spring_cw.py,sha256=ThCptdM3dX4ywhoy2JRcOEyHSqcJolFaT7O_PYzM1Mg,10958
@@ -157,10 +157,9 @@ not1mm/plugins/ref_cw.py,sha256=aWjHHkqIKutjRUtzh09y5haFfnZK9poRQDWRQMDRxxU,1632
157
157
  not1mm/plugins/stew_perry_topband.py,sha256=CKBQbYl4ETxhXJd2dma4fg_C5pag_s7Nf61SCztZtqE,10668
158
158
  not1mm/plugins/weekly_rtty.py,sha256=DQcy3SY0Zn56EdlYGf3NxrRhTnkNa5IqRQPRQdKDSPs,14255
159
159
  not1mm/plugins/winter_field_day.py,sha256=4rcfRtobwjHO6BNL3WOTHzBmyyeuX79BNGBG8PfjrI8,10238
160
- test/contests.py,sha256=bPJZz0zC_d_lpkc9_-Llct628DZIL5kI7m2QIVhAcVM,17498
161
- not1mm-24.10.6.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
162
- not1mm-24.10.6.dist-info/METADATA,sha256=7tWxHcNmpDHMgBdupY6ZsugM5vCFGFezsnFJveseiKE,30738
163
- not1mm-24.10.6.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
164
- not1mm-24.10.6.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
165
- not1mm-24.10.6.dist-info/top_level.txt,sha256=b4JoTnuFyh8DwxYUjTpCWpKI9Yi1tKwwvCjSYiNY4G8,12
166
- not1mm-24.10.6.dist-info/RECORD,,
160
+ not1mm-24.10.8.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
161
+ not1mm-24.10.8.dist-info/METADATA,sha256=Fkd1pSMlrrpa3X5I6LYhg_L0Ul2ZI1ntz1WJAjqCDJ8,30857
162
+ not1mm-24.10.8.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
163
+ not1mm-24.10.8.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
164
+ not1mm-24.10.8.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
165
+ not1mm-24.10.8.dist-info/RECORD,,
test/contests.py DELETED
@@ -1,591 +0,0 @@
1
- import pytest
2
- import os
3
-
4
- from PyQt6 import QtCore, QtWidgets
5
-
6
- import not1mm.__main__ as not1mm
7
- import not1mm.fsutils as fsutils
8
-
9
- WAIT_TIME = 10
10
-
11
- # Entry options:
12
- # callsign
13
- # sent (field1)
14
- # receive (field2)
15
- # other_1 (field3)
16
- # other_2 (field4)
17
-
18
- CONTEST_DATA = {
19
- "General Logging": [
20
- {
21
- "callsign": "KF0NRV",
22
- "sent": "599",
23
- "receive": "599",
24
- "other_1": "dan",
25
- "other_2": "cool dude",
26
- },
27
- {
28
- "callsign": "KF0NRV",
29
- "sent": "599",
30
- "receive": "599",
31
- "other_1": "dan",
32
- "other_2": "cool dude",
33
- },
34
- {
35
- "callsign": "K6GTE",
36
- "sent": "599",
37
- "receive": "599",
38
- "other_1": "mike",
39
- "other_2": "cool dude",
40
- },
41
- ],
42
- "10 10 FALL CW": [
43
- {
44
- "callsign": "KF0NRV",
45
- "sent": "599",
46
- "receive": "599",
47
- "other_2": "dan 1234 ia",
48
- },
49
- {
50
- "callsign": "KF0NRV",
51
- "sent": "599",
52
- "receive": "599",
53
- "other_2": "dan 1234 ia",
54
- },
55
- {
56
- "callsign": "K6GTE",
57
- "sent": "599",
58
- "receive": "599",
59
- "other_2": "mike 1234 ca",
60
- },
61
- ],
62
- "10 10 SPRING CW": [
63
- {
64
- "callsign": "KF0NRV",
65
- "sent": "599",
66
- "receive": "599",
67
- "other_2": "dan 1234 ia",
68
- },
69
- {
70
- "callsign": "KF0NRV",
71
- "sent": "599",
72
- "receive": "599",
73
- "other_2": "dan 1234 ia",
74
- },
75
- {
76
- "callsign": "K6GTE",
77
- "sent": "599",
78
- "receive": "599",
79
- "other_2": "mike 1234 ca",
80
- },
81
- ],
82
- "10 10 SUMMER PHONE": [
83
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "dan 1234 ia"},
84
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "dan 1234 ia"},
85
- {"callsign": "K6GTE", "sent": "59", "receive": "59", "other_2": "mike 1234 ca"},
86
- ],
87
- "10 10 WINTER PHONE": [
88
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "dan 1234 ia"},
89
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "dan 1234 ia"},
90
- {"callsign": "K6GTE", "sent": "59", "receive": "59", "other_2": "mike 1234 ca"},
91
- ],
92
- "ARRL 10M": [
93
- {
94
- "callsign": "KF0NRV",
95
- "sent": "599",
96
- "receive": "599",
97
- "other_1": "1234",
98
- "other_2": "ia",
99
- },
100
- {
101
- "callsign": "KF0NRV",
102
- "sent": "599",
103
- "receive": "599",
104
- "other_1": "1234",
105
- "other_2": "ia",
106
- },
107
- {
108
- "callsign": "K6GTE",
109
- "sent": "599",
110
- "receive": "599",
111
- "other_1": "2345",
112
- "other_2": "ca",
113
- },
114
- ],
115
- "ARRL DX CW": [
116
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "100W"},
117
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "100W"},
118
- {"callsign": "K6GTE", "sent": "599", "receive": "599", "other_2": "100W"},
119
- ],
120
- "ARRL DX SSB": [
121
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "100W"},
122
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "100W"},
123
- {"callsign": "K6GTE", "sent": "59", "receive": "59", "other_2": "100W"},
124
- ],
125
- "ARRL FIELD DAY": [
126
- {"callsign": "KF0NRV", "other_1": "1", "other_2": "a"},
127
- {"callsign": "KF0NRV", "other_1": "1", "other_2": "a"},
128
- {"callsign": "K6GTE", "other_1": "1", "other_2": "a"},
129
- ],
130
- "ARRL SS CW": [
131
- {
132
- "callsign": "KF0NRV",
133
- "sent": "599",
134
- "receive": "599",
135
- "other_1": "1",
136
- "other_2": "27",
137
- },
138
- {
139
- "callsign": "KF0NRV",
140
- "sent": "599",
141
- "receive": "599",
142
- "other_1": "2",
143
- "other_2": "42",
144
- },
145
- {
146
- "callsign": "K6GTE",
147
- "sent": "599",
148
- "receive": "599",
149
- "other_1": "3",
150
- "other_2": "100",
151
- },
152
- ],
153
- "ARRL SS PHONE": [
154
- {
155
- "callsign": "KF0NRV",
156
- "sent": "59",
157
- "receive": "59",
158
- "other_1": "1",
159
- "other_2": "27",
160
- },
161
- {
162
- "callsign": "KF0NRV",
163
- "sent": "59",
164
- "receive": "59",
165
- "other_1": "2",
166
- "other_2": "42",
167
- },
168
- {
169
- "callsign": "K6GTE",
170
- "sent": "59",
171
- "receive": "59",
172
- "other_1": "3",
173
- "other_2": "100",
174
- },
175
- ],
176
- "ARRL VHF JAN": [
177
- {
178
- "callsign": "KF0NRV",
179
- "sent": "599",
180
- "receive": "599",
181
- "other_1": "1234",
182
- "other_2": "BB22AA",
183
- },
184
- {
185
- "callsign": "KF0NRV",
186
- "sent": "599",
187
- "receive": "599",
188
- "other_1": "1234",
189
- "other_2": "BB22AA",
190
- },
191
- {
192
- "callsign": "K6GTE",
193
- "sent": "599",
194
- "receive": "599",
195
- "other_1": "2345",
196
- "other_2": "AA11bb",
197
- },
198
- ],
199
- "ARRL VHF JUN": [
200
- {
201
- "callsign": "KF0NRV",
202
- "sent": "599",
203
- "receive": "599",
204
- "other_1": "1234",
205
- "other_2": "BB22AA",
206
- },
207
- {
208
- "callsign": "KF0NRV",
209
- "sent": "599",
210
- "receive": "599",
211
- "other_1": "1234",
212
- "other_2": "BB22AA",
213
- },
214
- {
215
- "callsign": "K6GTE",
216
- "sent": "599",
217
- "receive": "599",
218
- "other_1": "2345",
219
- "other_2": "AA11bb",
220
- },
221
- ],
222
- "ARRL VHF SEP": [
223
- {
224
- "callsign": "KF0NRV",
225
- "sent": "599",
226
- "receive": "599",
227
- "other_1": "1234",
228
- "other_2": "BB22AA",
229
- },
230
- {
231
- "callsign": "KF0NRV",
232
- "sent": "599",
233
- "receive": "599",
234
- "other_1": "1234",
235
- "other_2": "BB22AA",
236
- },
237
- {
238
- "callsign": "K6GTE",
239
- "sent": "599",
240
- "receive": "599",
241
- "other_1": "2345",
242
- "other_2": "AA11bb",
243
- },
244
- ],
245
- "CANADA DAY": [
246
- {
247
- "callsign": "KF0NRV",
248
- "sent": "599",
249
- "receive": "599",
250
- "other_1": "1",
251
- "other_2": "ia",
252
- },
253
- {
254
- "callsign": "KF0NRV",
255
- "sent": "599",
256
- "receive": "599",
257
- "other_1": "2",
258
- "other_2": "ia",
259
- },
260
- {
261
- "callsign": "K6GTE",
262
- "sent": "599",
263
- "receive": "599",
264
- "other_1": "3",
265
- "other_2": "ca",
266
- },
267
- ],
268
- "CQ 160 CW": [
269
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "ia"},
270
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "ia"},
271
- {"callsign": "K6GTE", "sent": "599", "receive": "599", "other_2": "ca"},
272
- ],
273
- "CQ 160 SSB": [
274
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "ia"},
275
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "ia"},
276
- {"callsign": "K6GTE", "sent": "59", "receive": "59", "other_2": "ca"},
277
- ],
278
- "CQ WPX CW": [
279
- {
280
- "callsign": "KF0NRV",
281
- "sent": "599",
282
- "receive": "599",
283
- "other_1": "1",
284
- "other_2": "3",
285
- },
286
- {
287
- "callsign": "KF0NRV",
288
- "sent": "599",
289
- "receive": "599",
290
- "other_1": "2",
291
- "other_2": "2",
292
- },
293
- {
294
- "callsign": "K6GTE",
295
- "sent": "599",
296
- "receive": "599",
297
- "other_1": "3",
298
- "other_2": "1",
299
- },
300
- ],
301
- "CQ WPX SSB": [
302
- {
303
- "callsign": "KF0NRV",
304
- "sent": "59",
305
- "receive": "59",
306
- "other_1": "1",
307
- "other_2": "3",
308
- },
309
- {
310
- "callsign": "KF0NRV",
311
- "sent": "59",
312
- "receive": "59",
313
- "other_1": "2",
314
- "other_2": "2",
315
- },
316
- {
317
- "callsign": "K6GTE",
318
- "sent": "59",
319
- "receive": "59",
320
- "other_1": "3",
321
- "other_2": "1",
322
- },
323
- ],
324
- "CQ WW CW": [
325
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "4"},
326
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "4"},
327
- {"callsign": "K6GTE", "sent": "599", "receive": "599", "other_2": "3"},
328
- ],
329
- "CQ WW RTTY": [
330
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "4"},
331
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "4"},
332
- {"callsign": "K6GTE", "sent": "599", "receive": "599", "other_2": "3"},
333
- ],
334
- "CQ WW SSB": [
335
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "4"},
336
- {"callsign": "KF0NRV", "sent": "59", "receive": "59", "other_2": "4"},
337
- {"callsign": "K6GTE", "sent": "59", "receive": "59", "other_2": "3"},
338
- ],
339
- "CWT": [
340
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
341
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
342
- {"callsign": "K6GTE", "other_1": "mike", "other_2": "ca"},
343
- ],
344
- "HELVETIA": [
345
- {
346
- "callsign": "KF0NRV",
347
- "sent": "599",
348
- "receive": "599",
349
- "other_1": "1",
350
- "other_2": "3",
351
- },
352
- {
353
- "callsign": "KF0NRV",
354
- "sent": "599",
355
- "receive": "599",
356
- "other_1": "2",
357
- "other_2": "2",
358
- },
359
- {
360
- "callsign": "K6GTE",
361
- "sent": "599",
362
- "receive": "599",
363
- "other_1": "3",
364
- "other_2": "1",
365
- },
366
- ],
367
- "ICWC MST": [
368
- {"callsign": "KF0NRV", "sent": "1", "other_1": "dan", "other_2": "1"},
369
- {"callsign": "KF0NRV", "sent": "2", "other_1": "dan", "other_2": "2"},
370
- {"callsign": "K6GTE", "sent": "3", "other_1": "mike", "other_2": "3"},
371
- ],
372
- "IARU FIELDDAY R1 CW": [
373
- {
374
- "callsign": "KF0NRV",
375
- "sent": "599",
376
- "receive": "599",
377
- "other_1": "1",
378
- "other_2": "1",
379
- },
380
- {
381
- "callsign": "KF0NRV",
382
- "sent": "599",
383
- "receive": "599",
384
- "other_1": "2",
385
- "other_2": "2",
386
- },
387
- {
388
- "callsign": "K6GTE",
389
- "sent": "599",
390
- "receive": "599",
391
- "other_1": "3",
392
- "other_2": "3",
393
- },
394
- ],
395
- "IARU FIELDDAY R1 SSB": [
396
- {
397
- "callsign": "KF0NRV",
398
- "sent": "59",
399
- "receive": "59",
400
- "other_1": "1",
401
- "other_2": "1",
402
- },
403
- {
404
- "callsign": "KF0NRV",
405
- "sent": "59",
406
- "receive": "59",
407
- "other_1": "2",
408
- "other_2": "2",
409
- },
410
- {
411
- "callsign": "K6GTE",
412
- "sent": "59",
413
- "receive": "59",
414
- "other_1": "3",
415
- "other_2": "3",
416
- },
417
- ],
418
- "IARU HF": [
419
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "7"},
420
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_2": "7"},
421
- {"callsign": "K6GTE", "sent": "599", "receive": "599", "other_2": "6"},
422
- ],
423
- "JIDX CW": [
424
- {
425
- "callsign": "KF0NRV",
426
- "sent": "599",
427
- "receive": "599",
428
- "other_1": "1",
429
- "other_2": "1",
430
- },
431
- {
432
- "callsign": "KF0NRV",
433
- "sent": "599",
434
- "receive": "599",
435
- "other_1": "2",
436
- "other_2": "2",
437
- },
438
- {
439
- "callsign": "K6GTE",
440
- "sent": "599",
441
- "receive": "599",
442
- "other_1": "3",
443
- "other_2": "3",
444
- },
445
- ],
446
- "JIDX PH": [
447
- {
448
- "callsign": "KF0NRV",
449
- "sent": "59",
450
- "receive": "59",
451
- "other_1": "1",
452
- "other_2": "1",
453
- },
454
- {
455
- "callsign": "KF0NRV",
456
- "sent": "59",
457
- "receive": "59",
458
- "other_1": "2",
459
- "other_2": "2",
460
- },
461
- {
462
- "callsign": "K6GTE",
463
- "sent": "59",
464
- "receive": "59",
465
- "other_1": "3",
466
- "other_2": "3",
467
- },
468
- ],
469
- "K1USN SST": [
470
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
471
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
472
- {"callsign": "K6GTE", "other_1": "mike", "other_2": "ca"},
473
- ],
474
- "NAQP CW": [
475
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
476
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
477
- {"callsign": "K6GTE", "other_1": "mike", "other_2": "ca"},
478
- ],
479
- "NAQP SSB": [
480
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
481
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
482
- {"callsign": "K6GTE", "other_1": "mike", "other_2": "ca"},
483
- ],
484
- "PHONE WEEKLY TEST": [
485
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
486
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
487
- {"callsign": "K6GTE", "other_1": "mike", "other_2": "ca"},
488
- ],
489
- "STEW PERRY TOPBAND": [
490
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_1": "BB22AA"},
491
- {"callsign": "KF0NRV", "sent": "599", "receive": "599", "other_1": "BB22AA"},
492
- {"callsign": "K6GTE", "sent": "599", "receive": "599", "other_1": "AA11bb"},
493
- ],
494
- "WEEKLY RTTY": [
495
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
496
- {"callsign": "KF0NRV", "other_1": "dan", "other_2": "ia"},
497
- {"callsign": "K6GTE", "other_1": "mike", "other_2": "ca"},
498
- ],
499
- "WINTER FIELD DAY": [
500
- {"callsign": "KF0NRV", "other_1": "1", "other_2": "a"},
501
- {"callsign": "KF0NRV", "other_1": "1", "other_2": "a"},
502
- {"callsign": "K6GTE", "other_1": "1", "other_2": "a"},
503
- ],
504
- }
505
-
506
-
507
- @pytest.fixture
508
- def app(qtbot):
509
- # Qbot setup
510
- not1mm_app = not1mm.MainWindow(not1mm.splash)
511
- not1mm_app.show()
512
- qtbot.addWidget(not1mm_app)
513
-
514
- # Stub out filepicker and create a new database
515
- if os.path.exists(fsutils.USER_DATA_PATH / "contest_testing.db"):
516
- os.remove(fsutils.USER_DATA_PATH / "contest_testing.db")
517
- not1mm_app.filepicker = lambda x: "contest_testing.db"
518
- not1mm_app.actionNew_Database.trigger()
519
-
520
- # Enter initial setings as default
521
- settings_dialog = not1mm_app.settings_dialog
522
- settings_dialog.Call.setText("K5TUX")
523
- settings_dialog.ITUZone.setText("7")
524
- settings_dialog.CQZone.setText("4")
525
- settings_dialog.Country.setText("United States")
526
- settings_dialog.GridSquare.setText("EM37bb")
527
- settings_dialog.Latitude.setText("37.0625")
528
- settings_dialog.Longitude.setText("-93.875")
529
-
530
- qtbot.keyClick(
531
- settings_dialog,
532
- QtCore.Qt.Key.Key_Tab,
533
- modifier=QtCore.Qt.KeyboardModifier.ShiftModifier,
534
- delay=WAIT_TIME,
535
- )
536
- qtbot.keyClick(settings_dialog, QtCore.Qt.Key.Key_Return)
537
-
538
- # Enter initial contest as default
539
- contest_dialog = not1mm_app.contest_dialog
540
- qtbot.keyClick(
541
- contest_dialog,
542
- QtCore.Qt.Key.Key_Tab,
543
- modifier=QtCore.Qt.KeyboardModifier.ShiftModifier,
544
- delay=WAIT_TIME,
545
- )
546
- qtbot.keyClick(contest_dialog, QtCore.Qt.Key.Key_Return)
547
- yield not1mm_app
548
- # Cleanup
549
- if os.path.exists(fsutils.USER_DATA_PATH / "contest_testing.db"):
550
- os.remove(fsutils.USER_DATA_PATH / "contest_testing.db")
551
-
552
-
553
- def test_contests(app, qtbot):
554
- # Each contest has an initial log, a duplicate log, and a unique log
555
-
556
- for contest in CONTEST_DATA:
557
- app.actionNew_Contest.trigger()
558
-
559
- contest_dialog = app.contest_dialog
560
- contest_dialog.contest.setCurrentText(contest)
561
- qtbot.keyClick(
562
- contest_dialog,
563
- QtCore.Qt.Key.Key_Tab,
564
- modifier=QtCore.Qt.KeyboardModifier.ShiftModifier,
565
- delay=WAIT_TIME,
566
- )
567
- qtbot.keyClick(contest_dialog, QtCore.Qt.Key.Key_Return)
568
-
569
- # Enter each field and tab keystroke to exercise plugin hooks
570
- for entry in CONTEST_DATA[contest]:
571
- if "callsign" in entry:
572
- app.callsign.setText(entry["callsign"])
573
- qtbot.keyClick(app, QtCore.Qt.Key.Key_Tab, delay=WAIT_TIME)
574
-
575
- if "sent" in entry:
576
- app.sent.setText(entry["sent"])
577
- qtbot.keyClick(app, QtCore.Qt.Key.Key_Tab, delay=WAIT_TIME)
578
-
579
- if "receive" in entry:
580
- app.receive.setText(entry["receive"])
581
- qtbot.keyClick(app, QtCore.Qt.Key.Key_Tab, delay=WAIT_TIME)
582
-
583
- if "other_1" in entry:
584
- app.other_1.setText(entry["other_1"])
585
- qtbot.keyClick(app, QtCore.Qt.Key.Key_Tab, delay=WAIT_TIME)
586
-
587
- if "other_2" in entry:
588
- app.other_2.setText(entry["other_2"])
589
-
590
- qtbot.wait(WAIT_TIME)
591
- qtbot.keyClick(app.callsign, QtCore.Qt.Key.Key_Return)