Skip to content

Commit

Permalink
Some tweaks based on beta trials in snovault.
Browse files Browse the repository at this point in the history
  • Loading branch information
netsettler committed Jul 28, 2023
1 parent 902f5c6 commit 24276de
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
10 changes: 8 additions & 2 deletions dcicutils/license_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,8 @@ class MyOrgLicenseChecker(LicenseChecker):
if analysis.unexpected_missing:
warnings.warn(there_are(analysis.unexpected_missing, kind='unexpectedly missing license', punctuate=True))
if analysis.no_longer_missing:
warnings.warn(there_are(analysis.no_longer_missing, kind='no-longer-missing license', punctuate=True))
# This is not so major as to need a warning, but it's still something that should show up somewhere.
PRINT(there_are(analysis.no_longer_missing, kind='no-longer-missing license', punctuate=True))
for message in analysis.miscellaneous:
warnings.warn(message)
if analysis.unacceptable:
Expand Down Expand Up @@ -703,6 +704,11 @@ class C4InfrastructureLicenseChecker(LicenseChecker):
# Ref: https://github.com/getsentry/responses/blob/master/LICENSE
'responses',

# This seems to get flagged sometimes, but is not the pypi snovault library, it's what our dcicsnovault
# calls itself internally.. In any case, it's under MIT license and OK.
# Ref: https://github.com/4dn-dcic/snovault/blob/master/LICENSE.txt
'snovault',

# PyPi identifies the supervisor library license as "BSD-derived (http://www.repoze.org/LICENSE.txt)"
# Ref: https://pypi.org/project/supervisor/
# In fact, though, the license is a bit more complicated, though apparently still permissive.
Expand All @@ -711,7 +717,7 @@ class C4InfrastructureLicenseChecker(LicenseChecker):

# This seems to be a BSD-3-Clause-Modification license.
# Ref: https://github.com/Pylons/translationstring/blob/master/LICENSE.txt
'translationstring',
# 'translationstring',

# This seems to be a BSD-3-Clause-Modification license.
# Ref: https://github.com/Pylons/venusian/blob/master/LICENSE.txt
Expand Down
5 changes: 3 additions & 2 deletions test/test_license_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,8 @@ def checker(printed, license_warnings):
' Bar License: library2, library8, libraryA, libraryB',
' Baz License: library4, library7, library9',
' Big-Org-Approved: libraryB',
' Misc-Copyleft: libraryD']
' Misc-Copyleft: libraryD',
'There is 1 no-longer-missing license: library1.']

javascript_failure = None
for warning in license_warnings:
Expand All @@ -342,7 +343,7 @@ def checker(printed, license_warnings):

assert edited_license_warnings == [
"There is 1 unexpectedly missing license: library6.",
"There is 1 no-longer-missing license: library1.",
# "There is 1 no-longer-missing license: library1.",
]

do_it()
Expand Down

0 comments on commit 24276de

Please sign in to comment.