From e5ff0e4d7c863105d0c80aad7076111f80bb41a7 Mon Sep 17 00:00:00 2001 From: ctuguinay Date: Thu, 25 Jun 2026 09:27:59 +0800 Subject: [PATCH] small file upload and raw2sv update --- README.md | 4 ++-- src/echodataflow/flows/flows_acoustics.py | 8 ++++++-- src/echodataflow/flows/flows_helper.py | 2 +- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index fef6dac..f1649a1 100644 --- a/README.md +++ b/README.md @@ -50,7 +50,7 @@ Echodataflow streamlines echosounder data processing by combining [Prefect](http prefect worker start --pool "local" ``` -3. Download the recipes from the [echodataflow-recipes repository](https://github.com/echostack-org/echodataflow-recipes) by clonining it to your computer: +3. In a new terminal, download the recipes from the [echodataflow-recipes repository](https://github.com/echostack-org/echodataflow-recipes) by clonining it to your computer: ``` cd REPO_DIRECTORY # switch to where you want the recipes repo to sit git clone https://github.com/echostack-org/echodataflow-recipes.git @@ -106,7 +106,7 @@ to `.service` `ExecStart` usage, with no wrapper shell script required. 1. Copy and customize the templates for your user: ```shell mkdir -p ~/.config/echodataflow ~/Library/LaunchAgents ~/.local/var/log/echodataflow - cp src/echodataflow/services/services.env.example ~/.config/echodataflow/services.env + cp src/echodataflow/services/services.env.example_local ~/.config/echodataflow/services.env cp src/echodataflow/services/deploy_prefect_server.launchd.plist ~/Library/LaunchAgents/org.echodataflow.prefect-server.plist cp src/echodataflow/services/deploy_prefect_worker.launchd.plist ~/Library/LaunchAgents/org.echodataflow.prefect-worker.plist ``` diff --git a/src/echodataflow/flows/flows_acoustics.py b/src/echodataflow/flows/flows_acoustics.py index b2ad040..f28ebfe 100644 --- a/src/echodataflow/flows/flows_acoustics.py +++ b/src/echodataflow/flows/flows_acoustics.py @@ -122,7 +122,8 @@ def flow_raw2Sv( waveform_mode: str = "CW", depth_offset: float = 9.5, sonar_model: str = "EK80", - nmea_sentence: str = "GGA", + datagram_type: str|None = None, + nmea_sentence: str|None = None, filename_pattern: str = "*.raw", path_main: str = "", path_raw: str = "", @@ -224,6 +225,7 @@ async def cancel_run(): waveform_mode=waveform_mode, depth_offset=depth_offset, sonar_model=sonar_model, + datagram_type=datagram_type, nmea_sentence=nmea_sentence, ) @@ -302,7 +304,8 @@ def task_raw2Sv( waveform_mode: str = "CW", depth_offset: float = 9.5, # in meters sonar_model: str = "EK80", - nmea_sentence: str = "GGA", + datagram_type: str|None = None, + nmea_sentence: str|None = None, path_Sv_zarr: str = "PATH_TO_STORE_SV_ZARR", ): """ @@ -328,6 +331,7 @@ def task_raw2Sv( ds_Sv = ep.consolidate.add_location( ds=ds_Sv, echodata=ed, + datagram_type=datagram_type, nmea_sentence=nmea_sentence, ) diff --git a/src/echodataflow/flows/flows_helper.py b/src/echodataflow/flows/flows_helper.py index f896f3a..cc8be10 100644 --- a/src/echodataflow/flows/flows_helper.py +++ b/src/echodataflow/flows/flows_helper.py @@ -57,7 +57,7 @@ def flow_file_upload( if max_age == -1: command = f"rclone copy -v --no-traverse {src_dir} {dest_dir} --exclude-from {str(exclude_path)}" else: - command = f"rclone copy -v --max-age 2h --no-traverse {src_dir} {dest_dir} --exclude-from {str(exclude_path)}" + command = f"rclone copy -v --max-age {max_age}h --no-traverse {src_dir} {dest_dir} --exclude-from {str(exclude_path)}" print("command:", command) with ShellOperation(commands=[command], working_dir=src_dir) as file_upload_operation: