Skip to content

Conversation

@meretp
Copy link
Collaborator

@meretp meretp commented May 12, 2023

fixes #650

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.

Thanks for the fix, I have a couple of questions, though.

# code that follows
value = graph.value(subject=subject, predicate=predicate, object=_object, default=default, any=_any)
if value and not isinstance(value, (URIRef, Literal, BNode)):
if value != _any and value and not isinstance(value, (URIRef, Literal, BNode)):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't get the value != _any part here. _any is a bool, why should it be equal to value?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, sorry, mixed the values here. This needs to be value != default. While working on this I noticed that an error about wrong types would be logged if a package has no files_analyzed field. This is as the changes you commented below not related to the origin issue and rather a fix for the wrapper methods introduced with #563. Shall I create a separate PR for these changes?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, please do :)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

#653
The PR should be merged first as the test in this PR fails without these changes.

@meretp meretp force-pushed the issue_650_fix_rdf_parser branch from 492af03 to ecdd0d1 Compare May 12, 2023 12:47
@meretp meretp force-pushed the issue_650_fix_rdf_parser branch from ecdd0d1 to 0f41ee0 Compare May 15, 2023 06:54
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.

Thanks! :)

@meretp meretp merged commit acf56a0 into spdx:main May 15, 2023
@meretp meretp deleted the issue_650_fix_rdf_parser branch May 15, 2023 07:15
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.

RDF-parser raises no error if an element has no SPDXID

2 participants