Successors length limits
Closes #207
Might be wise to add a few more tests.
coverage: 99.612%. remained the same when pulling aaaabfb0cf966cc3acf2301903b00c2170726177 on Tagl:successors_length_limits into 530016a03703e071b72f1665769770039018536d on caleb531:main.
coverage: 99.612%. remained the same when pulling 4183c714050e7e9826301e7431a0d9421464df4b on Tagl:successors_length_limits into 530016a03703e071b72f1665769770039018536d on caleb531:main.
Looks good from a glance! When I make a pass through the active PR list a little later I can add some tests before merging.
@eliotwrobson @Tagl Looks like a great addition to me! Thank you for this!
I am converting the PR to Draft state until more tests are added.
@Tagl added a couple of test cases and encountered a bug I commented on:
https://github.com/caleb531/automata/pull/224/commits/f95b0d17852cce7e5e8239fae83481d9d7f0da92#diff-404c46da3c65463b61109992f94cfd102f9f20f5467f1916bf9bf50ff89c7176R1894-R1895
I think this can be avoided just by popping from the char stack if the size goes over the length limit.
@Tagl for this, should the stop condition be changed to when the algorithm hits the string of all the lexicographically last character of length max_length? I think that might fix the issue I found in my testing.
Edit: just a heads up that we'll probably be closing up the PyOpenSci review soon, and it would be awesome if the release after that could include the changes here.
I'll take a look tomorrow
Should be fixed now, I added one more edge case to test for as well.
Yes, I believe so.