-
Notifications
You must be signed in to change notification settings - Fork 8
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
Example implementation of REUSE specifications. #33
Conversation
Hah, funny, I guess this could use a black pre-commit integration, too ;) |
c3d9450
to
6c592c3
Compare
Because actions-ci is cloned, rather than used as a submodule, it turns out |
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.
I'm going to check with mgmt about some these, too, thanks.
b09a551
to
4bb9925
Compare
pre-commit is now catching some more missing entries |
Yep it's finding the content of actionci that is checked out by the GitHub action in the same folder as the content of this repository. That's what adafruit/actions-ci-circuitpython-libs#8 is about. If it was a submodule, it would be ignored, and when running as part of a commit itself, But when running as part if the continuous integration, it needs to use |
I dove in on this a bit this afternoon. A few personal notes/thoughts that I have so far:
@Flameeyes with your experience implementing REUSE, please feel free to correct any of my errors or misunderstandings of how |
@sommersoft yeah that's pretty much all correct. I'm also glad to hear you like pre-commit — it has indeed been a big timesaver for me on many projects now. When running locally it has the ability to fix, not just detect, issues. Also regarding the examples copyright being difficult to track — that was indeed my original motivation. I have been looking at one of the esp32spi examples as I needed to model my code after it and wasn't sure what license it was released as, from the docs themselves. |
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 Kattni Rembor'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 Kattni Rembor'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). [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. This is also integrated with GitHub actions in the example configuration.
For this to work, the black command line options need to be replaced with a pyproject.toml file defining the settings, that can be reused.
These are minor, but avoids those coming up during reviews at all.
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.
OK, I re-ran the checks for this after merging adafruit/actions-ci-circuitpython-libs#8, and it's working fine, so now approving this.
See discussion in adafruit/circuitpython#2887.