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

Use the random generator for item handles #1044

Merged
merged 4 commits into from
Apr 20, 2022
Merged

Use the random generator for item handles #1044

merged 4 commits into from
Apr 20, 2022

Conversation

vkbo
Copy link
Owner

@vkbo vkbo commented Apr 20, 2022

Summary:

This PR changes the algorithm that generates item handles to instead use the built-in random number generator. The change is trivial and the new handles are on the same format as the old, so there is no conversion needed for existing projects.

The main changes in the PR is to the test suite, which now uses a mock random generator to run most tests. The mock generator just counts upwards on each call, which maks it easier to write testes containing handles and status or importance keys.

Related Issue(s):

Reviewer's Checklist:

  • The header of all files contain a reference to the repository license
  • The overall test coverage is increased or remains the same as before
  • All tests are passing
  • All flake8 checks are passing and the style guide is followed
  • Documentation (as docstrings) is complete and understandable
  • Only files that have been actively changed are committed

@vkbo vkbo added this to the Release 1.7 Beta 1 milestone Apr 20, 2022
@vkbo vkbo merged commit b588fdf into main Apr 20, 2022
@vkbo vkbo deleted the random_handles branch April 20, 2022 20:00
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.

1 participant