aboutcode-org / aboutcode-org/license-expression

Simplification drops essential parts of expressions

Đang mở
#124 3 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
73
Fork
33
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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.

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.