not1mm 24.7.29__py3-none-any.whl → 24.8.17__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
@@ -16,11 +16,8 @@ import locale
16
16
  import logging
17
17
  from logging.handlers import RotatingFileHandler
18
18
  import os
19
-
20
19
  import platform
21
- import re
22
20
  import socket
23
-
24
21
  import sys
25
22
  import threading
26
23
  import uuid
@@ -30,7 +27,6 @@ from pathlib import Path
30
27
  from shutil import copyfile
31
28
 
32
29
  import notctyparser
33
- import psutil
34
30
 
35
31
  try:
36
32
  import sounddevice as sd
@@ -82,28 +78,6 @@ from not1mm.voice_keying import Voice
82
78
  poll_time = datetime.datetime.now()
83
79
 
84
80
 
85
- def check_process(name: str) -> bool:
86
- """
87
- Checks to see if the name of the program is in the active process list.
88
-
89
- Parameters
90
- ----------
91
- name : str
92
-
93
- Returns
94
- -------
95
- Bool
96
- """
97
- for proc in psutil.process_iter():
98
- try:
99
- if len(proc.cmdline()) == 2:
100
- if name in proc.cmdline()[1] and "python" in proc.cmdline()[0]:
101
- return True
102
- except (psutil.NoSuchProcess, psutil.ZombieProcess, psutil.AccessDenied):
103
- continue
104
- return False
105
-
106
-
107
81
  class MainWindow(QtWidgets.QMainWindow):
108
82
  """
109
83
  The main window
@@ -522,23 +496,37 @@ class MainWindow(QtWidgets.QMainWindow):
522
496
  self.load_contest()
523
497
  self.read_cw_macros()
524
498
 
499
+ # Featureset for wayland
500
+ dockfeatures = (
501
+ QtWidgets.QDockWidget.DockWidgetFeature.DockWidgetClosable
502
+ | QtWidgets.QDockWidget.DockWidgetFeature.DockWidgetMovable
503
+ )
504
+
525
505
  self.log_window = LogWindow()
526
506
  self.log_window.setObjectName("log-window")
507
+ if os.environ.get("WAYLAND_DISPLAY"):
508
+ self.log_window.setFeatures(dockfeatures)
527
509
  self.addDockWidget(Qt.DockWidgetArea.TopDockWidgetArea, self.log_window)
528
510
  self.log_window.hide()
529
511
 
530
512
  self.bandmap_window = BandMapWindow()
531
513
  self.bandmap_window.setObjectName("bandmap-window")
514
+ if os.environ.get("WAYLAND_DISPLAY"):
515
+ self.bandmap_window.setFeatures(dockfeatures)
532
516
  self.addDockWidget(Qt.DockWidgetArea.LeftDockWidgetArea, self.bandmap_window)
533
517
  self.bandmap_window.hide()
534
518
 
535
519
  self.check_window = CheckWindow()
536
520
  self.check_window.setObjectName("check-window")
521
+ if os.environ.get("WAYLAND_DISPLAY"):
522
+ self.check_window.setFeatures(dockfeatures)
537
523
  self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.check_window)
538
524
  self.check_window.hide()
539
525
 
540
526
  self.vfo_window = VfoWindow()
541
527
  self.vfo_window.setObjectName("vfo-window")
528
+ if os.environ.get("WAYLAND_DISPLAY"):
529
+ self.vfo_window_window.setFeatures(dockfeatures)
542
530
  self.addDockWidget(Qt.DockWidgetArea.RightDockWidgetArea, self.vfo_window)
543
531
  self.vfo_window.hide()
544
532
 
@@ -782,25 +770,6 @@ class MainWindow(QtWidgets.QMainWindow):
782
770
  self.multicast_interface.send_as_json(cmd)
783
771
  app.quit()
784
772
 
785
- @staticmethod
786
- def check_process(name: str) -> bool:
787
- """
788
- Checks to see if program is in the active process list.
789
-
790
- Parameters
791
- ----------
792
- name : str
793
-
794
- Returns
795
- -------
796
- Bool
797
- """
798
-
799
- for proc in psutil.process_iter():
800
- if bool(re.match(name, proc.name().lower())):
801
- return True
802
- return False
803
-
804
773
  def show_message_box(self, message: str) -> None:
805
774
  """
806
775
  Displays a dialog box with a message.
@@ -2233,14 +2202,22 @@ class MainWindow(QtWidgets.QMainWindow):
2233
2202
  if next_serial == "None":
2234
2203
  next_serial = "1"
2235
2204
  macro = macro.upper()
2236
- macro = macro.replace("#", next_serial)
2205
+ if self.radio_state.get("mode") == "CW":
2206
+ macro = macro.replace("#", next_serial.rjust(3, "T"))
2207
+ else:
2208
+ macro = macro.replace("#", next_serial)
2237
2209
  macro = macro.replace("{MYCALL}", self.station.get("Call", ""))
2238
2210
  macro = macro.replace("{HISCALL}", self.callsign.text())
2239
2211
  if self.radio_state.get("mode") == "CW":
2240
2212
  macro = macro.replace("{SNT}", self.sent.text().replace("9", "n"))
2241
2213
  else:
2242
2214
  macro = macro.replace("{SNT}", self.sent.text())
2243
- macro = macro.replace("{SENTNR}", self.other_1.text())
2215
+ if self.radio_state.get("mode") == "CW":
2216
+ macro = macro.replace(
2217
+ "{SENTNR}", self.other_1.text().lstrip("0").rjust(3, "T")
2218
+ )
2219
+ else:
2220
+ macro = macro.replace("{SENTNR}", self.other_1.text())
2244
2221
  macro = macro.replace(
2245
2222
  "{EXCH}", self.contest_settings.get("SentExchange", "xxx")
2246
2223
  )
not1mm/bandmap.py CHANGED
@@ -659,20 +659,9 @@ class BandMapWindow(QDockWidget):
659
659
  def center_on_rxfreq(self):
660
660
  """doc"""
661
661
  freq_pos = self.Freq2ScenePos(self.rx_freq).y()
662
- # self.graphicsView.verticalScrollBar().setSliderPosition(
663
- # int(freq_pos - (self.height() / 2) + 80)
664
- # )
665
662
  self.scrollArea.verticalScrollBar().setValue(
666
663
  int(freq_pos - (self.height() / 2) + 80)
667
664
  )
668
- # This does not work... Have no idea why.
669
- # anim = QtCore.QPropertyAnimation(
670
- # self.scrollArea.verticalScrollBar(), "value".encode()
671
- # )
672
- # anim.setDuration(300)
673
- # anim.setStartValue(self.scrollArea.verticalScrollBar().value())
674
- # anim.setEndValue(int(freq_pos - (self.height() / 2) + 80))
675
- # anim.start(QtCore.QAbstractAnimation.DeletionPolicy.DeleteWhenStopped)
676
665
 
677
666
  def drawfreqmark(self, freq, _step, color, currentPolygon) -> None:
678
667
  """doc"""
@@ -842,7 +831,6 @@ class BandMapWindow(QDockWidget):
842
831
  dx = parts[4]
843
832
  _time = parts[-1]
844
833
  comment = " ".join(parts[5:-1])
845
- # spot = DxSpot()
846
834
  spot = {}
847
835
  spot["ts"] = datetime.now(timezone.utc).isoformat(" ")[:19]
848
836
  spot["callsign"] = dx
@@ -856,13 +844,11 @@ class BandMapWindow(QDockWidget):
856
844
  logger.debug(f"couldn't parse freq from datablock {data}")
857
845
  return
858
846
  if self.callsignField.text().upper() in data:
859
- # self.connectButton.setStyleSheet("color: green;")
860
847
  self.connectButton.setText("Connected")
861
848
  logger.debug(f"callsign login acknowledged {data}")
862
849
 
863
850
  def maybeconnected(self) -> None:
864
851
  """Update visual state of the connect button."""
865
- # self.connectButton.setStyleSheet("color: yellow;")
866
852
  self.connectButton.setText("Connecting")
867
853
 
868
854
  def socket_error(self) -> None:
not1mm/checkwindow.py CHANGED
@@ -111,7 +111,6 @@ class CheckWindow(QDockWidget):
111
111
  )
112
112
 
113
113
  self.setPalette(darkPalette)
114
- # self.CheckPartialWindow.setPalette(darkPalette)
115
114
  else:
116
115
  palette = self.style().standardPalette()
117
116
  self.setPalette(palette)
not1mm/lib/version.py CHANGED
@@ -1,4 +1,4 @@
1
1
  """It's the version"""
2
2
 
3
- __version__ = "24.7.29"
3
+ __version__ = "24.8.17"
4
4
 
not1mm/vfo.py CHANGED
@@ -162,7 +162,6 @@ class VfoWindow(QDockWidget):
162
162
 
163
163
  devices = None
164
164
  data = None
165
- # app.processEvents()
166
165
  try:
167
166
  devices = os.listdir("/dev/serial/by-id")
168
167
  except FileNotFoundError:
@@ -216,7 +215,6 @@ class VfoWindow(QDockWidget):
216
215
  "Unable to locate or open the VFO knob serial device."
217
216
  )
218
217
  self.lcdNumber.setStyleSheet("QLCDNumber { color: red; }")
219
- # app.processEvents()
220
218
 
221
219
  def watch_udp(self) -> None:
222
220
  """
@@ -263,7 +261,6 @@ class VfoWindow(QDockWidget):
263
261
  if len(dvfo) > 6:
264
262
  dnum = f"{dvfo[:len(dvfo)-6]}.{dvfo[-6:-3]}.{dvfo[-3:]}"
265
263
  self.lcdNumber.display(dnum)
266
- # app.processEvents()
267
264
 
268
265
  def poll_radio(self) -> None:
269
266
  """
@@ -285,8 +282,6 @@ class VfoWindow(QDockWidget):
285
282
  self.old_vfo = vfo
286
283
  logger.debug(f"{vfo}")
287
284
  self.showNumber(vfo)
288
- # self.lcdNumber.display(dnum)
289
- # app.processEvents()
290
285
  cmd = f"F {vfo}\r"
291
286
  self.device_reconnect = False
292
287
  try:
@@ -313,8 +308,6 @@ class VfoWindow(QDockWidget):
313
308
  if self.rig_control:
314
309
  self.rig_control.set_vfo(result)
315
310
  self.showNumber(result)
316
- # self.lcdNumber.display(result)
317
- # app.processEvents()
318
311
  else:
319
312
  self.setup_serial(supress_msg=True)
320
313
  except OSError:
@@ -323,7 +316,6 @@ class VfoWindow(QDockWidget):
323
316
  except AttributeError:
324
317
  logger.critical("Unable to write to serial device.")
325
318
  self.pico = None
326
- # app.processEvents()
327
319
 
328
320
  def show_message_box(self, message: str) -> None:
329
321
  """
not1mm/voice_keying.py CHANGED
@@ -53,12 +53,10 @@ class Voice(QObject):
53
53
  if Path(filename).is_file():
54
54
  logger.debug("Voicing: %s", filename)
55
55
  data, _fs = sf.read(filename, dtype="float32")
56
- # self.ptt_on.emit()
57
56
  try:
58
57
  sd.default.device = self.sounddevice
59
58
  sd.default.samplerate = 44100.0
60
59
  sd.play(data, blocking=True)
61
- # _status = sd.wait()
62
60
  # https://snyk.io/advisor/python/sounddevice/functions/sounddevice.PortAudioError
63
61
  except sd.PortAudioError as err:
64
62
  logger.warning("%s", f"{err}")
@@ -84,8 +82,6 @@ class Voice(QObject):
84
82
  if sd is None:
85
83
  logger.warning("Sounddevice/portaudio not installed.")
86
84
  return
87
- # fsutils.USER_DATA_PATH
88
- # self.current_op
89
85
  op_path = self.data_path / self.current_op
90
86
  if "[" in the_string:
91
87
  sub_string = the_string.strip("[]").lower()
@@ -1,12 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: not1mm
3
- Version: 24.7.29
3
+ Version: 24.8.17
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
7
7
  Project-URL: Bug Tracker, https://github.com/mbridak/not1mm/issues
8
8
  Classifier: Programming Language :: Python :: 3
9
- Classifier: Development Status :: 4 - Beta
9
+ Classifier: Development Status :: 5 - Production/Stable
10
10
  Classifier: License :: OSI Approved :: GNU General Public License v3 (GPLv3)
11
11
  Classifier: Environment :: X11 Applications :: Qt
12
12
  Classifier: Operating System :: POSIX :: Linux
@@ -20,7 +20,6 @@ Requires-Dist: PyQt6
20
20
  Requires-Dist: requests
21
21
  Requires-Dist: dicttoxml
22
22
  Requires-Dist: xmltodict
23
- Requires-Dist: psutil
24
23
  Requires-Dist: pyserial
25
24
  Requires-Dist: sounddevice
26
25
  Requires-Dist: soundfile
@@ -223,13 +222,7 @@ generated, 'cause I'm lazy, list of those who've submitted PR's.
223
222
 
224
223
  ## Recent Changes
225
224
 
226
- - [24-7-29] Add flrig cw speed change via onscreen widget.
227
- - [24-7-28] Second try at flrig CW.
228
- - [24-7-25-1] Have VFO dock widget handle disconnect/reconnect events of the USB VFO knob more gracefully.
229
- - [24-7-25] Updated application categories for the desktop file.
230
- - [24-7-25] Maybe let flrig send CW... Probably not.
231
- - [24-7-19] Use Qt's QSettings to store window and dockwidgets states.
232
- - [24-7-13] Trap Exceptions in flrig xmlrpc client.
225
+ - [24-8-17] Removed some cruft. Made dockable widgets not floatable since Wayland breaks this.
233
226
 
234
227
  See [CHANGELOG.md](CHANGELOG.md) for prior changes.
235
228
 
@@ -1,13 +1,13 @@
1
1
  not1mm/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
- not1mm/__main__.py,sha256=-zzE1QUDpuVKwgWJeoEPJ7ceCCvx0YLBISw24xQJgs4,121481
3
- not1mm/bandmap.py,sha256=Ml5DDoybk_I56q2WLYDKE4lfmh6pb9XxW0qpl5nDFYY,32161
4
- not1mm/checkwindow.py,sha256=zHxkCQ4BJ-pN80dSTQdiKq8RqY4oWzJveXZhQ2bu3PY,10436
2
+ not1mm/__main__.py,sha256=Mc_XbbwjiWXL_OS3Xqvr4GGIVKcxlc7i7AZaCDFDw-o,121462
3
+ not1mm/bandmap.py,sha256=1b5tXCfGTnpqqn6hPNt7zRA8SmuwSXzSwNHZXhCRt70,31434
4
+ not1mm/checkwindow.py,sha256=aI-nr8OF90IWV7R_XRdmitvBJ9M85evCs72HoU3Jnvc,10374
5
5
  not1mm/fsutils.py,sha256=ukHKxKTeNKxKwqRaJjtzRShL4X5Xl0jRBbADyy3Ifp8,1701
6
6
  not1mm/logwindow.py,sha256=pwhiwolmGnW01LF4sjlu3ywLsgfxL6KuGuKuYKYmgeY,44403
7
7
  not1mm/playsoundtest.py,sha256=_kvvOfgs-u-H4kVSiSlnDtn9HWv0RiJQybkv24CEngc,464
8
8
  not1mm/radio.py,sha256=eiB04LPMPBeMrBRI021Z7VXth66EOYb0Ujh11T9877c,3362
9
- not1mm/vfo.py,sha256=ZJYJHMUrvAWX_c4xXDOuxkbE9sFuF8THoqJXaz0e_AU,12663
10
- not1mm/voice_keying.py,sha256=fkexCCwWcZsXxYVAk0QGcpGbLjbS10ToxWtdKihIVM4,3152
9
+ not1mm/vfo.py,sha256=IvmUQYMIPzLJw_BHQGis4J_IEW-vlBtdfxZLXPh7OzI,12335
10
+ not1mm/voice_keying.py,sha256=sA3gw5_k7kShTg2qhG7HkKDM5M6KheJVRkAc_C7mxDk,3006
11
11
  not1mm/data/JetBrainsMono-Regular.ttf,sha256=UOHctAKY_PzCGh7zy-6f6egnCcSK0wzmF0csBqO9lDY,203952
12
12
  not1mm/data/MASTER.SCP,sha256=CEjRJNnjBZJlhCi3UFS1qCVMjDqQwhlfk0yZ_os6myI,366153
13
13
  not1mm/data/about.ui,sha256=7TqvtXFFm0Rmcu0bmLupwpO1CsK8MekfZ09_xn6kZrQ,2067
@@ -109,7 +109,7 @@ not1mm/lib/plugin_common.py,sha256=AAKBPCXzTWZJb-h08uPNnHVG7bSCg7kwukc211gFivY,8
109
109
  not1mm/lib/select_contest.py,sha256=WsptLuwkouIHeocJL3oZ6-eUfEnhpwdc-x7eMZ_TIVM,359
110
110
  not1mm/lib/settings.py,sha256=MWiKXbasaFbzeHTjfzTaTqbCBrIijudP_-0a5jNmUAA,9265
111
111
  not1mm/lib/super_check_partial.py,sha256=p5l3u2ZOCBtlWgbvskC50FpuoaIpR07tfC6zTdRWbh4,2334
112
- not1mm/lib/version.py,sha256=BMpTloYgDxnJAW_gTC-FRCBOqBhNTglZbFeS_OdpJiQ,49
112
+ not1mm/lib/version.py,sha256=KD1zLDozF_Qq38UeKdujPpZCSLz8rpM_O0OYAp9XwDg,49
113
113
  not1mm/lib/versiontest.py,sha256=8vDNptuBBunn-1IGkjNaquehqBYUJyjrPSF8Igmd4_Y,1286
114
114
  not1mm/plugins/10_10_fall_cw.py,sha256=IttjX1yy4nDdACGsiYlPteFG8eVseX_WtoFio6bqHE8,10953
115
115
  not1mm/plugins/10_10_spring_cw.py,sha256=ThCptdM3dX4ywhoy2JRcOEyHSqcJolFaT7O_PYzM1Mg,10958
@@ -145,9 +145,9 @@ not1mm/plugins/naqp_ssb.py,sha256=VLWVrSzI0UP1AhSXYn61eZ7or1rz6a_pS_xCKfgS4Jw,11
145
145
  not1mm/plugins/phone_weekly_test.py,sha256=fLpMe03WB9_KgRl6vMgQQt_aktFdqfNt2Sw81CTRAUs,12325
146
146
  not1mm/plugins/stew_perry_topband.py,sha256=CKBQbYl4ETxhXJd2dma4fg_C5pag_s7Nf61SCztZtqE,10668
147
147
  not1mm/plugins/winter_field_day.py,sha256=4rcfRtobwjHO6BNL3WOTHzBmyyeuX79BNGBG8PfjrI8,10238
148
- not1mm-24.7.29.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
149
- not1mm-24.7.29.dist-info/METADATA,sha256=gxO9nKYQuDwbFIRsySM-8YZydIx54Nn5gF8W8UUhUAY,29506
150
- not1mm-24.7.29.dist-info/WHEEL,sha256=R0nc6qTxuoLk7ShA2_Y-UWkN8ZdfDBG2B6Eqpz2WXbs,91
151
- not1mm-24.7.29.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
152
- not1mm-24.7.29.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
153
- not1mm-24.7.29.dist-info/RECORD,,
148
+ not1mm-24.8.17.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
149
+ not1mm-24.8.17.dist-info/METADATA,sha256=vP3alPhxvOCEhnCN_U3qgbQ-Jk2OY6xdBrZVaIi5124,29149
150
+ not1mm-24.8.17.dist-info/WHEEL,sha256=HiCZjzuy6Dw0hdX5R3LCFPDmFS4BWl8H-8W39XfmgX4,91
151
+ not1mm-24.8.17.dist-info/entry_points.txt,sha256=pMcZk_0dxFgLkcUkF0Q874ojpwOmF3OL6EKw9LgvocM,47
152
+ not1mm-24.8.17.dist-info/top_level.txt,sha256=0YmTxEcDzQlzXub-lXASvoLpg_mt1c2thb5cVkDf5J4,7
153
+ not1mm-24.8.17.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (72.1.0)
2
+ Generator: setuptools (72.2.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5