-
Notifications
You must be signed in to change notification settings - Fork 149
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
Fix the REUSE.toml performance regression (+ do a whole lot of refactoring) #1047
Commits on Sep 18, 2024
-
Remove bidirectional aggregation between VCSStrategy and Project
Hooray! This had always been bad design. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for d9a2b51 - Browse repository at this point
Copy the full SHA d9a2b51View commit details -
Refactor iter_files out of Project
This is kind of annoying, but it is necessary for some work I want to do in global_licensing. Fortunately this was surprisingly easy; iter_files is the first function ever written for REUSE, so I expected that it would be more tangled up. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for 9036904 - Browse repository at this point
Copy the full SHA 9036904View commit details -
Factor out iter_files into its own module covered_files
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for 3b25418 - Browse repository at this point
Copy the full SHA 3b25418View commit details -
Create fixture subproject_repository
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for a8a1f28 - Browse repository at this point
Copy the full SHA a8a1f28View commit details -
Fix performance regression when searching for REUSE.toml
Previously, the glob **/REUSE.toml would search _all_ directories, including big directories containing build artefacts that are otherwise ignored by VCS. This commit uses the same logic to find REUSE.toml as any other file is found. It's not super rapid, but it does a heap more filtering. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for f087082 - Browse repository at this point
Copy the full SHA f087082View commit details -
Convert Project into attrs class
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for 5651081 - Browse repository at this point
Copy the full SHA 5651081View commit details -
Get errant source from exception instead of find_global_licensing
In _main, find_global_licensing was called to find the file that contained some parsing error. This may have contained false information in the case of multiple REUSE.tomls. Instead of needlessly calling this function, the errant file is now an attribute on the exception. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for 8280798 - Browse repository at this point
Copy the full SHA 8280798View commit details -
Previously this function would be called three times on a lint: - once by NestedReuseTOML.find_reuse_tomls in Project.find_global_licensing - once by NestedReuseTOML.find_reuse_tomls in NestedReuseTOML.from_file - once to lint all the files I now no longer use NestedReuseTOML.from_file. It's still not ideal to go over all files twice, but it's better than thrice. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for a8be9db - Browse repository at this point
Copy the full SHA a8be9dbView commit details -
Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for 455fad9 - Browse repository at this point
Copy the full SHA 455fad9View commit details -
This cleanup is the result of a rebase. It would be more effort to incorporate these fixes into their original commits. Signed-off-by: Carmen Bianca BAKKER <carmenbianca@fsfe.org>
Configuration menu - View commit details
-
Copy full SHA for 9a237f4 - Browse repository at this point
Copy the full SHA 9a237f4View commit details