Skip to content
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

Successors length limits #224

Merged
merged 6 commits into from
Jun 27, 2024
Merged

Conversation

Tagl
Copy link
Contributor

@Tagl Tagl commented May 19, 2024

Closes #207

Might be wise to add a few more tests.

@Tagl Tagl force-pushed the successors_length_limits branch from 0b09419 to aaaabfb Compare May 19, 2024 14:43
@coveralls
Copy link

Coverage Status

coverage: 99.612%. remained the same
when pulling aaaabfb on Tagl:successors_length_limits
into 530016a on caleb531:main.

@coveralls
Copy link

coveralls commented May 19, 2024

Coverage Status

coverage: 99.612%. remained the same
when pulling 4183c71 on Tagl:successors_length_limits
into 530016a on caleb531:main.

@eliotwrobson
Copy link
Collaborator

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.

@caleb531 caleb531 marked this pull request as draft June 4, 2024 00:52
@caleb531
Copy link
Owner

caleb531 commented Jun 4, 2024

@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.

@eliotwrobson
Copy link
Collaborator

@Tagl added a couple of test cases and encountered a bug I commented on:

f95b0d1#diff-404c46da3c65463b61109992f94cfd102f9f20f5467f1916bf9bf50ff89c7176R1894-R1895

I think this can be avoided just by popping from the char stack if the size goes over the length limit.

@eliotwrobson
Copy link
Collaborator

eliotwrobson commented Jun 23, 2024

@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.

@Tagl
Copy link
Contributor Author

Tagl commented Jun 26, 2024

I'll take a look tomorrow

@Tagl
Copy link
Contributor Author

Tagl commented Jun 27, 2024

Should be fixed now, I added one more edge case to test for as well.

@eliotwrobson eliotwrobson marked this pull request as ready for review June 27, 2024 12:15
Copy link
Collaborator

@eliotwrobson eliotwrobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good now that we have that edge case sorted out, thanks! Going to go ahead and approve. @Tagl do you think this is good to merge now?

@Tagl
Copy link
Contributor Author

Tagl commented Jun 27, 2024

Yes, I believe so.

@eliotwrobson eliotwrobson merged commit 39ca92a into caleb531:main Jun 27, 2024
16 checks passed
eliotwrobson added a commit that referenced this pull request Jun 28, 2024
eliotwrobson added a commit that referenced this pull request Jun 28, 2024
eliotwrobson added a commit to eliotwrobson/automata that referenced this pull request Jun 28, 2024
* Succesor length limits

* Added extra test cases and comment about bug

* Fix infinite loop bug when length is limited.

* Re-enable disabled test

* Add an edge case test for predecessor

* Formatting

---------

Co-authored-by: Eliot Robson <eliot.robson24@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add min_length and max_length parameters to successors/predecessors
4 participants