Skip to content

Commit 9da5e4f

Browse files
authored
Merge pull request #435 from AllenNeuralDynamics/dev
Release 0.6.0
2 parents 05a9453 + 5559c9d commit 9da5e4f

File tree

10 files changed

+593
-461
lines changed

10 files changed

+593
-461
lines changed

.github/workflows/vr-foraging-cicd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ jobs:
211211
git config --global user.email "github-actions[bot]@users.noreply.github.com"
212212
git add .
213213
git commit -m "Release v${{ steps.get_version.outputs.version }} [skip ci]"
214-
git tag -a "v${{ steps.get_version.outputs.version }}" -m "Release v${{ steps.get_version.outputs.version }}"
214+
git tag -a "v${{ steps.get_version.outputs.version }}" -m "v${{ steps.get_version.outputs.version }}"
215215
git push origin main
216216
git push origin "v${{ steps.get_version.outputs.version }}"
217217

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.0"]
31+
data = ["contraqctor<0.6.0"]
3232

3333
launcher = [
3434
"aind-clabe[aind-services]>=0.7",

src/DataSchemas/aind_behavior_vr_foraging.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"AindBehaviorSessionModel": {
44
"properties": {
55
"aind_behavior_services_pkg_version": {
6-
"default": "0.12.2",
6+
"default": "0.12.3",
77
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
88
"title": "aind_behavior_services package version",
99
"type": "string"
1010
},
1111
"version": {
12-
"const": "0.12.2",
13-
"default": "0.12.2",
12+
"const": "0.12.3",
13+
"default": "0.12.3",
1414
"title": "Version",
1515
"type": "string"
1616
},
@@ -353,7 +353,7 @@
353353
"AindVrForagingRig": {
354354
"properties": {
355355
"aind_behavior_services_pkg_version": {
356-
"default": "0.12.2",
356+
"default": "0.12.3",
357357
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
358358
"title": "aind_behavior_services package version",
359359
"type": "string"
@@ -611,7 +611,7 @@
611611
"title": "Rng Seed"
612612
},
613613
"aind_behavior_services_pkg_version": {
614-
"default": "0.12.2",
614+
"default": "0.12.3",
615615
"pattern": "^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
616616
"title": "aind_behavior_services package version",
617617
"type": "string"
@@ -4997,8 +4997,18 @@
49974997
"type": "object"
49984998
},
49994999
"TruncationParameters": {
5000-
"description": "Parameters for truncating a distribution to a specified range. Truncation should\nbe applied after sampling and scaling.\n\nUsed to constrain sampled values within minimum and maximum bounds.",
5000+
"description": "Parameters for truncating a distribution to a specified range. Truncation should\nbe applied after sampling and scaling.\n\nThe truncation_mode determines how out-of-bounds values are handled:\n- \"exclude\": Resample until a value within [min, max] is obtained.\nIf after a certain number of attempts no valid value is found, it\nwill use the average of sampled values and pick the closest bound.\n- \"clamp\": Clamp values to the nearest bound within [min, max].\nUsed to constrain sampled values within minimum and maximum bounds.",
50015001
"properties": {
5002+
"truncation_mode": {
5003+
"default": "exclude",
5004+
"description": "Mode of truncation to apply",
5005+
"enum": [
5006+
"exclude",
5007+
"clamp"
5008+
],
5009+
"title": "Truncation Mode",
5010+
"type": "string"
5011+
},
50025012
"min": {
50035013
"default": 0,
50045014
"description": "Minimum value of the sampled distribution",

src/Extensions.csproj

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,25 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net48</TargetFramework>
3+
<!-- <OutputType>Exe</OutputType> -->
4+
<!--<TargetFramework>net8.0-windows</TargetFramework>-->
5+
<TargetFramework>net480</TargetFramework>
46
<UseWindowsForms>true</UseWindowsForms>
5-
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
7+
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
68
</PropertyGroup>
79
<ItemGroup>
810
<PackageReference Include="Bonsai.Core" Version="2.9.0" />
9-
<PackageReference Include="AllenNeuralDynamics.Core.Design" Version="0.3.0" />
11+
<PackageReference Include="AllenNeuralDynamics.Core.Design" Version="0.3.0" />
1012
<PackageReference Include="OpenCV.Net" Version="3.4.2" />
1113
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
12-
<PackageReference Include="Bonsai.Harp" Version="3.5.0" />
14+
<PackageReference Include="Bonsai.Harp" Version="3.5.2" />
1315
<PackageReference Include="MathNet.Numerics" Version="4.15.0" />
1416
<PackageReference Include="Harp.Olfactometer" Version="0.1.0-build231127" />
1517
<PackageReference Include="AllenNeuralDynamics.AindManipulator" Version="0.1.6" />
16-
<PackageReference Include="Hexa.NET.ImGui" Version="2.2.8.4" />
17-
<PackageReference Include="Hexa.NET.ImPlot" Version="2.2.8.4" />
18+
<PackageReference Include="Hexa.NET.ImGui" Version="2.2.9" />
19+
<PackageReference Include="Hexa.NET.ImPlot" Version="2.2.9" />
1820
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" />
1921
<PackageReference Include="Bonsai.Dsp.Design" Version="2.9.0" />
20-
<PackageReference Include="Hexa.NET.ImGui.Backends" Version="1.0.17" />
22+
<PackageReference Include="Hexa.NET.ImGui.Backends" Version="1.0.17.4" />
2123
<PackageReference Include="AllenNeuralDynamics.AindBehaviorServices" Version="0.12.0" />
2224
</ItemGroup>
2325
</Project>

src/Extensions/AddRewardSite.bonsai

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
<?xml version="1.0" encoding="utf-8"?>
2-
<WorkflowBuilder Version="2.8.2"
2+
<WorkflowBuilder Version="2.9.0"
33
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
44
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
55
xmlns:p1="clr-namespace:AindVrForagingDataSchema;assembly=Extensions"
66
xmlns:sys="clr-namespace:System;assembly=mscorlib"
77
xmlns:num="clr-namespace:Bonsai.Numerics;assembly=Bonsai.Numerics"
8+
xmlns:p2="clr-namespace:;assembly=Extensions"
89
xmlns="https://bonsai-rx.org/2018/workflow">
910
<Workflow>
1011
<Nodes>
@@ -180,6 +181,16 @@
180181
<Property Name="OperantLogic" />
181182
</PropertyMappings>
182183
</Expression>
184+
<Expression xsi:type="Combinator">
185+
<Combinator xsi:type="p2:NullDistribution" />
186+
</Expression>
187+
<Expression xsi:type="PropertyMapping">
188+
<PropertyMappings>
189+
<Property Name="Amount" />
190+
<Property Name="Probability" />
191+
<Property Name="Available" />
192+
</PropertyMappings>
193+
</Expression>
183194
<Expression xsi:type="Combinator">
184195
<Combinator xsi:type="p1:RewardSpecification" />
185196
</Expression>
@@ -188,7 +199,7 @@
188199
<Edges>
189200
<Edge From="0" To="1" Label="Source1" />
190201
<Edge From="1" To="2" Label="Source1" />
191-
<Edge From="2" To="16" Label="Source1" />
202+
<Edge From="2" To="18" Label="Source1" />
192203
<Edge From="3" To="4" Label="Source1" />
193204
<Edge From="4" To="5" Label="Source1" />
194205
<Edge From="5" To="6" Label="Source1" />
@@ -201,8 +212,10 @@
201212
<Edge From="12" To="13" Label="Source1" />
202213
<Edge From="13" To="14" Label="Source2" />
203214
<Edge From="14" To="15" Label="Source1" />
204-
<Edge From="15" To="16" Label="Source2" />
215+
<Edge From="15" To="18" Label="Source2" />
205216
<Edge From="16" To="17" Label="Source1" />
217+
<Edge From="17" To="18" Label="Source3" />
218+
<Edge From="18" To="19" Label="Source1" />
206219
</Edges>
207220
</Workflow>
208221
</Expression>

src/Extensions/AindBehaviorVrForaging.Generated.cs

Lines changed: 54 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ public partial class AindBehaviorSessionModel
4343

4444
public AindBehaviorSessionModel()
4545
{
46-
_aindBehaviorServicesPkgVersion = "0.12.2";
47-
_version = "0.12.2";
46+
_aindBehaviorServicesPkgVersion = "0.12.3";
47+
_version = "0.12.3";
4848
_experimenter = new System.Collections.Generic.List<string>();
4949
_experimentVersion = "";
5050
_allowDirtyRepo = false;
@@ -954,7 +954,7 @@ public partial class AindVrForagingRig
954954

955955
public AindVrForagingRig()
956956
{
957-
_aindBehaviorServicesPkgVersion = "0.12.2";
957+
_aindBehaviorServicesPkgVersion = "0.12.3";
958958
_version = "0.6.0-rc13";
959959
_triggeredCameraController = new CameraControllerSpinnakerCamera();
960960
_harpBehavior = new HarpBehavior();
@@ -1521,7 +1521,7 @@ public partial class AindVrForagingTaskParameters
15211521

15221522
public AindVrForagingTaskParameters()
15231523
{
1524-
_aindBehaviorServicesPkgVersion = "0.12.2";
1524+
_aindBehaviorServicesPkgVersion = "0.12.3";
15251525
_environment = new BlockStructure();
15261526
_operationControl = new OperationControl();
15271527
}
@@ -13113,33 +13113,66 @@ public override string ToString()
1311313113
/// Parameters for truncating a distribution to a specified range. Truncation should
1311413114
///be applied after sampling and scaling.
1311513115
///
13116+
///The truncation_mode determines how out-of-bounds values are handled:
13117+
///- "exclude": Resample until a value within [min, max] is obtained.
13118+
///If after a certain number of attempts no valid value is found, it
13119+
///will use the average of sampled values and pick the closest bound.
13120+
///- "clamp": Clamp values to the nearest bound within [min, max].
1311613121
///Used to constrain sampled values within minimum and maximum bounds.
1311713122
/// </summary>
1311813123
[System.CodeDom.Compiler.GeneratedCodeAttribute("Bonsai.Sgen", "0.6.1.0 (Newtonsoft.Json v13.0.0.0)")]
13119-
[System.ComponentModel.DescriptionAttribute("Parameters for truncating a distribution to a specified range. Truncation should\n" +
13120-
"be applied after sampling and scaling.\n\nUsed to constrain sampled values within " +
13121-
"minimum and maximum bounds.")]
13124+
[System.ComponentModel.DescriptionAttribute(@"Parameters for truncating a distribution to a specified range. Truncation should
13125+
be applied after sampling and scaling.
13126+
13127+
The truncation_mode determines how out-of-bounds values are handled:
13128+
- ""exclude"": Resample until a value within [min, max] is obtained.
13129+
If after a certain number of attempts no valid value is found, it
13130+
will use the average of sampled values and pick the closest bound.
13131+
- ""clamp"": Clamp values to the nearest bound within [min, max].
13132+
Used to constrain sampled values within minimum and maximum bounds.")]
1312213133
[Bonsai.WorkflowElementCategoryAttribute(Bonsai.ElementCategory.Source)]
1312313134
[Bonsai.CombinatorAttribute(MethodName="Generate")]
1312413135
public partial class TruncationParameters
1312513136
{
1312613137

13138+
private TruncationParametersTruncationMode _truncationMode;
13139+
1312713140
private double _min;
1312813141

1312913142
private double _max;
1313013143

1313113144
public TruncationParameters()
1313213145
{
13146+
_truncationMode = AindVrForagingDataSchema.TruncationParametersTruncationMode.Exclude;
1313313147
_min = 0D;
1313413148
_max = 0D;
1313513149
}
1313613150

1313713151
protected TruncationParameters(TruncationParameters other)
1313813152
{
13153+
_truncationMode = other._truncationMode;
1313913154
_min = other._min;
1314013155
_max = other._max;
1314113156
}
1314213157

13158+
/// <summary>
13159+
/// Mode of truncation to apply
13160+
/// </summary>
13161+
[System.Xml.Serialization.XmlIgnoreAttribute()]
13162+
[Newtonsoft.Json.JsonPropertyAttribute("truncation_mode")]
13163+
[System.ComponentModel.DescriptionAttribute("Mode of truncation to apply")]
13164+
public TruncationParametersTruncationMode TruncationMode
13165+
{
13166+
get
13167+
{
13168+
return _truncationMode;
13169+
}
13170+
set
13171+
{
13172+
_truncationMode = value;
13173+
}
13174+
}
13175+
1314313176
/// <summary>
1314413177
/// Minimum value of the sampled distribution
1314513178
/// </summary>
@@ -13186,6 +13219,7 @@ public System.IObservable<TruncationParameters> Generate<TSource>(System.IObserv
1318613219

1318713220
protected virtual bool PrintMembers(System.Text.StringBuilder stringBuilder)
1318813221
{
13222+
stringBuilder.Append("TruncationMode = " + _truncationMode + ", ");
1318913223
stringBuilder.Append("Min = " + _min + ", ");
1319013224
stringBuilder.Append("Max = " + _max);
1319113225
return true;
@@ -15768,6 +15802,19 @@ public enum SpinnakerCameraColorProcessing
1576815802
}
1576915803

1577015804

15805+
[System.CodeDom.Compiler.GeneratedCodeAttribute("Bonsai.Sgen", "0.6.1.0 (Newtonsoft.Json v13.0.0.0)")]
15806+
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
15807+
public enum TruncationParametersTruncationMode
15808+
{
15809+
15810+
[System.Runtime.Serialization.EnumMemberAttribute(Value="exclude")]
15811+
Exclude = 0,
15812+
15813+
[System.Runtime.Serialization.EnumMemberAttribute(Value="clamp")]
15814+
Clamp = 1,
15815+
}
15816+
15817+
1577115818
[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.9.0.0 (Newtonsoft.Json v13.0.0.0)")]
1577215819
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple = true)]
1577315820
internal class JsonInheritanceAttribute : System.Attribute

0 commit comments

Comments
 (0)