Add required phrase rules automatically#3254
Closed
AyanSinhaMahapatra wants to merge 15 commits intodevelopfrom
Closed
Add required phrase rules automatically#3254AyanSinhaMahapatra wants to merge 15 commits intodevelopfrom
AyanSinhaMahapatra wants to merge 15 commits intodevelopfrom
Conversation
Add a script which can add required phrases in already existing rules automatically from license field names, and can do this one license expression at a time. Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
These were added automatically by the script added at etc/scripts/licenses/add_required_phrases.py Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
7e8b972 to
48370a5
Compare
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
* moves the script to licensedcode * adds a new console script `add-required-phrases` * move the functions and tests to seperate files Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
3 tasks
pombredanne
reviewed
Aug 19, 2024
Member
pombredanne
left a comment
There was a problem hiding this comment.
Here are some comments for your consideration.
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
66f2be5 to
f13b100
Compare
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
This is done only on `mit` rules, by running: add-required-phrases -ovr --license-expression "mit" Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
4fbbdcf to
623fe6c
Compare
623fe6c to
02157f0
Compare
pombredanne
reviewed
Aug 29, 2024
Member
pombredanne
left a comment
There was a problem hiding this comment.
Some minor nits and a question on the is_required_phrase flag for your consideration!
| 'but is an essential section of the rule text which must be ' | ||
| 'present in the case of partial matches, otherwise the match ' | ||
| 'will be a false positive and misleading.') | ||
| ) |
Member
There was a problem hiding this comment.
I wonder if this would not be best computed an index time ... this is True if a rule text is entirely a required phrase, this would mean one less stored flag.
02157f0 to
c427e01
Compare
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
c427e01 to
04ae85d
Compare
Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
This was referenced Sep 10, 2024
4 tasks
Member
Author
|
Closing this as we now have #3924 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference: #2637 #2878
Tasks
Run tests locally to check for errors.