From 62a6bdfa99f77143cad20f17cb29ad3bc46bc094 Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Wed, 6 Nov 2024 17:54:55 -0800 Subject: [PATCH 1/2] document stable time and check interval --- docs/app/agents/Agent.mdx | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/docs/app/agents/Agent.mdx b/docs/app/agents/Agent.mdx index f9899fa2..3f53abd8 100644 --- a/docs/app/agents/Agent.mdx +++ b/docs/app/agents/Agent.mdx @@ -122,8 +122,6 @@ The _Configuration_ input specifies the action performed by the Agent, with opti A Connection watches a directory (and associated subdirectories) for new files and updates to existing files. The Flow configured with the Agent is triggered when all expected files are found. -The _input_path_ variable, configured for each Connection [at installation](./AgentInstall#windows-installation), specifies the directory to watch. - #### Input Parameters - `Flow Name`: The flow to run upon observing new files matching the specified pattern. @@ -141,6 +139,16 @@ The _input_path_ variable, configured for each Connection [at installation](./Ag - `Image`: An image to associate with agent in the Ganymede UI. - `Auto deploy code and configuration changes to Live Connections`: If checked, updates to Agent code will be reflected on current Connections. +#### Reserved Variables + +Reserved variables are used to configure Connection behavior. These can be set [at installation](./AgentInstall#windows-installation) or in the Connections panel post-installation. + +- `input_path`: specifies the directory to watch. +- `check_interval`: for Agents v5.1.28+, specifies frequency (in seconds) with which a Connection will poll the local directory for new files. If left blank, the default value is 5 seconds. +- `stable_time`: for Agents v5.1.28+, specifies the time (in seconds) that a file must remain unchanged before being considered stable. If left blank, the default value is 5 seconds. + +#### User-Defined Code + The user-defined code will be generated to map those file patterns to parameters. Three functions may require modification during configuration: - `get_param_mapping`: This function is called whenever a file is added or modified in the watch directory. Modify this function to specify the files you want to look for prior to triggering a flow. @@ -373,8 +381,6 @@ Multiple flow cytometers are used to observe cell populations for a related set A Connection that monitors Flow file outputs, saving them to local directories as specified by the Agent logic. -The _output_path_ variable, configured for each Connection [at installation](./AgentInstall#windows-installation), specifies the directory to store files to. - #### Input Parameters - `Flow Name`: The flow from which to download output files. This will autopopulate the glob pattern matching field correspondingly. @@ -393,6 +399,12 @@ The _output_path_ variable, configured for each Connection [at installation](./A Additional examples can be found on the [Agent Templates page](./AgentTemplates.mdx#watch-for-flow-outputs-then-save-locally) +#### Reserved Variables + +For this configuration, the following reserved variables are available: + +- `output_path`: specifies the directory to store files to. + #### Example use case Instructions for lab execution are generated in Ganymede Cloud and downloaded to the instrument PC for execution. From a97d879b377b3c59d2f7edfd80020cdab7947413 Mon Sep 17 00:00:00 2001 From: Benson Lee Date: Tue, 12 Nov 2024 10:48:15 -0800 Subject: [PATCH 2/2] upd --- docs/app/files/Tags.mdx | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/app/files/Tags.mdx b/docs/app/files/Tags.mdx index 4e566271..a4bd9ad3 100644 --- a/docs/app/files/Tags.mdx +++ b/docs/app/files/Tags.mdx @@ -118,7 +118,7 @@ You can also tag files programmatically using the `add_file_tag_to_fileparam` fu - _param_ **url**: str - A URL to associate with the tag, if applicable. ```python -from ganymede_sdk.agent import ( +from agent_sdk import ( FileParam, FileWatcherResult, MultiFileParam, @@ -126,6 +126,15 @@ from ganymede_sdk.agent import ( add_file_tag_to_fileparam, ) +# pre v5.0 +# from ganymede_sdk.agent import ( +# FileParam, +# FileWatcherResult, +# MultiFileParam, +# TriggerFlowParams, +# add_file_tag_to_fileparam, +# ) + def execute(flow_params_fw: FileWatcherResult, **kwargs) -> TriggerFlowParams: """ Called when all glob patterns specified by get_param_mapping have been matched. @@ -161,7 +170,7 @@ Note that Virtualization stores a json file in the `C:/Program Files/Ganymede/` import json from pathlib import Path -from ganymede_sdk.agent import FileWatcherResult, NoOpFileTagParams, add_file_tag_to_fileparam +from agent_sdk import FileWatcherResult, NoOpFileTagParams, add_file_tag_to_fileparam from ganymede_sdk.file_tag import get_file_tags SESSION_JSON_PATH = Path("C:/Program Files/Ganymede/session.json")