SPDX3: data license should be a URI
The data license is currently only serialized as CC0-1.0, but should be the complete URI.
Hey there! Can you please provide me with some context about the PR?
@maxhbr - can you add some background here?
Hey, the value of the data license is currently the plain string "CC0-1.0" but it needs to be the SPDX ID of the individual, that is the license.
@maxhbr Hey, What I understand is data_license = 'CC0-1.0' hard code in all file. To resolve this issue we have to make in all files
data_license = DOCUMENT_SPDX_ID(from spdx_tools.spdx.constants import DOCUMENT_SPDX_ID = "SPDXRef-DOCUMENT")
- Also in the Validation file
# Before
if creation_info.data_license != "CC0-1.0":
validation_messages.append(
ValidationMessage(f'data_license must be "CC0-1.0", but is: {creation_info.data_license}', context)
)
# After
if creation_info.data_license != DOCUMENT_SPDX_ID:
validation_messages.append(
ValidationMessage(f'data_license must be "{DOCUMENT_SPDX_ID}", but is: {creation_info.data_license}', context)
)
- If I have missed anything, please update me. And if I have made any mistakes, please let me know. Sorry for Incovince.
Sorry, but it's more complicated than that. Since it was decided that in SPDXv3 the data license need not be CC-1.0, it can be any license. Actually, it can be an arbitrary license expressions, like CC-1.0 OR MIT OR CC-BY-SA-4.0 (not to mention it may include LicenseRef mentions).
So please don't think it as simply "it should be an URI of a single license".
I don't know how license expressions are currently handled internally or serialized, but that's what has to happen for the value of this property.
@harshkasat , the value of data license has nothing to do with the document id.
Can you guide me on how to solve this issue? Can you also provide some references so I can gain context(file) about the issue to raise the pr?