Skip to content

Determine whether license info added/removed #29 - #39

Merged
steven-esser merged 5 commits into
developfrom
29-license-info-added-removed
Dec 21, 2017
Merged

Determine whether license info added/removed #29#39
steven-esser merged 5 commits into
developfrom
29-license-info-added-removed

Conversation

@johnmhoran

Copy link
Copy Markdown
Member
  • Refactor Delta._license_diff() and Delta.to_dict().
  • Check for license info added/removed before creating and checking cutoff score lists: catch changes where relevant score(s) < cutoff_score.
  • Refactor failing tests, add six new tests.

  * Refactor Delta._license_diff() and Delta.to_dict().
  * Refactor failing tests, add six new tests.

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
  * Check for license info added/removed before creating and
    checking cutoff score lists.

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
  * Modified definitions of 'new_licenses' and 'old_licenses' to
    delete "or []" -- appears not to be needed.
  * Modified test for "license info added"/"license info removed"
    where relevant score(s) < 'cutoff_score'.

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
  * In '_license_diff()', reverted to prior definitions of
    'new_licenses' and 'old_licenses' by including "or []".

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
Comment thread src/deltacode/__init__.py Outdated
elif len(old_keys) == 0:
self.category = 'license info added'
else:
self.category = 'license change'

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We should not need to worry about info add or removed at this point in the code; this is already taken care of on line 187-190

Comment thread tests/test_deltacode.py Outdated
@@ -469,7 +490,7 @@ def test_Delta_license_diff_missing_diff_low_score_new(self):
result = deltacode.Delta(new_file, old_file, 'modified')
#result.license_diff()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

we can remove this comment.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

That comment actually appears in 10 different tests -- I'll delete each of them.

Signed-off-by: John M. Horan <johnmhoran@gmail.com>
@steven-esser
steven-esser merged commit 9a963f4 into develop Dec 21, 2017
@steven-esser
steven-esser deleted the 29-license-info-added-removed branch December 21, 2017 23:04
arnav-mandal1234 pushed a commit to arnav-mandal1234/deltacode that referenced this pull request Mar 16, 2023
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.

2 participants