From dcc85a5d9e728e95835f00e68d20eea9ebe85a6e Mon Sep 17 00:00:00 2001 From: Cameron Bodine Date: Wed, 22 Jan 2025 14:38:24 -0500 Subject: [PATCH] Tidy up naming in main scripts; prep for launch #143 --- pingmapper/__main__.py | 9 ++++++--- pingmapper/gui_main.py | 8 ++++---- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pingmapper/__main__.py b/pingmapper/__main__.py index 2a7188c..58b5d7d 100644 --- a/pingmapper/__main__.py +++ b/pingmapper/__main__.py @@ -22,14 +22,17 @@ def main(process): # Process single sonar log if process == 'gui': print('\n\nLaunching gui for processing single sonar log...\n\n') + # from pingmapper.gui_main import gui + # gui() from pingmapper.gui_main import gui - gui() + gui(batch=False) + # Batch process sonar logs elif process == 'gui_batch': print('\n\nLaunching gui for batch processing sonar logs...\n\n') - from pingmapper.gui_main_batchDirectory import gui_batch - gui_batch() + from pingmapper.gui_main import gui + gui(batch=True) # Do test on small dataset elif process == 'test': diff --git a/pingmapper/gui_main.py b/pingmapper/gui_main.py index cefccbc..477af51 100644 --- a/pingmapper/gui_main.py +++ b/pingmapper/gui_main.py @@ -16,7 +16,7 @@ from pingmapper.main_mapSubstrate import map_master_func import json -def gui_batch(batch: bool): +def gui(batch: bool): # Get processing script's dir so we can save it to file scriptDir = SCRIPT_DIR @@ -54,7 +54,7 @@ def gui_batch(batch: bool): if batch: text_input = sg.Text('Parent Folder of Recordings to Process') - in_input = sg.In(key='inDir', default_text=default_params['inDir'], size=(80,1)) + in_input = sg.In(key='inDir', size=(80,1)) browse_input = sg.FolderBrowse(initial_folder=(default_params['inDir'])) else: @@ -70,7 +70,7 @@ def gui_batch(batch: bool): ################### # Output parameters text_output = sg.Text('Output Folder') - in_output = sg.In(key='proj', default_text=os.path.dirname(default_params['projDir']), size=(80,1)) + in_output = sg.In(key='proj', size=(80,1)) browse_output = sg.FolderBrowse(initial_folder=os.path.dirname(default_params['projDir'])) # Add to layout @@ -728,4 +728,4 @@ def gui_batch(batch: bool): batch = False else: batch = sys.argv[1] - gui_batch(batch) \ No newline at end of file + gui(batch) \ No newline at end of file