Skip to content
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

Implement REUSE.toml #863

Merged
merged 29 commits into from
May 6, 2024
Merged

Implement REUSE.toml #863

merged 29 commits into from
May 6, 2024

Conversation

carmenbianca
Copy link
Member

@carmenbianca carmenbianca commented Nov 18, 2023

Fixes #779

See that issue for a more thorough explanation.

@carmenbianca carmenbianca force-pushed the reuse-toml branch 3 times, most recently from 0dfe665 to a792f1e Compare November 18, 2023 15:29
@carmenbianca carmenbianca force-pushed the reuse-toml branch 5 times, most recently from c818ea4 to 03bfaf8 Compare November 28, 2023 15:53
@carmenbianca
Copy link
Member Author

Some notes to self:

  • Test GlobalLicensingConflict
  • Test that all the new errors (especially validation errors) have nice user-friendly error messages
  • More tests
  • More documentation

src/reuse/_main.py Outdated Show resolved Hide resolved
@carmenbianca carmenbianca force-pushed the reuse-toml branch 2 times, most recently from 33cdd16 to 5d49234 Compare December 13, 2023 15:00
@carmenbianca
Copy link
Member Author

carmenbianca commented Jan 4, 2024

Notes to self:

  • Add FORCEUNIX to wcmatch
  • Add a test whether a REUSE.toml file can match a file that is above itself in the hierarchy (single file name)

@perillo
Copy link
Contributor

perillo commented Jan 4, 2024

What about renaming REUSE.toml to license.toml?

Thanks.

@carmenbianca
Copy link
Member Author

Another note to self: see how this meshes with SPDX-FileContributor

@carmenbianca carmenbianca force-pushed the reuse-toml branch 2 times, most recently from 5858061 to 39b56b9 Compare January 19, 2024 17:37
@carmenbianca carmenbianca force-pushed the reuse-toml branch 3 times, most recently from a746e74 to dc6c248 Compare April 27, 2024 12:11
@carmenbianca carmenbianca marked this pull request as ready for review April 27, 2024 16:35
@carmenbianca
Copy link
Member Author

Marking this ready for review.

This was annoying to maintain. Just getting all Python files in
src/reuse is much easier.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
As detailed in a TODO comment, this makes it easier to share some common
logic between .reuse/dep5 and REUSE.toml.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
REUSE.toml will implement the same abstract class.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
This is a fairly big commit that implements a lot of functionality
surrounding REUSE.toml. It has feature parity with .reuse/dep5 at this
stage, plus a somewhat primitive (but functioning) implementation of
precedence.

The error handling should be in order, but may need more work and/or
testing.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
In 1.3.0, an issue was fixed where `poetry run` didn't return the
correct exit code, which was problematic in some of our CI tests.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Also took the opportunity to rename GlobalPrecedence to PrecedenceType

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
This was wholly untested and would need a rewrite for REUSE.toml.
It doesn't have a lot of use in the first place, so let's get rid of it
for now. We can re-create it later.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
The solution was so simple!
Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca
Copy link
Member Author

I'm going to merge this. Rebasing this on top of main repeatedly is quite a bit of (useless) work. We can revert or adjust as needed after the merge, but I have high confidence in the quality of the PR.

Signed-off-by: Carmen Bianca BAKKER <[email protected]>
@carmenbianca carmenbianca merged commit af85477 into fsfe:main May 6, 2024
14 checks passed
Comment on lines +13 to +14
SPDX-FileCopyrightText = "2017 Free Software Foundation Europe e.V. <https://fsfe.org>"
SPDX-License-Identifier = "GPL-3.0-or-later"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not that big of a fan of how verbose these keys are, and how they don't follow the style of the other keys. Maybe something like this would make more sense?

copyright_text = "2017 Free Software Foundation Europe e.V. <https://fsfe.org>"
license_identifier = "GPL-3.0-or-later"

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or should I move this concern/comment to https://github.com/fsfe/reuse-website?

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.

Define an order of precedence + provide a means to override it (REUSE.yaml)
3 participants