Add required phrase rules automatically - #3254
Closed
AyanSinhaMahapatra wants to merge 15 commits into
Closed
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 <ayansmahapatra@gmail.com>
These were added automatically by the script added at etc/scripts/licenses/add_required_phrases.py Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
pombredanne
marked this pull request as draft
April 24, 2023 15:45
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra
force-pushed
the
required-phrase-rules
branch
from
November 17, 2023 12:43
7e8b972 to
48370a5
Compare
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
* 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 <ayansmahapatra@gmail.com>
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
pombredanne
reviewed
Aug 19, 2024
pombredanne
left a comment
Member
There was a problem hiding this comment.
Here are some comments for your consideration.
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra
force-pushed
the
required-phrase-rules
branch
from
August 21, 2024 10:00
66f2be5 to
f13b100
Compare
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
This is done only on `mit` rules, by running: add-required-phrases -ovr --license-expression "mit" Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra
force-pushed
the
required-phrase-rules
branch
from
August 28, 2024 21:27
4fbbdcf to
623fe6c
Compare
AyanSinhaMahapatra
force-pushed
the
required-phrase-rules
branch
from
August 28, 2024 21:57
623fe6c to
02157f0
Compare
pombredanne
reviewed
Aug 29, 2024
pombredanne
left a comment
Member
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.
AyanSinhaMahapatra
force-pushed
the
required-phrase-rules
branch
from
August 30, 2024 06:57
02157f0 to
c427e01
Compare
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
AyanSinhaMahapatra
force-pushed
the
required-phrase-rules
branch
from
August 30, 2024 07:01
c427e01 to
04ae85d
Compare
Signed-off-by: Ayan Sinha Mahapatra <ayansmahapatra@gmail.com>
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.