Skip to content

Commit 6f10174

Browse files
Merge pull request #1715 from AllenNeuralDynamics/production_testing
[update main] 2026-02-24 no issues reported during integration testing.
2 parents da8d2e9 + b966871 commit 6f10174

6 files changed

Lines changed: 3859 additions & 109 deletions

File tree

bonsai/Bonsai.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
<Package id="Bonsai.VR" version="0.6.0" />
5151
<Package id="Bonsai.Windows.Input" version="2.7.0" />
5252
<Package id="BonVision" version="0.11.0" />
53+
<Package id="CsvHelper" version="33.1.0" />
5354
<Package id="Harp.AnalogInput" version="0.2.0" />
5455
<Package id="Harp.Behavior" version="0.1.0" />
5556
<Package id="Harp.LoadCells" version="0.2.0" />
@@ -65,6 +66,9 @@
6566
<Package id="jacobslusser.ScintillaNET" version="3.6.3" />
6667
<Package id="Markdig" version="0.18.1" />
6768
<Package id="MathNet.Numerics" version="4.15.0" />
69+
<Package id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" />
70+
<Package id="Microsoft.Bcl.HashCode" version="1.1.1" />
71+
<Package id="Microsoft.CSharp" version="4.7.0" />
6872
<Package id="Microsoft.Web.WebView2" version="1.0.1823.32" />
6973
<Package id="Newtonsoft.Json" version="13.0.3" />
7074
<Package id="openal.redist" version="2.0.7" />
@@ -82,6 +86,7 @@
8286
<Package id="System.Memory" version="4.6.0" />
8387
<Package id="System.Numerics.Vectors" version="4.6.0" />
8488
<Package id="System.Runtime.CompilerServices.Unsafe" version="6.1.0" />
89+
<Package id="System.Threading.Tasks.Extensions" version="4.5.4" />
8590
<Package id="YamlDotNet" version="16.3.0" />
8691
<Package id="ZedGraph" version="5.1.7" />
8792
</Packages>
@@ -187,6 +192,7 @@
187192
<AssemblyLocation assemblyName="Bonsai.VR" processorArchitecture="MSIL" location="Packages\Bonsai.VR.0.6.0\lib\net45\Bonsai.VR.dll" />
188193
<AssemblyLocation assemblyName="Bonsai.Windows.Input" processorArchitecture="MSIL" location="Packages\Bonsai.Windows.Input.2.7.0\lib\net462\Bonsai.Windows.Input.dll" />
189194
<AssemblyLocation assemblyName="BonVision" processorArchitecture="MSIL" location="Packages\BonVision.0.11.0\lib\net462\BonVision.dll" />
195+
<AssemblyLocation assemblyName="CsvHelper" processorArchitecture="MSIL" location="Packages\CsvHelper.33.1.0\lib\net48\CsvHelper.dll" />
190196
<AssemblyLocation assemblyName="Harp.AnalogInput" processorArchitecture="MSIL" location="Packages\Harp.AnalogInput.0.2.0\lib\net462\Harp.AnalogInput.dll" />
191197
<AssemblyLocation assemblyName="Harp.Behavior" processorArchitecture="MSIL" location="Packages\Harp.Behavior.0.1.0\lib\net462\Harp.Behavior.dll" />
192198
<AssemblyLocation assemblyName="Harp.LoadCells" processorArchitecture="MSIL" location="Packages\Harp.LoadCells.0.2.0\lib\net462\Harp.LoadCells.dll" />
@@ -203,6 +209,8 @@
203209
<AssemblyLocation assemblyName="IronPython.Wpf" processorArchitecture="MSIL" location="Packages\IronPython.2.7.5\lib\Net45\IronPython.Wpf.dll" />
204210
<AssemblyLocation assemblyName="Markdig" processorArchitecture="MSIL" location="Packages\Markdig.0.18.1\lib\net40\Markdig.dll" />
205211
<AssemblyLocation assemblyName="MathNet.Numerics" processorArchitecture="MSIL" location="Packages\MathNet.Numerics.4.15.0\lib\net461\MathNet.Numerics.dll" />
212+
<AssemblyLocation assemblyName="Microsoft.Bcl.AsyncInterfaces" processorArchitecture="MSIL" location="Packages\Microsoft.Bcl.AsyncInterfaces.8.0.0\lib\net462\Microsoft.Bcl.AsyncInterfaces.dll" />
213+
<AssemblyLocation assemblyName="Microsoft.Bcl.HashCode" processorArchitecture="MSIL" location="Packages\Microsoft.Bcl.HashCode.1.1.1\lib\net461\Microsoft.Bcl.HashCode.dll" />
206214
<AssemblyLocation assemblyName="Microsoft.Dynamic" processorArchitecture="MSIL" location="Packages\IronPython.2.7.5\lib\Net45\Microsoft.Dynamic.dll" />
207215
<AssemblyLocation assemblyName="Microsoft.Scripting" processorArchitecture="MSIL" location="Packages\IronPython.2.7.5\lib\Net45\Microsoft.Scripting.dll" />
208216
<AssemblyLocation assemblyName="Microsoft.Scripting.AspNet" processorArchitecture="MSIL" location="Packages\IronPython.2.7.5\lib\Net45\Microsoft.Scripting.AspNet.dll" />
@@ -231,6 +239,7 @@
231239
<AssemblyLocation assemblyName="System.Reactive.Linq" processorArchitecture="MSIL" location="Packages\Rx-Linq.2.2.5\lib\net45\System.Reactive.Linq.dll" />
232240
<AssemblyLocation assemblyName="System.Reactive.PlatformServices" processorArchitecture="MSIL" location="Packages\Rx-PlatformServices.2.2.5\lib\net45\System.Reactive.PlatformServices.dll" />
233241
<AssemblyLocation assemblyName="System.Runtime.CompilerServices.Unsafe" processorArchitecture="MSIL" location="Packages\System.Runtime.CompilerServices.Unsafe.6.1.0\lib\net462\System.Runtime.CompilerServices.Unsafe.dll" />
242+
<AssemblyLocation assemblyName="System.Threading.Tasks.Extensions" processorArchitecture="MSIL" location="Packages\System.Threading.Tasks.Extensions.4.5.4\lib\net461\System.Threading.Tasks.Extensions.dll" />
234243
<AssemblyLocation assemblyName="YamlDotNet" processorArchitecture="MSIL" location="Packages\YamlDotNet.16.3.0\lib\net47\YamlDotNet.dll" />
235244
<AssemblyLocation assemblyName="ZedGraph" processorArchitecture="MSIL" location="Packages\ZedGraph.5.1.7\lib\net35-Client\ZedGraph.dll" />
236245
</AssemblyLocations>

dynamic-foraging-task.sln

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Microsoft Visual Studio Solution File, Format Version 12.00
2+
# Visual Studio Version 17
3+
VisualStudioVersion = 17.5.2.0
4+
MinimumVisualStudioVersion = 10.0.40219.1
5+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{827E0CD3-B72D-47B6-A68D-7590B98EB39B}"
6+
EndProject
7+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{F0A602FC-B6B3-0309-A4D0-A7C9FDC897AA}"
8+
EndProject
9+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Extensions", "src\workflows\Extensions.csproj", "{762F400F-C3D6-8351-269D-93945E524324}"
10+
EndProject
11+
Global
12+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
13+
Debug|Any CPU = Debug|Any CPU
14+
Release|Any CPU = Release|Any CPU
15+
EndGlobalSection
16+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
17+
{762F400F-C3D6-8351-269D-93945E524324}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
18+
{762F400F-C3D6-8351-269D-93945E524324}.Debug|Any CPU.Build.0 = Debug|Any CPU
19+
{762F400F-C3D6-8351-269D-93945E524324}.Release|Any CPU.ActiveCfg = Release|Any CPU
20+
{762F400F-C3D6-8351-269D-93945E524324}.Release|Any CPU.Build.0 = Release|Any CPU
21+
EndGlobalSection
22+
GlobalSection(SolutionProperties) = preSolution
23+
HideSolutionNode = FALSE
24+
EndGlobalSection
25+
GlobalSection(NestedProjects) = preSolution
26+
{F0A602FC-B6B3-0309-A4D0-A7C9FDC897AA} = {827E0CD3-B72D-47B6-A68D-7590B98EB39B}
27+
{762F400F-C3D6-8351-269D-93945E524324} = {F0A602FC-B6B3-0309-A4D0-A7C9FDC897AA}
28+
EndGlobalSection
29+
GlobalSection(ExtensibilityGlobals) = postSolution
30+
SolutionGuid = {2898E1DB-616D-461F-A4F5-2F25E63A2B55}
31+
EndGlobalSection
32+
EndGlobal

src/workflows/Extensions.csproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
<PackageReference Include="Bonsai.Osc" Version="2.7.0" />
1111
<PackageReference Include="Bonsai.DAQmx" Version="0.2.1-alpha1" />
1212
<PackageReference Include="Bonsai.Vision.Design" Version="2.7.0" />
13+
<PackageReference Include="CsvHelper" Version="27.2.1" />
1314
</ItemGroup>
1415

1516
</Project>

src/workflows/Extensions/ParseSettingCsv.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,32 +4,34 @@
44
using System.Collections.Generic;
55
using System.Linq;
66
using System.Reactive.Linq;
7+
using System.IO;
8+
using CsvHelper;
9+
using System.Globalization;
710

811
[Combinator]
9-
[Description("Parses lines, splitting at the first comma.")]
12+
[Description("Parses CSV synchronously.")]
1013
[WorkflowElementCategory(ElementCategory.Transform)]
1114
public class ParseSettingCsv
1215
{
1316
public IObservable<Dictionary<string, string>> Process(IObservable<string> source)
1417
{
1518
return source.Select(value =>
1619
{
17-
// split into lines
18-
var lines = value.Split(new[] { "\r\n", "\n" }, StringSplitOptions.RemoveEmptyEntries);
19-
2020
var settings = new Dictionary<string, string>();
21-
foreach (var line in lines)
21+
22+
using (var reader = new StringReader(value))
23+
using (var csv = new CsvReader(reader, CultureInfo.InvariantCulture))
2224
{
23-
int commaIndex = line.IndexOf(',');
24-
if (commaIndex >= 0) // skip if no comma in line
25+
while (csv.Read())
2526
{
26-
string key = line.Substring(0, commaIndex);
27-
string val = line.Substring(commaIndex + 1);
27+
var key = csv.GetField(0);
28+
var val = csv.GetField(1);
2829
settings[key] = val;
2930
}
3031
}
3132

3233
return settings;
34+
3335
});
3436
}
3537
}

src/workflows/foraging.bonsai

Lines changed: 38 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3156,7 +3156,7 @@
31563156
<harp:VisualIndicators>On</harp:VisualIndicators>
31573157
<harp:Heartbeat>Enabled</harp:Heartbeat>
31583158
<harp:IgnoreErrors>false</harp:IgnoreErrors>
3159-
<harp:PortName>COM6</harp:PortName>
3159+
<harp:PortName>COM8</harp:PortName>
31603160
</Combinator>
31613161
</Expression>
31623162
<Expression xsi:type="rx:PublishSubject">
@@ -3186,7 +3186,7 @@
31863186
<harp:VisualIndicators>On</harp:VisualIndicators>
31873187
<harp:Heartbeat>Enabled</harp:Heartbeat>
31883188
<harp:IgnoreErrors>false</harp:IgnoreErrors>
3189-
<harp:PortName>COM5</harp:PortName>
3189+
<harp:PortName>COM9</harp:PortName>
31903190
</Combinator>
31913191
</Expression>
31923192
<Expression xsi:type="rx:PublishSubject">
@@ -3211,6 +3211,9 @@
32113211
<Value>0</Value>
32123212
</Operand>
32133213
</Expression>
3214+
<Expression xsi:type="rx:PublishSubject">
3215+
<Name>LicketySplitLeftLick</Name>
3216+
</Expression>
32143217
<Expression xsi:type="Combinator">
32153218
<Combinator xsi:type="rx:DistinctUntilChanged" />
32163219
</Expression>
@@ -3260,6 +3263,9 @@
32603263
<Value>0</Value>
32613264
</Operand>
32623265
</Expression>
3266+
<Expression xsi:type="rx:PublishSubject">
3267+
<Name>LicketySplitRightLick</Name>
3268+
</Expression>
32633269
<Expression xsi:type="Combinator">
32643270
<Combinator xsi:type="rx:DistinctUntilChanged" />
32653271
</Expression>
@@ -3311,7 +3317,7 @@
33113317
<Edge From="10" To="11" Label="Source1" />
33123318
<Edge From="12" To="13" Label="Source1" />
33133319
<Edge From="13" To="14" Label="Source1" />
3314-
<Edge From="13" To="19" Label="Source2" />
3320+
<Edge From="13" To="20" Label="Source2" />
33153321
<Edge From="14" To="15" Label="Source1" />
33163322
<Edge From="15" To="16" Label="Source1" />
33173323
<Edge From="16" To="17" Label="Source1" />
@@ -3320,21 +3326,23 @@
33203326
<Edge From="19" To="20" Label="Source1" />
33213327
<Edge From="20" To="21" Label="Source1" />
33223328
<Edge From="21" To="22" Label="Source1" />
3323-
<Edge From="22" To="34" Label="Source1" />
3324-
<Edge From="23" To="24" Label="Source1" />
3329+
<Edge From="22" To="23" Label="Source1" />
3330+
<Edge From="23" To="36" Label="Source1" />
33253331
<Edge From="24" To="25" Label="Source1" />
3326-
<Edge From="24" To="30" Label="Source2" />
33273332
<Edge From="25" To="26" Label="Source1" />
3333+
<Edge From="25" To="32" Label="Source2" />
33283334
<Edge From="26" To="27" Label="Source1" />
33293335
<Edge From="27" To="28" Label="Source1" />
33303336
<Edge From="28" To="29" Label="Source1" />
33313337
<Edge From="29" To="30" Label="Source1" />
33323338
<Edge From="30" To="31" Label="Source1" />
33333339
<Edge From="31" To="32" Label="Source1" />
33343340
<Edge From="32" To="33" Label="Source1" />
3335-
<Edge From="33" To="34" Label="Source2" />
3341+
<Edge From="33" To="34" Label="Source1" />
33363342
<Edge From="34" To="35" Label="Source1" />
3337-
<Edge From="35" To="36" Label="Source1" />
3343+
<Edge From="35" To="36" Label="Source2" />
3344+
<Edge From="36" To="37" Label="Source1" />
3345+
<Edge From="37" To="38" Label="Source1" />
33383346
</Edges>
33393347
</Workflow>
33403348
</Expression>
@@ -9493,6 +9501,12 @@
94939501
<Expression xsi:type="SubscribeSubject">
94949502
<Name>LeftLick</Name>
94959503
</Expression>
9504+
<Expression xsi:type="SubscribeSubject">
9505+
<Name>LicketySplitLeftLick</Name>
9506+
</Expression>
9507+
<Expression xsi:type="Combinator">
9508+
<Combinator xsi:type="rx:Merge" />
9509+
</Expression>
94969510
<Expression xsi:type="viz:RollingGraphBuilder">
94979511
<viz:SymbolType>None</viz:SymbolType>
94989512
<viz:LineWidth>1</viz:LineWidth>
@@ -9504,6 +9518,12 @@
95049518
<Expression xsi:type="SubscribeSubject">
95059519
<Name>RightLick</Name>
95069520
</Expression>
9521+
<Expression xsi:type="SubscribeSubject">
9522+
<Name>LicketySplitRightLick</Name>
9523+
</Expression>
9524+
<Expression xsi:type="Combinator">
9525+
<Combinator xsi:type="rx:Merge" />
9526+
</Expression>
95079527
<Expression xsi:type="viz:RollingGraphBuilder">
95089528
<viz:SymbolType>None</viz:SymbolType>
95099529
<viz:LineWidth>1</viz:LineWidth>
@@ -9530,13 +9550,17 @@
95309550
<Edge From="1" To="2" Label="Source1" />
95319551
<Edge From="2" To="3" Label="Source1" />
95329552
<Edge From="3" To="4" Label="Source1" />
9533-
<Edge From="4" To="11" Label="Source1" />
9534-
<Edge From="5" To="6" Label="Source1" />
9535-
<Edge From="6" To="7" Label="Source1" />
9536-
<Edge From="7" To="11" Label="Source2" />
9553+
<Edge From="4" To="15" Label="Source1" />
9554+
<Edge From="5" To="7" Label="Source1" />
9555+
<Edge From="6" To="7" Label="Source2" />
9556+
<Edge From="7" To="8" Label="Source1" />
95379557
<Edge From="8" To="9" Label="Source1" />
9538-
<Edge From="9" To="10" Label="Source1" />
9539-
<Edge From="10" To="11" Label="Source3" />
9558+
<Edge From="9" To="15" Label="Source2" />
9559+
<Edge From="10" To="12" Label="Source1" />
9560+
<Edge From="11" To="12" Label="Source2" />
9561+
<Edge From="12" To="13" Label="Source1" />
9562+
<Edge From="13" To="14" Label="Source1" />
9563+
<Edge From="14" To="15" Label="Source3" />
95409564
</Edges>
95419565
</Workflow>
95429566
</Expression>

0 commit comments

Comments
 (0)