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

Add automatic values to salt #2

Open
tbekolay opened this issue Aug 6, 2019 · 0 comments
Open

Add automatic values to salt #2

tbekolay opened this issue Aug 6, 2019 · 0 comments

Comments

@tbekolay
Copy link
Member

tbekolay commented Aug 6, 2019

Currently, instead of an integer seed_offset, pytest-rng uses a string salt value that is concatenated to the nodeid before hashing. I did this so that it would be easy to use Nengo Bones (specifically nengo/nengo-bones#39) to put the version string in there.

However, another way we could make the salt value change automatically is to recognize some special strings that will be expanded to a concrete string when pytest is run.

Here are some options for discussion:

  1. Pass the salt string to strftime with the current time.

    This would enable things like rng_salt = "%Y-%m", meaning that you would get a new unique seed every month.

  2. Come up with a list of custom values that the user can use in their salt string and pass them into a .format call.

    This would enable anything we want, including rng_salt = "{year}-{month}", but would require us to come up with a list of things we might want.

Other options welcome.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant