clearlydefined / clearlydefined/crawler

[pypi] spdxcorrect is too aggressive for declaredLicense

Open
#273 3 comments 0 reactions 0 assignees View on GitHub
bug Declared License Issue reproducible
Dominant language
JavaScript
Stars
60
Forks
38
Avg merge
1h 49m
Merged PRs (30d)
1

Description

at https://github.com/clearlydefined/crawler/blob/master/providers/fetch/pypiFetch.js#L77

```js
_extractDeclaredLicense(registryData) {
const classifiers = get(registryData, 'info.classifiers')
if (!classifiers) return null
for (const classifier in classifiers) {
if (classifiers[classifier].includes('License :: OSI Approved ::')) {
const lastColon = classifiers[classifier].lastIndexOf(':')
const rawLicense = classifiers[classifier].slice(lastColon + 1)
return spdxCorrect(rawLicense)
}
}
return null
}
```

For example https://pypi.org/pypi/Flask/json

looks at info.classifiers and pulls out

```
"License :: OSI Approved :: BSD License",
```

runs spdx-correct on `BSD License` => `BSD-2-Clause`
when it should be `BSD-3-Clause`

We should probably drop this from the crawler side entirely and let the summarizers parse the data without spdx correct

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.