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

Small change to getModuleRNG for readability #764

Merged
merged 2 commits into from
Jan 5, 2024
Merged

Conversation

jeremykubica
Copy link
Contributor

A very small change to make getModuleRNG more readable. Breaks the seed_offset into two lines. The first does the hashing (and uses the default encoding). The second maps the hashed value to an integer (making the base argument explicit).

Also adds a very small change from running black.

Review Checklist for Source Code Changes

  • Does pip install still work?
  • Have you written a unit test for any new functions?
  • Do all the units tests run successfully?
  • Does Sorcha run successfully on a test set of input files/databases?
  • Have you used black on the files you have updated to confirm python programming style guide enforcement?

@jeremykubica jeremykubica requested a review from mschwamb January 5, 2024 13:39
Copy link

codecov bot commented Jan 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (b58fba3) 74.67% compared to head (76ef564) 74.68%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #764   +/-   ##
=======================================
  Coverage   74.67%   74.68%           
=======================================
  Files          66       66           
  Lines        3029     3030    +1     
=======================================
+ Hits         2262     2263    +1     
  Misses        767      767           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@jeremykubica jeremykubica merged commit 0d681a8 into main Jan 5, 2024
10 checks passed
@jeremykubica jeremykubica deleted the rng_readability branch January 5, 2024 14:11
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.

2 participants