77from typing import Dict , List , Optional
88
99import pydantic
10- from aind_behavior_services import AindBehaviorRigModel , AindBehaviorSessionModel , AindBehaviorTaskLogicModel
10+ from aind_behavior_services import Rig , Session , Task
1111
1212from ..constants import TMP_DIR
1313from ._base import Command , CommandResult , ExecutableApp , identity_parser
@@ -170,7 +170,7 @@ class AindBehaviorServicesBonsaiApp(BonsaiApp):
170170 Specialized Bonsai application for AIND behavior services integration.
171171
172172 This class extends the base BonsaiApp to provide specific functionality for
173- AIND behavior experiments, including automatic configuration of task logic ,
173+ AIND behavior experiments, including automatic configuration of task,
174174 session, and rig paths for the Bonsai workflow.
175175
176176 Example:
@@ -186,15 +186,15 @@ def __init__(
186186 workflow : os .PathLike ,
187187 * ,
188188 temp_directory : Optional [os .PathLike ] = None ,
189- rig : Optional [AindBehaviorRigModel ] = None ,
190- session : Optional [AindBehaviorSessionModel ] = None ,
191- task_logic : Optional [AindBehaviorTaskLogicModel ] = None ,
189+ rig : Optional [Rig ] = None ,
190+ session : Optional [Session ] = None ,
191+ task : Optional [Task ] = None ,
192192 ** kwargs ,
193193 ) -> None :
194194 """
195195 Initializes the AIND behavior services Bonsai app with automatic model configuration.
196196
197- Automatically configures RigPath, SessionPath, and TaskLogicPath properties
197+ Automatically configures RigPath, SessionPath, and TaskPath properties
198198 for the Bonsai workflow by saving provided models to temporary files and
199199 passing their paths as externalized properties.
200200
@@ -204,38 +204,38 @@ def __init__(
204204 launcher: The launcher instance for saving temporary models
205205 rig: Optional rig model to configure. Defaults to None
206206 session: Optional session model to configure. Defaults to None
207- task_logic : Optional task logic model to configure. Defaults to None
207+ task : Optional task model to configure. Defaults to None
208208 **kwargs: Additional keyword arguments passed to BonsaiApp (executable,
209209 is_editor_mode, is_start_flag, additional_properties, cwd, timeout,
210210 additional_externalized_properties)
211211
212212 Example:
213213 ```python
214214 from aind_behavior_services import (
215- AindBehaviorRigModel ,
216- AindBehaviorSessionModel ,
217- AindBehaviorTaskLogicModel
215+ Rig ,
216+ Session ,
217+ Task
218218 )
219219
220220 # Create models
221- rig = AindBehaviorRigModel (...)
222- session = AindBehaviorSessionModel (...)
223- task_logic = AindBehaviorTaskLogicModel (...)
221+ rig = Rig (...)
222+ session = Session (...)
223+ task = Task (...)
224224
225225 # Create app with automatic configuration
226226 app = AindBehaviorServicesBonsaiApp(
227227 workflow="behavior_workflow.bonsai",
228228 launcher=my_launcher,
229229 rig=rig,
230230 session=session,
231- task_logic=task_logic
231+ task=task
232232 )
233233 app.run()
234234
235235 # The workflow will receive:
236236 # -p:"RigPath"="/tmp/rig_temp.json"
237237 # -p:"SessionPath"="/tmp/session_temp.json"
238- # -p:"TaskLogicPath "="/tmp/task_logic_temp .json"
238+ # -p:"TaskPath "="/tmp/task_temp .json"
239239 ```
240240 """
241241 self ._temp_directory = Path (temp_directory or TMP_DIR )
@@ -245,10 +245,8 @@ def __init__(
245245 additional_externalized_properties ["RigPath" ] = os .path .abspath (self ._save_temp_model (model = rig ))
246246 if session :
247247 additional_externalized_properties ["SessionPath" ] = os .path .abspath (self ._save_temp_model (model = session ))
248- if task_logic :
249- additional_externalized_properties ["TaskLogicPath" ] = os .path .abspath (
250- self ._save_temp_model (model = task_logic )
251- )
248+ if task :
249+ additional_externalized_properties ["TaskPath" ] = os .path .abspath (self ._save_temp_model (model = task ))
252250 super ().__init__ (
253251 workflow = workflow , additional_externalized_properties = additional_externalized_properties , ** kwargs
254252 )
0 commit comments