tools-python icon indicating copy to clipboard operation
tools-python copied to clipboard

SPDX3: data license should be a URI

Open armintaenzertng opened this issue 2 years ago • 6 comments

The data license is currently only serialized as CC0-1.0, but should be the complete URI.

armintaenzertng avatar Jun 07 '23 06:06 armintaenzertng

Hey there! Can you please provide me with some context about the PR?

harshkasat avatar Feb 05 '24 06:02 harshkasat

@maxhbr - can you add some background here?

kestewart avatar Feb 05 '24 13:02 kestewart

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 avatar Feb 05 '24 15:02 maxhbr

@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.

harshkasat avatar Feb 05 '24 20:02 harshkasat

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.

zvr avatar Feb 06 '24 01:02 zvr

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?

harshkasat avatar Feb 13 '24 18:02 harshkasat