Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SPDX IDs for licenses on the OSI website #84

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goneall
Copy link
Contributor

@goneall goneall commented Apr 24, 2023

Fixes #62

Adds SPDX ID's for licenses on the OSI license list with the exception of Unicode Data Files and Software License (Unicode-DFS-2016). I could not find an associated OSI license ID for this license.

@goneall
Copy link
Contributor Author

goneall commented Apr 24, 2023

Note: the compile.py fails for this pull request with the following error:

Failure to validate CERN-OHL-P
Traceback (most recent call last):
  File "compile.py", line 120, in <module>
    load_licenses(*sys.argv[1:])
  File "compile.py", line 110, in load_licenses
    data = list(sorted(validate(merge_stream(licenses)), key=lambda x: x['id']))
  File "compile.py", line 86, in validate
    valid_schema(el)
  File "compile.py", line 79, in valid_schema
    validictory.validate(obj, schema)
  File "C:\Users\gary\git\licenses\venv\lib\site-packages\validictory\__init__.py", line 43, in validate
    return v.validate(data, schema)
  File "C:\Users\gary\git\licenses\venv\lib\site-packages\validictory\validator.py", line 618, in validate
    self.__validate("data", {"data": data}, schema, '<obj>')
  File "C:\Users\gary\git\licenses\venv\lib\site-packages\validictory\validator.py", line 660, in __validate
    validator(data, fieldname, schema, path, newschema.get(schemaprop))
  File "C:\Users\gary\git\licenses\venv\lib\site-packages\validictory\validator.py", line 292, in validate_properties
    self.__validate(property, value, properties.get(property),
  File "C:\Users\gary\git\licenses\venv\lib\site-packages\validictory\validator.py", line 660, in __validate
    validator(data, fieldname, schema, path, newschema.get(schemaprop))
  File "C:\Users\gary\git\licenses\venv\lib\site-packages\validictory\validator.py", line 336, in validate_required
    self._error("Required field '{fieldname}' is missing", None, path, path=path,
  File "C:\Users\gary\git\licenses\venv\lib\site-packages\validictory\validator.py", line 206, in _error
    raise err
validictory.validator.RequiredFieldValidationError: Required field '<obj>.name' is missing

@waldyrious - is this due to the license ID not being defined in the metadata elsewhere?

@waldyrious
Copy link
Contributor

waldyrious commented Apr 24, 2023

@goneall Sorry, I don't think I can help here. Perhaps you've pinged the wrong person?

@goneall
Copy link
Contributor Author

goneall commented Apr 24, 2023

@webmink Can you take a look at the above failure and let me know any thoughts?

@waldyrious - Sorry about the incorrect ping - darn autocomplete!

@webmink
Copy link
Member

webmink commented Apr 26, 2023

No clue, sorry - best to try to summon @paultag and @zacchiro for actual code problems.

@nickvidal
Copy link
Member

nickvidal commented Apr 26, 2023

Looking at this project for the first time. To my understanding, the CERN/Mulan/... licenses should introduce changes to these 3 paths:

  • licenses/manual/...
  • licenses/spdx/importedSpdxFiles.json
  • texts/plain/...

@paultag
Copy link
Collaborator

paultag commented Apr 27, 2023

@goneall tldr: yes

The purpose of compile.py is to merge all the JSON files into a single JSON file, which has a single complete record for each OSI approved license.

schema/license.json is the schema. Some fields are required, which means they must be present, and some are validated if they are present (for instance, if there is a URL in a link, make sure it's a string not a bool, etc).

I've lost the recent updates; if the licenses in this PR are OSI approved, they likely need complete records, including (as noted above) copies of the license texts, not just the crosswalk to other license databases. If these licenses are not OSI approved, we should not add them to this repo.

Unrelated: validictory is failing on my python3 due to collections moving Mapping/Container to collections.abc -- we likely need a bug and PR to move to jsonschema instead. I'll file a bug for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing SPDX identifier data
5 participants