Skip to content

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
merged 4 commits into from
Jun 1, 2020

Conversation

Flameeyes
Copy link
Contributor

This includes both license tagging the cookiecutter support and the template, and adding pre-commit configuration for this repository and the template itself.

@tannewt
Copy link
Member

tannewt commented 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).
Flameeyes added 3 commits May 21, 2020 21:22
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).
@Flameeyes Flameeyes requested a review from tannewt May 26, 2020 20:42
@tannewt tannewt requested review from sommersoft and kattni May 26, 2020 21:39
This uses the same configuration from
https://github.com/adafruit/Adafruit_CircuitPython_TestRepo, using
pre-commit instead of black as part of the CI.
Copy link
Member

@tannewt tannewt left a 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!

@tannewt tannewt merged commit f2f3dcf into adafruit:master Jun 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants