From 94be2fb921835a4e4b210322618e4606bb803ac1 Mon Sep 17 00:00:00 2001 From: Tyler Date: Tue, 24 Mar 2026 16:51:55 -0700 Subject: [PATCH] delete unneeded method and comment out unused params --- main.py | 60 ++++++++++++++++----------------------------------------- 1 file changed, 17 insertions(+), 43 deletions(-) diff --git a/main.py b/main.py index 3ad825a..50bd689 100644 --- a/main.py +++ b/main.py @@ -181,9 +181,9 @@ SECTIONS = [ # TODO: implement drop {"name": "EPOCH_HANDLING", "default": ["shift"], "type": list, "options": ["shift", "strict"], "help": "What to do if two unique events occur at the same time. Shift will automatically move one event to the first valid free index. Strict will raise an error processing the file. Drop will remove one of the events."}, {"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."}, - {"name": "REJECT_BY_ANNOTATIONS", "default": True, "type": bool, "help": "Help."}, - {"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."}, - {"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."}, + #{"name": "REJECT_BY_ANNOTATIONS", "default": True, "type": bool, "help": "Help."}, + #{"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."}, + #{"name": "MAX_SHIFT", "default": 5, "type": int, "depends_on": "EPOCH_HANDLING", "depends_value": "shift", "help": "Amount of indexes to look ahead and see if there is a valid one to shift to. If none were found, will fall back to 'strict' behaviour."}, {"name": "T_MIN", "default": -5, "type": int, "help": "Seconds before the epoch to be used."}, {"name": "T_MAX", "default": 15, "type": int, "help": "Seconds after the epoch to be used."}, ] @@ -6204,54 +6204,28 @@ def _extract_metadata_worker(file_name): print(f"Worker failed on {file_name}: {e}") return None -# def run_gui_entry_wrapper(config, gui_queue, progress_queue): -# """ -# Where the processing happens -# """ - -# try: -# import flares -# flares.gui_entry(config, gui_queue, progress_queue) -# gui_queue.close() -# # gui_queue.join_thread() -# progress_queue.close() -# # progress_queue.join_thread() -# os._exit(0) - -# except Exception as e: -# tb_str = traceback.format_exc() -# gui_queue.put({ -# "success": False, -# "error": f"Child process crashed: {str(e)}\nTraceback:\n{tb_str}" -# }) -# os._exit(1) - - -def log_to_file(msg): - with open("FLARES_CRITICAL_LOG.txt", "a") as f: - f.write(f"DEBUG: {msg}\n") - def run_gui_entry_wrapper(config, gui_queue, progress_queue): - log_to_file("Wrapper Started") + """ + Where the processing happens + """ + try: import flares - log_to_file("Flares Imported") - - # This is the line where it likely dies flares.gui_entry(config, gui_queue, progress_queue) - - log_to_file("gui_entry finished successfully") - - gui_queue.cancel_join_thread() - progress_queue.cancel_join_thread() - - log_to_file("Attempting OS EXIT") + gui_queue.close() + # gui_queue.join_thread() + progress_queue.close() + # progress_queue.join_thread() os._exit(0) except Exception as e: - err = f"CRASH: {str(e)}\n{traceback.format_exc()}" - log_to_file(err) + tb_str = traceback.format_exc() + gui_queue.put({ + "success": False, + "error": f"Child process crashed: {str(e)}\nTraceback:\n{tb_str}" + }) os._exit(1) + def resource_path(relative_path): """