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

[issue-547] fix rdf parser #549

Merged
merged 1 commit into from Mar 30, 2023
Merged

[issue-547] fix rdf parser #549

merged 1 commit into from Mar 30, 2023

Conversation

meretp
Copy link
Collaborator

@meretp meretp commented Mar 30, 2023

Use licenseID from extracted licensing info URIRef if no licenseId node is provided.

fixes #547

Copy link
Collaborator

Choose a reason for hiding this comment

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

We should have two tests, one for each case of how the license Id could be present.

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, I have added a test for this.

],
)
def test_parse_extracted_licensing_info(
parent_node_object, license_id, extracted_text, comment, license_name, cross_references
Copy link
Collaborator

Choose a reason for hiding this comment

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

parent_node_object seems to be unused

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

deleted

Comment on lines 23 to 28
(
SPDX_NAMESPACE.SpdxDocument,
"LicenseRef-1",
"extractedText",
"licenseComment",
"licenseName",
["https://see.also"],
),
(
SPDX_NAMESPACE.Package,
"LicenseRef-2",
"extractedText",
"licenseComment",
"another license",
["https://see.also"],
Copy link
Collaborator

Choose a reason for hiding this comment

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

It might be helpful to give a quick explanation of the issue at hand for future developers, i.e. what's the difference between the two test cases.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done

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, looks good now :)

…RIRef if no licenseId node is provided

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
@meretp meretp merged commit 8da3a32 into spdx:main Mar 30, 2023
32 checks passed
@meretp meretp deleted the issue-547 branch March 30, 2023 15:55
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 omits ID of extracted licensing info
2 participants