-
Notifications
You must be signed in to change notification settings - Fork 38
Add pre-commit and follow REUSE recommendations for cookiecutter. #75
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tannewt
reviewed
May 21, 2020
@kattni and @sommersoft you probably want to refine the copyrights to include yourselves too. |
Flameeyes
added a commit
to Flameeyes/Adafruit_CircuitPython_TestRepo
that referenced
this pull request
May 21, 2020
As pointed out by @tannewt in adafruit/cookiecutter-adafruit-circuitpython#75, the CoC is derived off the Contributor Covenant, and is also released as CC-BY-4.0 (see https://github.com/adafruit/Adafruit_Community_Code_of_Conduct).
…ts repository. See https://github.com/adafruit/Adafruit_Community_Code_of_Conduct for the main copy of it.
The REUSE specifications[1] are meant to make it explicit and easier to apply code licensing information for a project. The provided lint tool makes it easy to ensure all the content (code and not code) is tagged. Important notes: * All the code (and documentation) that otherwise didn't have an explicit license headers have been tagged with Scott Shawcroft's copyright as per the LICENSE file. * The favicon.ico file has been tagged with CC-BY-4.0 license as per adafruit/circuitpython#2887 (comment) and Phillip Torrone's for Adafruit Industries copyright. * All configuration files have been tagged with Scott Shawcroft's copyright and Unlicense[2]. The current REUSE recommendation is to use CC0-1.0, but that has… side effects. There's some discussion in [3] about the recommendation for likely-uncopyrightable files (such as configuration files). * In the templated library structure, I've added a double copyright line for Scott Shawcroft _and_ the authoring person/company as per previous template in at least some of the files. Please let me know which others need to be tagged. There is some space for the _template_ having MIT license while the _generated_ file having Unlicense, or them having different copyright altogether. * Since all three of the licenses are used in both the repository itself and the generated repository in the cookiecutter, they are currently duplicated. [1]: https://reuse.software/ [2]: https://unlicense.org/ [3]: fsfe/reuse-docs#62
pre-commit.com provides a way to configure pre-commit hooks for multiple tools, including `reuse lint` (configured here), isort, black, and more. In addition to `reuse lint`, enable basic whitespace management and YAML checks. Note that `black` is not usable with this repository because it cannot parse the template `.py` files. Use the pre-commit provided GitHub action as part of the CI, for ease of maintenance.
Flameeyes
added a commit
to Flameeyes/Adafruit_CircuitPython_TestRepo
that referenced
this pull request
May 21, 2020
As pointed out by @tannewt in adafruit/cookiecutter-adafruit-circuitpython#75, the CoC is derived off the Contributor Covenant, and is also released as CC-BY-4.0 (see https://github.com/adafruit/Adafruit_Community_Code_of_Conduct).
This uses the same configuration from https://github.com/adafruit/Adafruit_CircuitPython_TestRepo, using pre-commit instead of black as part of the CI.
tannewt
approved these changes
Jun 1, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Thank you!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes both license tagging the cookiecutter support and the template, and adding pre-commit configuration for this repository and the template itself.