Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/vr-foraging-cicd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ jobs:
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Release v${{ steps.get_version.outputs.version }} [skip ci]"
git tag -a "v${{ steps.get_version.outputs.version }}" -m "Release v${{ steps.get_version.outputs.version }}"
git tag -a "v${{ steps.get_version.outputs.version }}" -m "v${{ steps.get_version.outputs.version }}"
git push origin main
git push origin "v${{ steps.get_version.outputs.version }}"

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Changelog = "https://github.com/AllenNeuralDynamics/Aind.Behavior.VrForaging/rel

[project.optional-dependencies]

data = ["contraqctor<0.5.0"]
data = ["contraqctor<0.6.0"]

launcher = [
"aind-clabe[aind-services]>=0.7",
Expand Down
22 changes: 16 additions & 6 deletions src/DataSchemas/aind_behavior_vr_foraging.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
"AindBehaviorSessionModel": {
"properties": {
"aind_behavior_services_pkg_version": {
"default": "0.12.2",
"default": "0.12.3",
"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-]+)*))?$",
"title": "aind_behavior_services package version",
"type": "string"
},
"version": {
"const": "0.12.2",
"default": "0.12.2",
"const": "0.12.3",
"default": "0.12.3",
"title": "Version",
"type": "string"
},
Expand Down Expand Up @@ -353,7 +353,7 @@
"AindVrForagingRig": {
"properties": {
"aind_behavior_services_pkg_version": {
"default": "0.12.2",
"default": "0.12.3",
"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-]+)*))?$",
"title": "aind_behavior_services package version",
"type": "string"
Expand Down Expand Up @@ -611,7 +611,7 @@
"title": "Rng Seed"
},
"aind_behavior_services_pkg_version": {
"default": "0.12.2",
"default": "0.12.3",
"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-]+)*))?$",
"title": "aind_behavior_services package version",
"type": "string"
Expand Down Expand Up @@ -4997,8 +4997,18 @@
"type": "object"
},
"TruncationParameters": {
"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.",
"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.",
"properties": {
"truncation_mode": {
"default": "exclude",
"description": "Mode of truncation to apply",
"enum": [
"exclude",
"clamp"
],
"title": "Truncation Mode",
"type": "string"
},
"min": {
"default": 0,
"description": "Minimum value of the sampled distribution",
Expand Down
16 changes: 9 additions & 7 deletions src/Extensions.csproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net48</TargetFramework>
<!-- <OutputType>Exe</OutputType> -->
<!--<TargetFramework>net8.0-windows</TargetFramework>-->
<TargetFramework>net480</TargetFramework>
<UseWindowsForms>true</UseWindowsForms>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Bonsai.Core" Version="2.9.0" />
<PackageReference Include="AllenNeuralDynamics.Core.Design" Version="0.3.0" />
<PackageReference Include="AllenNeuralDynamics.Core.Design" Version="0.3.0" />
<PackageReference Include="OpenCV.Net" Version="3.4.2" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="Bonsai.Harp" Version="3.5.0" />
<PackageReference Include="Bonsai.Harp" Version="3.5.2" />
<PackageReference Include="MathNet.Numerics" Version="4.15.0" />
<PackageReference Include="Harp.Olfactometer" Version="0.1.0-build231127" />
<PackageReference Include="AllenNeuralDynamics.AindManipulator" Version="0.1.6" />
<PackageReference Include="Hexa.NET.ImGui" Version="2.2.8.4" />
<PackageReference Include="Hexa.NET.ImPlot" Version="2.2.8.4" />
<PackageReference Include="Hexa.NET.ImGui" Version="2.2.9" />
<PackageReference Include="Hexa.NET.ImPlot" Version="2.2.9" />
<PackageReference Include="OpenTK.GLControl" Version="3.1.0" />
<PackageReference Include="Bonsai.Dsp.Design" Version="2.9.0" />
<PackageReference Include="Hexa.NET.ImGui.Backends" Version="1.0.17" />
<PackageReference Include="Hexa.NET.ImGui.Backends" Version="1.0.17.4" />
<PackageReference Include="AllenNeuralDynamics.AindBehaviorServices" Version="0.12.0" />
</ItemGroup>
</Project>
19 changes: 16 additions & 3 deletions src/Extensions/AddRewardSite.bonsai
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<WorkflowBuilder Version="2.8.2"
<WorkflowBuilder Version="2.9.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:rx="clr-namespace:Bonsai.Reactive;assembly=Bonsai.Core"
xmlns:p1="clr-namespace:AindVrForagingDataSchema;assembly=Extensions"
xmlns:sys="clr-namespace:System;assembly=mscorlib"
xmlns:num="clr-namespace:Bonsai.Numerics;assembly=Bonsai.Numerics"
xmlns:p2="clr-namespace:;assembly=Extensions"
xmlns="https://bonsai-rx.org/2018/workflow">
<Workflow>
<Nodes>
Expand Down Expand Up @@ -180,6 +181,16 @@
<Property Name="OperantLogic" />
</PropertyMappings>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p2:NullDistribution" />
</Expression>
<Expression xsi:type="PropertyMapping">
<PropertyMappings>
<Property Name="Amount" />
<Property Name="Probability" />
<Property Name="Available" />
</PropertyMappings>
</Expression>
<Expression xsi:type="Combinator">
<Combinator xsi:type="p1:RewardSpecification" />
</Expression>
Expand All @@ -188,7 +199,7 @@
<Edges>
<Edge From="0" To="1" Label="Source1" />
<Edge From="1" To="2" Label="Source1" />
<Edge From="2" To="16" Label="Source1" />
<Edge From="2" To="18" Label="Source1" />
<Edge From="3" To="4" Label="Source1" />
<Edge From="4" To="5" Label="Source1" />
<Edge From="5" To="6" Label="Source1" />
Expand All @@ -201,8 +212,10 @@
<Edge From="12" To="13" Label="Source1" />
<Edge From="13" To="14" Label="Source2" />
<Edge From="14" To="15" Label="Source1" />
<Edge From="15" To="16" Label="Source2" />
<Edge From="15" To="18" Label="Source2" />
<Edge From="16" To="17" Label="Source1" />
<Edge From="17" To="18" Label="Source3" />
<Edge From="18" To="19" Label="Source1" />
</Edges>
</Workflow>
</Expression>
Expand Down
61 changes: 54 additions & 7 deletions src/Extensions/AindBehaviorVrForaging.Generated.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public partial class AindBehaviorSessionModel

public AindBehaviorSessionModel()
{
_aindBehaviorServicesPkgVersion = "0.12.2";
_version = "0.12.2";
_aindBehaviorServicesPkgVersion = "0.12.3";
_version = "0.12.3";
_experimenter = new System.Collections.Generic.List<string>();
_experimentVersion = "";
_allowDirtyRepo = false;
Expand Down Expand Up @@ -954,7 +954,7 @@ public partial class AindVrForagingRig

public AindVrForagingRig()
{
_aindBehaviorServicesPkgVersion = "0.12.2";
_aindBehaviorServicesPkgVersion = "0.12.3";
_version = "0.6.0-rc13";
_triggeredCameraController = new CameraControllerSpinnakerCamera();
_harpBehavior = new HarpBehavior();
Expand Down Expand Up @@ -1521,7 +1521,7 @@ public partial class AindVrForagingTaskParameters

public AindVrForagingTaskParameters()
{
_aindBehaviorServicesPkgVersion = "0.12.2";
_aindBehaviorServicesPkgVersion = "0.12.3";
_environment = new BlockStructure();
_operationControl = new OperationControl();
}
Expand Down Expand Up @@ -13113,33 +13113,66 @@ public override string ToString()
/// Parameters for truncating a distribution to a specified range. Truncation should
///be applied after sampling and scaling.
///
///The truncation_mode determines how out-of-bounds values are handled:
///- "exclude": Resample until a value within [min, max] is obtained.
///If after a certain number of attempts no valid value is found, it
///will use the average of sampled values and pick the closest bound.
///- "clamp": Clamp values to the nearest bound within [min, max].
///Used to constrain sampled values within minimum and maximum bounds.
/// </summary>
[System.CodeDom.Compiler.GeneratedCodeAttribute("Bonsai.Sgen", "0.6.1.0 (Newtonsoft.Json v13.0.0.0)")]
[System.ComponentModel.DescriptionAttribute("Parameters for truncating a distribution to a specified range. Truncation should\n" +
"be applied after sampling and scaling.\n\nUsed to constrain sampled values within " +
"minimum and maximum bounds.")]
[System.ComponentModel.DescriptionAttribute(@"Parameters for truncating a distribution to a specified range. Truncation should
be applied after sampling and scaling.

The truncation_mode determines how out-of-bounds values are handled:
- ""exclude"": Resample until a value within [min, max] is obtained.
If after a certain number of attempts no valid value is found, it
will use the average of sampled values and pick the closest bound.
- ""clamp"": Clamp values to the nearest bound within [min, max].
Used to constrain sampled values within minimum and maximum bounds.")]
[Bonsai.WorkflowElementCategoryAttribute(Bonsai.ElementCategory.Source)]
[Bonsai.CombinatorAttribute(MethodName="Generate")]
public partial class TruncationParameters
{

private TruncationParametersTruncationMode _truncationMode;

private double _min;

private double _max;

public TruncationParameters()
{
_truncationMode = AindVrForagingDataSchema.TruncationParametersTruncationMode.Exclude;
_min = 0D;
_max = 0D;
}

protected TruncationParameters(TruncationParameters other)
{
_truncationMode = other._truncationMode;
_min = other._min;
_max = other._max;
}

/// <summary>
/// Mode of truncation to apply
/// </summary>
[System.Xml.Serialization.XmlIgnoreAttribute()]
[Newtonsoft.Json.JsonPropertyAttribute("truncation_mode")]
[System.ComponentModel.DescriptionAttribute("Mode of truncation to apply")]
public TruncationParametersTruncationMode TruncationMode
{
get
{
return _truncationMode;
}
set
{
_truncationMode = value;
}
}

/// <summary>
/// Minimum value of the sampled distribution
/// </summary>
Expand Down Expand Up @@ -13186,6 +13219,7 @@ public System.IObservable<TruncationParameters> Generate<TSource>(System.IObserv

protected virtual bool PrintMembers(System.Text.StringBuilder stringBuilder)
{
stringBuilder.Append("TruncationMode = " + _truncationMode + ", ");
stringBuilder.Append("Min = " + _min + ", ");
stringBuilder.Append("Max = " + _max);
return true;
Expand Down Expand Up @@ -15768,6 +15802,19 @@ public enum SpinnakerCameraColorProcessing
}


[System.CodeDom.Compiler.GeneratedCodeAttribute("Bonsai.Sgen", "0.6.1.0 (Newtonsoft.Json v13.0.0.0)")]
[Newtonsoft.Json.JsonConverter(typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
public enum TruncationParametersTruncationMode
{

[System.Runtime.Serialization.EnumMemberAttribute(Value="exclude")]
Exclude = 0,

[System.Runtime.Serialization.EnumMemberAttribute(Value="clamp")]
Clamp = 1,
}


[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "10.9.0.0 (Newtonsoft.Json v13.0.0.0)")]
[System.AttributeUsage(System.AttributeTargets.Class | System.AttributeTargets.Interface, AllowMultiple = true)]
internal class JsonInheritanceAttribute : System.Attribute
Expand Down
Loading