diff --git a/.gitignore b/.gitignore index 82f9275..8852b52 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ __pycache__/ *.py[cod] *$py.class +# internal test files +*.tmp + # C extensions *.so @@ -160,3 +163,4 @@ cython_debug/ # and can be added to the global gitignore or merged into this file. For a more nuclear # option (not recommended) you can uncomment the following to ignore the entire idea folder. #.idea/ + diff --git a/licomp_toolkit/suggester.py b/licomp_toolkit/suggester.py index 0851ca1..1e66124 100644 --- a/licomp_toolkit/suggester.py +++ b/licomp_toolkit/suggester.py @@ -134,12 +134,12 @@ def compat_licenses(self, license_expr, usecase, provisioning, licenses_to_check usecase, provisioning, resources) + if ret['compatibility'] == 'yes': + compats.append(lic) + logging.debug(f' appending: {lic}') except Exception as e: logging.debug(f'Exception caught: {e}') logging.debug(traceback.format_exc()) - if ret['compatibility'] == 'yes': - compats.append(lic) - logging.debug(f' appending: {lic}') # decorate compat list with indices (from rankings) decorated = [(self.__compat_index(lic, usecase, provisioning), lic) for lic in compats] diff --git a/licomp_toolkit_test.tmp b/licomp_toolkit_test.tmp deleted file mode 100644 index 28f1d68..0000000 --- a/licomp_toolkit_test.tmp +++ /dev/null @@ -1,5 +0,0 @@ -digraph depends { - graph [label="License Compatibility Graph (library)" labelloc=t] - node [shape=plaintext] - "MIT" -> "BSD-3-Clause" [dir="both" color="darkgreen" ] -}