SpecLog 0.0.5__tar.gz → 0.0.6__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.
Files changed (35) hide show
  1. {speclog-0.0.5 → speclog-0.0.6}/PKG-INFO +1 -1
  2. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/config_editor.py +35 -0
  3. speclog-0.0.6/SpecLog/version.py +1 -0
  4. {speclog-0.0.5 → speclog-0.0.6}/SpecLog.egg-info/PKG-INFO +1 -1
  5. speclog-0.0.5/SpecLog/version.py +0 -1
  6. {speclog-0.0.5 → speclog-0.0.6}/LICENSE +0 -0
  7. {speclog-0.0.5 → speclog-0.0.6}/README.md +0 -0
  8. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/SpecLog.py +0 -0
  9. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/SpecLogger.py +0 -0
  10. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/SpecMonitor.py +0 -0
  11. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/__init__.py +0 -0
  12. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/config/__init__.py +0 -0
  13. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/config/config.cfg +0 -0
  14. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/config/config.py +0 -0
  15. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/debugLog.py +0 -0
  16. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/device.py +0 -0
  17. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/history.py +0 -0
  18. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/loggerConfig.py +0 -0
  19. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/logger_status.py +0 -0
  20. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/monitor.py +0 -0
  21. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/run_logger.pyw +0 -0
  22. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/run_monitor.pyw +0 -0
  23. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/startup_task.py +0 -0
  24. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/ui/__init__.py +0 -0
  25. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/ui/config_editor.py +0 -0
  26. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/ui/plotting.py +0 -0
  27. {speclog-0.0.5 → speclog-0.0.6}/SpecLog/ui/plotting.ui +0 -0
  28. {speclog-0.0.5 → speclog-0.0.6}/SpecLog.egg-info/SOURCES.txt +0 -0
  29. {speclog-0.0.5 → speclog-0.0.6}/SpecLog.egg-info/dependency_links.txt +0 -0
  30. {speclog-0.0.5 → speclog-0.0.6}/SpecLog.egg-info/entry_points.txt +0 -0
  31. {speclog-0.0.5 → speclog-0.0.6}/SpecLog.egg-info/requires.txt +0 -0
  32. {speclog-0.0.5 → speclog-0.0.6}/SpecLog.egg-info/top_level.txt +0 -0
  33. {speclog-0.0.5 → speclog-0.0.6}/pyproject.toml +0 -0
  34. {speclog-0.0.5 → speclog-0.0.6}/setup.cfg +0 -0
  35. {speclog-0.0.5 → speclog-0.0.6}/tests/test_core.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SpecLog
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: A Python Package for logging data from instrumentations
5
5
  Author-email: Yen-Chun Huang <yen-chun.huang@bruker.com>
6
6
  License-Expression: MIT
@@ -45,6 +45,7 @@ class ConfigEditor(QMainWindow):
45
45
  self.logger_log_offset = 0
46
46
  self.startup_state = "Checking..."
47
47
  self.scheduled_task_running = False
48
+ self._closing = False
48
49
  self.setWindowTitle("SpecLog Configuration")
49
50
  self.resize(900, 600)
50
51
  self._build_ui()
@@ -95,6 +96,36 @@ class ConfigEditor(QMainWindow):
95
96
  self.startup_timer.start()
96
97
  self._refresh_startup_status()
97
98
 
99
+ def closeEvent(self, event):
100
+ """Stop status probes before Qt destroys the editor's widgets."""
101
+ self._closing = True
102
+ for timer_name in ("logger_timer", "startup_timer"):
103
+ timer = getattr(self, timer_name, None)
104
+ if timer is not None:
105
+ timer.stop()
106
+
107
+ # A process can emit errorOccurred while its parent and sibling widgets
108
+ # are being torn down. Block those callbacks first, then ensure no
109
+ # child process is left running when its QProcess wrapper is destroyed.
110
+ for process_name in (
111
+ "task_state_process",
112
+ "startup_query_process",
113
+ "logger_process",
114
+ "startup_process",
115
+ ):
116
+ process = getattr(self, process_name, None)
117
+ if process is None:
118
+ continue
119
+ process.blockSignals(True)
120
+ if process.state() == QProcess.ProcessState.NotRunning:
121
+ continue
122
+ process.terminate()
123
+ if not process.waitForFinished(500):
124
+ process.kill()
125
+ process.waitForFinished(1000)
126
+
127
+ super().closeEvent(event)
128
+
98
129
  def _update_command_buttons(self, tab_index):
99
130
  self.add_value_command_button.setVisible(tab_index == 0)
100
131
  self.add_status_command_button.setVisible(tab_index == 1)
@@ -115,6 +146,8 @@ class ConfigEditor(QMainWindow):
115
146
  return is_logger_running()
116
147
 
117
148
  def _refresh_logger_status(self):
149
+ if self._closing:
150
+ return
118
151
  if os.name != "nt":
119
152
  self.logger_status_label.setText("Status unavailable")
120
153
  self.start_logger_button.setEnabled(False)
@@ -286,6 +319,8 @@ class ConfigEditor(QMainWindow):
286
319
  )
287
320
 
288
321
  def _refresh_startup_status(self):
322
+ if self._closing:
323
+ return
289
324
  if os.name != "nt":
290
325
  self._set_startup_state("Unavailable")
291
326
  return
@@ -0,0 +1 @@
1
+ __version__ = "0.0.6"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: SpecLog
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: A Python Package for logging data from instrumentations
5
5
  Author-email: Yen-Chun Huang <yen-chun.huang@bruker.com>
6
6
  License-Expression: MIT
@@ -1 +0,0 @@
1
- __version__ = "0.0.5"
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