feat: Add license and SPDX identifier#446
Conversation
cd85c8b to
d22bcd6
Compare
There was a problem hiding this comment.
Pull request overview
This PR adds functionality to map Maven license names to SPDX identifiers and automatically detect license files in source packages, addressing issues #12 and #6.
Changes:
- Adds a new
LicenseMapperclass with a comprehensive YAML mapping of Maven license names to SPDX identifiers - Modifies the
Packageclass to detect LICENSE, COPYING, and COPYRIGHT files and include them in generated spec files - Updates test infrastructure to configure git identity more reliably for unit tests
- Adds comprehensive test coverage for the new license mapping and detection functionality
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
lib/tetra/license_mapper.rb |
New mapper class to convert Maven license names to SPDX identifiers |
lib/tetra/data/license_map.yml |
Comprehensive mapping of ~100 license name variants to SPDX identifiers |
lib/tetra/constants.rb |
Adds constant for license map file path |
lib/tetra/packages/package.rb |
Adds license mapping method and license file detection |
lib/template/package.spec |
Updates spec template to include detected license files |
lib/tetra.rb |
Adds YAML require and license_mapper require |
spec/spec_helper.rb |
Refactors git configuration for tests to use local repo config |
spec/lib/fine/package_spec.rb |
Adds tests for license mapping and file detection |
spec/lib/fine/license_mapper_spec.rb |
New test file for license mapper functionality |
spec/lib/coarse/license_detection_spec.rb |
New integration tests for end-to-end license handling |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #446 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 20 22 +2
Lines 849 942 +93
=========================================
+ Hits 849 942 +93 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4a89f06 to
8bfd277
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 10 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6823728 to
88c6704
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Tests have passed. I am now squashing the last commit into the first one and merge then without waiting for the tests to pass again. They will nevertheless run once merged to master. |
Fixes - uyuni-project#12 - uyuni-project#6 Signed-off-by: Dominik Gedon <dominik.gedon@suse.com>
Signed-off-by: Dominik Gedon <dominik.gedon@suse.com>
|



Fixes