Skip to content

Commit 2902712

Browse files
committed
Small bug fixes in data contract
1 parent 0920fcd commit 2902712

5 files changed

Lines changed: 138 additions & 85 deletions

File tree

src/Extensions/Logging.bonsai

Lines changed: 123 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
xmlns:p6="clr-namespace:AllenNeuralDynamics.WhiteRabbit;assembly=AllenNeuralDynamics.WhiteRabbit"
1414
xmlns:p7="clr-namespace:Harp.AnalogInput;assembly=Harp.AnalogInput"
1515
xmlns:p8="clr-namespace:AllenNeuralDynamics.EnvironmentSensor;assembly=AllenNeuralDynamics.EnvironmentSensor"
16-
xmlns:p9="clr-namespace:AllenNeuralDynamics.HarpUtils;assembly=AllenNeuralDynamics.HarpUtils"
1716
xmlns:harp="clr-namespace:Bonsai.Harp;assembly=Bonsai.Harp"
17+
xmlns:p9="clr-namespace:AllenNeuralDynamics.HarpUtils;assembly=AllenNeuralDynamics.HarpUtils"
1818
xmlns:p10="clr-namespace:AllenNeuralDynamics.VersionControl;assembly=AllenNeuralDynamics.VersionControl"
1919
xmlns:p11="clr-namespace:;assembly=Extensions"
2020
xmlns:gl="clr-namespace:Bonsai.Shaders;assembly=Bonsai.Shaders"
@@ -419,6 +419,12 @@
419419
<Expression xsi:type="SubscribeSubject">
420420
<Name>HarpBehaviorCommands</Name>
421421
</Expression>
422+
<Expression xsi:type="Combinator">
423+
<Combinator xsi:type="harp:FilterMessageType">
424+
<harp:FilterType>Include</harp:FilterType>
425+
<harp:MessageType>Write</harp:MessageType>
426+
</Combinator>
427+
</Expression>
422428
<Expression xsi:type="SubscribeSubject">
423429
<Name>HarpTimestampSource</Name>
424430
</Expression>
@@ -455,6 +461,12 @@
455461
<Expression xsi:type="SubscribeSubject">
456462
<Name>StepperDriverCommands</Name>
457463
</Expression>
464+
<Expression xsi:type="Combinator">
465+
<Combinator xsi:type="harp:FilterMessageType">
466+
<harp:FilterType>Include</harp:FilterType>
467+
<harp:MessageType>Write</harp:MessageType>
468+
</Combinator>
469+
</Expression>
458470
<Expression xsi:type="SubscribeSubject">
459471
<Name>HarpTimestampSource</Name>
460472
</Expression>
@@ -593,6 +605,12 @@
593605
<Expression xsi:type="SubscribeSubject">
594606
<Name>HarpLickometerCommands</Name>
595607
</Expression>
608+
<Expression xsi:type="Combinator">
609+
<Combinator xsi:type="harp:FilterMessageType">
610+
<harp:FilterType>Include</harp:FilterType>
611+
<harp:MessageType>Write</harp:MessageType>
612+
</Combinator>
613+
</Expression>
596614
<Expression xsi:type="SubscribeSubject">
597615
<Name>HarpTimestampSource</Name>
598616
</Expression>
@@ -629,6 +647,12 @@
629647
<Expression xsi:type="SubscribeSubject">
630648
<Name>HarpTreadmillCommands</Name>
631649
</Expression>
650+
<Expression xsi:type="Combinator">
651+
<Combinator xsi:type="harp:FilterMessageType">
652+
<harp:FilterType>Include</harp:FilterType>
653+
<harp:MessageType>Write</harp:MessageType>
654+
</Combinator>
655+
</Expression>
632656
<Expression xsi:type="SubscribeSubject">
633657
<Name>HarpTimestampSource</Name>
634658
</Expression>
@@ -665,6 +689,12 @@
665689
<Expression xsi:type="SubscribeSubject">
666690
<Name>HarpWhiteRabbitCommands</Name>
667691
</Expression>
692+
<Expression xsi:type="Combinator">
693+
<Combinator xsi:type="harp:FilterMessageType">
694+
<harp:FilterType>Include</harp:FilterType>
695+
<harp:MessageType>Write</harp:MessageType>
696+
</Combinator>
697+
</Expression>
668698
<Expression xsi:type="SubscribeSubject">
669699
<Name>HarpTimestampSource</Name>
670700
</Expression>
@@ -701,6 +731,12 @@
701731
<Expression xsi:type="SubscribeSubject">
702732
<Name>HarpSniffDetectorCommands</Name>
703733
</Expression>
734+
<Expression xsi:type="Combinator">
735+
<Combinator xsi:type="harp:FilterMessageType">
736+
<harp:FilterType>Include</harp:FilterType>
737+
<harp:MessageType>Write</harp:MessageType>
738+
</Combinator>
739+
</Expression>
704740
<Expression xsi:type="SubscribeSubject">
705741
<Name>HarpTimestampSource</Name>
706742
</Expression>
@@ -747,6 +783,12 @@
747783
<Expression xsi:type="SubscribeSubject">
748784
<Name>HarpAnalogInputCommands</Name>
749785
</Expression>
786+
<Expression xsi:type="Combinator">
787+
<Combinator xsi:type="harp:FilterMessageType">
788+
<harp:FilterType>Include</harp:FilterType>
789+
<harp:MessageType>Write</harp:MessageType>
790+
</Combinator>
791+
</Expression>
750792
<Expression xsi:type="SubscribeSubject">
751793
<Name>HarpTimestampSource</Name>
752794
</Expression>
@@ -793,6 +835,12 @@
793835
<Expression xsi:type="SubscribeSubject">
794836
<Name>HarpEnvironmentSensorCommands</Name>
795837
</Expression>
838+
<Expression xsi:type="Combinator">
839+
<Combinator xsi:type="harp:FilterMessageType">
840+
<harp:FilterType>Include</harp:FilterType>
841+
<harp:MessageType>Write</harp:MessageType>
842+
</Combinator>
843+
</Expression>
796844
<Expression xsi:type="SubscribeSubject">
797845
<Name>HarpTimestampSource</Name>
798846
</Expression>
@@ -838,84 +886,92 @@
838886
</Expression>
839887
</Nodes>
840888
<Edges>
841-
<Edge From="0" To="2" Label="Source1" />
842-
<Edge From="1" To="2" Label="Source2" />
843-
<Edge From="2" To="3" Label="Source1" />
844-
<Edge From="3" To="8" Label="Source1" />
845-
<Edge From="4" To="5" Label="Source1" />
846-
<Edge From="5" To="8" Label="Source2" />
847-
<Edge From="6" To="7" Label="Source1" />
848-
<Edge From="7" To="8" Label="Source3" />
849-
<Edge From="9" To="11" Label="Source1" />
850-
<Edge From="10" To="11" Label="Source2" />
851-
<Edge From="11" To="12" Label="Source1" />
852-
<Edge From="12" To="17" Label="Source1" />
889+
<Edge From="0" To="1" Label="Source1" />
890+
<Edge From="1" To="3" Label="Source1" />
891+
<Edge From="2" To="3" Label="Source2" />
892+
<Edge From="3" To="4" Label="Source1" />
893+
<Edge From="4" To="9" Label="Source1" />
894+
<Edge From="5" To="6" Label="Source1" />
895+
<Edge From="6" To="9" Label="Source2" />
896+
<Edge From="7" To="8" Label="Source1" />
897+
<Edge From="8" To="9" Label="Source3" />
898+
<Edge From="10" To="11" Label="Source1" />
899+
<Edge From="11" To="13" Label="Source1" />
900+
<Edge From="12" To="13" Label="Source2" />
853901
<Edge From="13" To="14" Label="Source1" />
854-
<Edge From="14" To="17" Label="Source2" />
902+
<Edge From="14" To="19" Label="Source1" />
855903
<Edge From="15" To="16" Label="Source1" />
856-
<Edge From="16" To="17" Label="Source3" />
857-
<Edge From="18" To="19" Label="Source1" />
858-
<Edge From="19" To="20" Label="Source1" />
859-
<Edge From="21" To="23" Label="Source1" />
860-
<Edge From="22" To="23" Label="Source2" />
904+
<Edge From="16" To="19" Label="Source2" />
905+
<Edge From="17" To="18" Label="Source1" />
906+
<Edge From="18" To="19" Label="Source3" />
907+
<Edge From="20" To="21" Label="Source1" />
908+
<Edge From="21" To="22" Label="Source1" />
861909
<Edge From="23" To="24" Label="Source1" />
862-
<Edge From="24" To="29" Label="Source1" />
863-
<Edge From="25" To="26" Label="Source1" />
864-
<Edge From="26" To="29" Label="Source2" />
865-
<Edge From="27" To="28" Label="Source1" />
866-
<Edge From="28" To="29" Label="Source3" />
867-
<Edge From="30" To="32" Label="Source1" />
868-
<Edge From="31" To="32" Label="Source2" />
869-
<Edge From="32" To="33" Label="Source1" />
870-
<Edge From="33" To="38" Label="Source1" />
871-
<Edge From="34" To="35" Label="Source1" />
872-
<Edge From="35" To="38" Label="Source2" />
910+
<Edge From="24" To="26" Label="Source1" />
911+
<Edge From="25" To="26" Label="Source2" />
912+
<Edge From="26" To="27" Label="Source1" />
913+
<Edge From="27" To="32" Label="Source1" />
914+
<Edge From="28" To="29" Label="Source1" />
915+
<Edge From="29" To="32" Label="Source2" />
916+
<Edge From="30" To="31" Label="Source1" />
917+
<Edge From="31" To="32" Label="Source3" />
918+
<Edge From="33" To="34" Label="Source1" />
919+
<Edge From="34" To="36" Label="Source1" />
920+
<Edge From="35" To="36" Label="Source2" />
873921
<Edge From="36" To="37" Label="Source1" />
874-
<Edge From="37" To="38" Label="Source3" />
875-
<Edge From="39" To="41" Label="Source1" />
876-
<Edge From="40" To="41" Label="Source2" />
877-
<Edge From="41" To="42" Label="Source1" />
878-
<Edge From="42" To="47" Label="Source1" />
922+
<Edge From="37" To="42" Label="Source1" />
923+
<Edge From="38" To="39" Label="Source1" />
924+
<Edge From="39" To="42" Label="Source2" />
925+
<Edge From="40" To="41" Label="Source1" />
926+
<Edge From="41" To="42" Label="Source3" />
879927
<Edge From="43" To="44" Label="Source1" />
880-
<Edge From="44" To="47" Label="Source2" />
881-
<Edge From="45" To="46" Label="Source1" />
882-
<Edge From="46" To="47" Label="Source3" />
883-
<Edge From="48" To="50" Label="Source1" />
884-
<Edge From="49" To="50" Label="Source2" />
928+
<Edge From="44" To="46" Label="Source1" />
929+
<Edge From="45" To="46" Label="Source2" />
930+
<Edge From="46" To="47" Label="Source1" />
931+
<Edge From="47" To="52" Label="Source1" />
932+
<Edge From="48" To="49" Label="Source1" />
933+
<Edge From="49" To="52" Label="Source2" />
885934
<Edge From="50" To="51" Label="Source1" />
886-
<Edge From="51" To="56" Label="Source1" />
887-
<Edge From="52" To="53" Label="Source1" />
888-
<Edge From="53" To="56" Label="Source2" />
889-
<Edge From="54" To="55" Label="Source1" />
890-
<Edge From="55" To="56" Label="Source3" />
891-
<Edge From="56" To="60" Label="Source1" />
892-
<Edge From="57" To="58" Label="Source1" />
935+
<Edge From="51" To="52" Label="Source3" />
936+
<Edge From="53" To="54" Label="Source1" />
937+
<Edge From="54" To="56" Label="Source1" />
938+
<Edge From="55" To="56" Label="Source2" />
939+
<Edge From="56" To="57" Label="Source1" />
940+
<Edge From="57" To="62" Label="Source1" />
893941
<Edge From="58" To="59" Label="Source1" />
894-
<Edge From="59" To="60" Label="Source2" />
895-
<Edge From="61" To="63" Label="Source1" />
896-
<Edge From="62" To="63" Label="Source2" />
942+
<Edge From="59" To="62" Label="Source2" />
943+
<Edge From="60" To="61" Label="Source1" />
944+
<Edge From="61" To="62" Label="Source3" />
945+
<Edge From="62" To="66" Label="Source1" />
897946
<Edge From="63" To="64" Label="Source1" />
898-
<Edge From="64" To="69" Label="Source1" />
899-
<Edge From="65" To="66" Label="Source1" />
900-
<Edge From="66" To="69" Label="Source2" />
947+
<Edge From="64" To="65" Label="Source1" />
948+
<Edge From="65" To="66" Label="Source2" />
901949
<Edge From="67" To="68" Label="Source1" />
902-
<Edge From="68" To="69" Label="Source3" />
903-
<Edge From="69" To="73" Label="Source1" />
950+
<Edge From="68" To="70" Label="Source1" />
951+
<Edge From="69" To="70" Label="Source2" />
904952
<Edge From="70" To="71" Label="Source1" />
905-
<Edge From="71" To="72" Label="Source1" />
906-
<Edge From="72" To="73" Label="Source2" />
907-
<Edge From="74" To="76" Label="Source1" />
908-
<Edge From="75" To="76" Label="Source2" />
909-
<Edge From="76" To="77" Label="Source1" />
910-
<Edge From="77" To="82" Label="Source1" />
953+
<Edge From="71" To="76" Label="Source1" />
954+
<Edge From="72" To="73" Label="Source1" />
955+
<Edge From="73" To="76" Label="Source2" />
956+
<Edge From="74" To="75" Label="Source1" />
957+
<Edge From="75" To="76" Label="Source3" />
958+
<Edge From="76" To="80" Label="Source1" />
959+
<Edge From="77" To="78" Label="Source1" />
911960
<Edge From="78" To="79" Label="Source1" />
912-
<Edge From="79" To="82" Label="Source2" />
913-
<Edge From="80" To="81" Label="Source1" />
914-
<Edge From="81" To="82" Label="Source3" />
915-
<Edge From="82" To="86" Label="Source1" />
916-
<Edge From="83" To="84" Label="Source1" />
961+
<Edge From="79" To="80" Label="Source2" />
962+
<Edge From="81" To="82" Label="Source1" />
963+
<Edge From="82" To="84" Label="Source1" />
964+
<Edge From="83" To="84" Label="Source2" />
917965
<Edge From="84" To="85" Label="Source1" />
918-
<Edge From="85" To="86" Label="Source2" />
966+
<Edge From="85" To="90" Label="Source1" />
967+
<Edge From="86" To="87" Label="Source1" />
968+
<Edge From="87" To="90" Label="Source2" />
969+
<Edge From="88" To="89" Label="Source1" />
970+
<Edge From="89" To="90" Label="Source3" />
971+
<Edge From="90" To="94" Label="Source1" />
972+
<Edge From="91" To="92" Label="Source1" />
973+
<Edge From="92" To="93" Label="Source1" />
974+
<Edge From="93" To="94" Label="Source2" />
919975
</Edges>
920976
</Workflow>
921977
</Expression>

src/packages/aind_behavior_vr_foraging/pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Changelog = "https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging/rel
2828

2929
[project.optional-dependencies]
3030

31-
data = ["contraqctor>=0.5.3, <0.6.0"]
31+
data = ["contraqctor>=0.5.5, <0.6.0"]
3232

3333
mappers = [
3434
"aind-clabe[aind-services]>=0.10.4",

src/packages/aind_behavior_vr_foraging/src/aind_behavior_vr_foraging/data_contract/v1.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,14 @@ def dataset(
374374
name="Annotations",
375375
description="An event emitted whenever an annotation is made during the session.",
376376
reader_params=SoftwareEvents.make_params(
377-
root_path / "behavior/Annotations/Annotations.json"
377+
root_path / "behavior/SoftwareEvents/Annotations.json"
378+
),
379+
),
380+
SoftwareEvents(
381+
name="EndSession",
382+
description="A file that determines the end of the session. If the file is empty, the session is still running or it was not closed properly.",
383+
reader_params=SoftwareEvents.make_params(
384+
root_path / "behavior/SoftwareEvents/EndSession.json"
378385
),
379386
),
380387
],
@@ -426,13 +433,6 @@ def dataset(
426433
path=root_path / "behavior/Logs/.launcher/launcher.log",
427434
),
428435
),
429-
SoftwareEvents(
430-
name="EndSession",
431-
description="A file that determines the end of the session. If the file is empty, the session is still running or it was not closed properly.",
432-
reader_params=SoftwareEvents.make_params(
433-
root_path / "behavior/SoftwareEvents/EndSession.json"
434-
),
435-
),
436436
],
437437
),
438438
DataStreamCollection(

0 commit comments

Comments
 (0)