Closed josh-ashkinaze closed 4 months ago
due to the changes I made def pull from main before working on this!
@narenedara I updated debate with a fix. So use updated branch
https://github.com/josh-ashkinaze/plurals/commit/667f48131eeeb896fadc05dee79704a453a67df9
I did the debate unit test so closed that
I made these changes for
test_moderator_default
; we want everything to be like this.[x] We want to make it so the assertion is always formatted (expected, actual). As of now it is the opposite (actual, expected). This only matters because PyCharm expects it to be (expected, actual) so when you get errors it assumes that's what the order is. See my example above.
[x] I think we want to be explicit about constructing the expected since some of these have multiple operations going on. So instead of defining expected in the assertion let's define it outside of the assertion. You don't need to do it for every expected but when it is very complex then you do
[x] We need to implement a real unit test for Debate. It is not like the others since one thing that is weird is how we format messages....you have to mess around to see what I mean. But we alternate like "you" and "other" for agents. Some tests I am thinking: (1) For the second agent, make sure that previous_responses are prefixed with "other" ;(2) For the moderator make sure that previous_responses are prefixed with
Debater 1
.[x] This is not a ToDo since I did it but from here on when we replace stuff in a string with a user parameter ALWAYS use
SmartString(thing)
.format(task=task)...just wrap it in
SmartString`. NEVER do vanilla string replacement in the source code anymore. I shared this with you over email, but I created a custom class that does string formatting safely since the curly brackets are bad news for vanilla string formatting.