Skip to content

Commit

Permalink
Tidy up naming in main scripts; prep for launch #143
Browse files Browse the repository at this point in the history
  • Loading branch information
CameronBodine committed Jan 22, 2025
1 parent 8d079b6 commit dcc85a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
9 changes: 6 additions & 3 deletions pingmapper/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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':
Expand Down
8 changes: 4 additions & 4 deletions pingmapper/gui_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -728,4 +728,4 @@ def gui_batch(batch: bool):
batch = False
else:
batch = sys.argv[1]
gui_batch(batch)
gui(batch)

0 comments on commit dcc85a5

Please sign in to comment.