-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#2708 add Add a judgment to the graph constructor #2709
base: main
Are you sure you want to change the base?
Conversation
@microsoft-github-policy-service agree |
namespace AutoGen.Core.Tests | ||
{ | ||
[TestClass()] | ||
public class GraphTests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you move this test to AutoGen.Tests
project? That's where we usually put AutoGen.Core's tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK,I will move it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
this.transitions.AddRange(transitions); | ||
} | ||
|
||
public Graph(IEnumerable<Transition>? transitions) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why transitions
can be null in this case. Would it be better to simply does a null check and throw an exception when transitions
is null in this constructor?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In some cases the external developer may pass in a null List Object. This is allowed at least at compile time, so it's a risk. Because in some cases you don't need to set up the transition when creating Graph entity, but dynamically configure it later, there is no need to create a new object in this case.
@@ -35,12 +35,13 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.Mistral.Tests", "te | |||
EndProject | |||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "AutoGen.SemanticKernel.Tests", "test\AutoGen.SemanticKernel.Tests\AutoGen.SemanticKernel.Tests.csproj", "{1DFABC4A-8458-4875-8DCB-59F3802DAC65}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why these changes are added
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's added by VS automatically. I haven't add any new project to the sln after removed the Core.Test project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you revert this change
git checkout main dotnet/AutoGen.sln
Why are these changes needed?
Related issue number
#2708
Checks