feat(ci): Hash project euler solutions - #4411
Conversation
|
@cclauss, please check the Discord and check the latest message. Thanks. 🙂 |
|
Yes I agree that they can't force this on us with the CC license, but since they just want the solutions in the JSON file for testing hashed so people won't just copy-paste everything from there, I don't see why we shouldn't do that. Is there any disadvantage for us in doing this? |
We are an open source project. I am uncomfortable making decisions behind closed doors. The Euler Project’s Community Commons license does not give them the right to limit our use of their IP except as expressed in that license. If they want to change their license they can do so in the customary way. |
This comment has been minimized.
This comment has been minimized.
Panquesito7
left a comment
There was a problem hiding this comment.
Good work, @maltejur! Thank you! 🎉 👍
Continuous integration issues have been fixed.
* hash project euler solutions * fix errors * Return missing annotation * Fix typo * Extract variable to shorten excessively long line * Update scripts/validate_solutions.py * Update scripts/validate_solutions.py * Simplify with str.encode() * PEP 585: type hinting generics in standard collections; * str().encode() * Texas two step to placate black, flake8, mypy Co-authored-by: Andrii Siriak <siryaka@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>
* hash project euler solutions * fix errors * Return missing annotation * Fix typo * Extract variable to shorten excessively long line * Update scripts/validate_solutions.py * Update scripts/validate_solutions.py * Simplify with str.encode() * PEP 585: type hinting generics in standard collections; * str().encode() * Texas two step to placate black, flake8, mypy Co-authored-by: Andrii Siriak <siryaka@gmail.com> Co-authored-by: Christian Clauss <cclauss@me.com>

Describe your change:
As requested from the Project Euler Team and already discussed in the discord, we should hash the values of the Project Euler solutions for testing so that no direct solutions are stored. This pr hashes all the values in the
project_euler_answers.jsonand updates the tests to use the hashed output.Checklist:
This PR only changes one algorithm file. To ease review, please open separate PRs for separate algorithms.All new Python files are placed inside an existing directory.All functions have doctests that pass the automated testing.All new algorithms have a URL in its comments that points to Wikipedia or other similar explanation.If this pull request resolves one or more open issues then the commit message containsFixes: #{$ISSUE_NO}.