feat(ci): Hash project euler solutions #4411
Conversation
|
As we have discussed elsewhere, I do not believe that Project Euler’s Community Commons license gives them the right to limit the use of their content in this way. |
|
@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. |
|
Tests are failing. |
This comment has been hidden.
This comment has been hidden.
|
LGTM |
|
Good work, @maltejur! Thank you! |
Continuous integration issues have been fixed.
|
@maltejur Thanks for doing this. |
* 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 <[email protected]> Co-authored-by: Christian Clauss <[email protected]>


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}.