aboutcode-org / aboutcode-org/license-expression

Simplification drops essential parts of expressions

Open
#124 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
73
Forks
33
PR merge metrics
No merged PRs in 30d

Description

I am using the *license-expression* library to feed it a large string of licenses from different package files to propose a derived package license. Unfortunately, this approach omits important licenses.

Let's consider the following example:

```
>>> from license_expression import get_spdx_licensing
>>> licensing = get_spdx_licensing()
>>> expression = "MIT AND BSD-3-Clause AND (MIT OR GPL-2.0-or-later OR (Apache-2.0 AND BSD-2-Clause)) AND MIT"
>>> parsed = licensing.parse(expression)
>>> str(parsed.simplify())
BSD-3-Clause AND MIT
>>> expression = "MIT AND BSD-3-Clause AND (MIT OR GPL-2.0-or-later OR Apache-2.0) AND MIT"
>>> parsed = licensing.parse(expression)
>>> str(parsed.simplify())
BSD-3-Clause AND MIT
```

As we can see, the whole OR sections have been removed, which would imply I already exercised a choice, which is not the case.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.