Skip to content

Conversation

@meretp
Copy link
Collaborator

@meretp meretp commented Apr 17, 2023

… or "NONE" correctly
The issue is only related to the homepage field, while working on the fix, I noticed that the issue also applies to other fields.

fixes #589

Copy link
Collaborator

@armintaenzertng armintaenzertng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! :)
I have a small remark that I don't feel very strongly about.

Comment on lines +21 to +58
"homepage, expected_homepage, download_location, expected_download_location, "
"copyright_text, expected_copyright_text, originator, expected_originator, supplier, expected_supplier",
[
(
"http://ftp.gnu.org/gnu/glibc",
"http://ftp.gnu.org/gnu/glibc",
"NOASSERTION",
SpdxNoAssertion(),
"NONE",
SpdxNone(),
"Organization: ExampleCodeInspect ([email protected])",
Actor(ActorType.ORGANIZATION, "ExampleCodeInspect", "[email protected]"),
"NOASSERTION",
SpdxNoAssertion(),
),
(
"NOASSERTION",
SpdxNoAssertion(),
"NONE",
SpdxNone(),
"Copyright 2008-2010 John Smith",
"Copyright 2008-2010 John Smith",
None,
None,
None,
None,
),
(
"NONE",
SpdxNone(),
"http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
"http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz",
"NOASSERTION",
SpdxNoAssertion(),
"NOASSERTION",
SpdxNoAssertion(),
"Person: Jane Doe ([email protected])",
Actor(ActorType.PERSON, "Jane Doe", "[email protected]"),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is kind of hard to comprehend due to the scrambling of normal, none and no assertion cases. I get that this might make the test cases more diverse, but I don't think it is really worth it compared to just having test cases where all values are normal values or None/NONE etc.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, my intention was to make the test cases more diverse. I think both options doesn't really make a difference and as they are also just test cases I would stick to the current implementation and merge it like that.

@meretp meretp merged commit d9a2e01 into spdx:main Apr 18, 2023
@meretp meretp deleted the issue-589 branch April 18, 2023 06:58
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.

JSON parser: homepage of package not parsed correctly

2 participants