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

enforce length n serial distribution #112

Merged
merged 7 commits into from
Nov 30, 2023
Merged

enforce length n serial distribution #112

merged 7 commits into from
Nov 30, 2023

Conversation

sbfnk
Copy link
Contributor

@sbfnk sbfnk commented Nov 28, 2023

Fixes #111

@sbfnk
Copy link
Contributor Author

sbfnk commented Nov 28, 2023

@jamesmbaazam this fails snapshot tests which should not be affected by this PR. Do we need to set a seed in (some of) the testing code?

@jamesmbaazam
Copy link
Member

jamesmbaazam commented Nov 29, 2023

There's something weird going on here that I am yet to diagnose. seeds have been set in each test_that() call but it seems they're being lost after each function call. I'm not getting the same errors in main and not sure why it's happening here. Will investigate further.

Copy link
Member

@jamesmbaazam jamesmbaazam left a comment

Choose a reason for hiding this comment

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

Thanks for these changes, Seb. I've left a comment to hopefully help us fix the CI issue.

@sbfnk
Copy link
Contributor Author

sbfnk commented Nov 30, 2023

There's something weird going on here that I am yet to diagnose. seeds have been set in each test_that() call but it seems they're being lost after each function call. I'm not getting the same errors in main and not sure why it's happening here. Will investigate further.

Ohhh is the issue that in the tests we're generating a new random number (in check_serial_valid) and therefore all subsequent calls to random number generator calls different (pseudo-)random numbers than without that call. In that case all I need to do is accept the snapshot, right?

@jamesmbaazam
Copy link
Member

Ohhh is the issue that in the tests we're generating a new random number (in check_serial_valid) and therefore all subsequent calls to random number generator calls different (pseudo-)random numbers than without that call.

Yes, exactly.

In that case all I need to do is accept the snapshot, right?

Yep. That should fix it.

@sbfnk sbfnk requested a review from jamesmbaazam November 30, 2023 12:55
Copy link
Member

@jamesmbaazam jamesmbaazam left a comment

Choose a reason for hiding this comment

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

LGTM. I will rebase and merge.

One thing I've not enforced properly is to keep the version at v0.0.0.9999 until we release v0.1.0.

@jamesmbaazam
Copy link
Member

Also, note incoming change in #116 to rename serials_dist to gen_interval.

@jamesmbaazam jamesmbaazam merged commit 5633a04 into main Nov 30, 2023
8 checks passed
@jamesmbaazam jamesmbaazam deleted the issue-111 branch November 30, 2023 16:50
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.

simulate_tree example does not conform with documentation
2 participants