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

Fix source of randomness in doctests #341

Open
gdalle opened this issue Feb 12, 2024 · 3 comments
Open

Fix source of randomness in doctests #341

gdalle opened this issue Feb 12, 2024 · 3 comments
Labels
documentation Improvements or additions to documentation

Comments

@gdalle
Copy link
Member

gdalle commented Feb 12, 2024

For instance with StableRNGs

@simonschoelly
Copy link
Member

One issue I see with StableRNG is that we then might have to put that also in the example code. Then users might think that they should always use StableRNG - but if there is a way to somehow hide that, then yes, we can use it.

@simonschoelly
Copy link
Member

Another - ugly method - would be to have different docstrings for different Julia versions.

@gdalle
Copy link
Member Author

gdalle commented Feb 21, 2024

Or to filter docstrings with regexes but that's a whole nother can of worms that I don't want to open. I think StableRNGs is the least worst option, but I agree it's less than ideal.

Doctests are very irregular in the code base anyway, and I don't think that many methods have them. Would it make sense to remove them and add tests instead?

@gdalle gdalle added the documentation Improvements or additions to documentation label Mar 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants