-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
Rework audit-licenses check [ci] #123119
base: dev
Are you sure you want to change the base?
Rework audit-licenses check [ci] #123119
Conversation
@@ -189,61 +205,250 @@ def from_dict(cls, data: dict[str, str]) -> PackageDefinition: | |||
"uvcclient": AwesomeVersion( | |||
"0.11.0" | |||
), # No License https://github.com/kk7ds/uvcclient/issues/7 | |||
# -- Full license text in metadata |
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.
Should these be in TODO or in exceptions?
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.
All of them are OSI licenses, so I wouldn't consider them to be "exceptions" per se. More things we should take care of which would be "todo".
I can change it though if you think it makes more sense there.
8808d48
to
9bbf2cb
Compare
f6b94a8
to
652bbe9
Compare
237023a
to
25e40f4
Compare
6681c3e
to
ce0fdb8
Compare
fe064c8
to
89dce5f
Compare
8a87d7c
to
46616fd
Compare
ftfy is the first libray to use this one right? |
The first to use Let's wait for "official" support in packaging before moving forward here. The PR is almost done. We'll also need |
Opened a PR for it upstream. |
403499c
to
2d679cd
Compare
f0bc291
to
badb05d
Compare
d3914f3
to
568401c
Compare
f1e8f63
to
4224771
Compare
Proposed change
Followup to #120683 (review)
This PR reworks the
audit-licenses
check with several improvements.--from=all
argument forpip-licenses
. This will write both, the metadata license string and the license classifier, to the json file.https://github.com/raimon49/pip-licenses/tree/v-4.4.0?tab=readme-ov-file#option-from
license-expression
package to validate the metadata license string and require a valid SPDX license expression.https://github.com/nexB/license-expression
AND
andOR
license expressions. E.g.Apache-2.0 OR BSD-3-Clause
orMPL-2.0 AND MIT
.;
. If multiple classifier are given, they are now interpreted asAND
(instead ofOR
). That is the safer option considering cases like:['Apache Software License', 'Other/Proprietary License']
.Consequences
TODO
list.Note
Call to action
As it looks ATM, PEP-639 is close to being finalized. With that SPDX license expression will be standardized for the license metadata. We should recommend / nudge developers to start using them today - fix the license metadata of their project if it's on the
TODO
list. Especiallypoetry
users will benefit here, since poetry automatically adds theOther/Proprietary License
classifier if it can't detect a valid SPDX license identifier.Future work
At some point it might make sense to only consider the license metadata going forward and deprecate / remove the license classifier check.
--
https://spdx.org/licenses/
Type of change
Additional information
Checklist
ruff format homeassistant tests
)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest
.requirements_all.txt
.Updated by running
python3 -m script.gen_requirements_all
.To help with the load of incoming pull requests: