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 456 add rdf parser #469

Merged
merged 43 commits into from
Feb 22, 2023

Conversation

meretp
Copy link
Collaborator

@meretp meretp commented Feb 9, 2023

fixes #456

Signed-off-by: Meret Behrens meret.behrens@tngtech.com

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
@meretp meretp marked this pull request as draft February 9, 2023 14:08
…on, yaml, xml and rdf parsing

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
@meretp meretp force-pushed the issue-456-add-rdf-parser branch 3 times, most recently from f163c45 to ef61acf Compare February 9, 2023 14:56
@meretp meretp marked this pull request as ready for review February 9, 2023 14:58
@meretp meretp force-pushed the issue-456-add-rdf-parser branch from 158a28a to e578450 Compare February 14, 2023 15:05
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 effort! :)
Looks very good to me overall, but I have a few details to go over again.

src/spdx/parser/rdf/graph_parsing_functions.py Outdated Show resolved Hide resolved
src/spdx/casing_tools.py Outdated Show resolved Hide resolved
tests/spdx/parser/rdf/test_rdf_parser.py Outdated Show resolved Hide resolved
tests/spdx/parser/rdf/test_annotation_parser.py Outdated Show resolved Hide resolved
tests/spdx/parser/rdf/test_creation_info_parser.py Outdated Show resolved Hide resolved
src/spdx/parser/rdf/package_parser.py Outdated Show resolved Hide resolved
src/spdx/parser/rdf/package_parser.py Outdated Show resolved Hide resolved
src/spdx/parser/rdf/package_parser.py Outdated Show resolved Hide resolved
src/spdx/parser/rdf/package_parser.py Outdated Show resolved Hide resolved
src/spdx/parser/rdf/snippet_parser.py Outdated Show resolved Hide resolved
@meretp meretp force-pushed the issue-456-add-rdf-parser branch 2 times, most recently from c99aa82 to 868461b Compare February 20, 2023 12:42
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 addressing the issues :)
I have two small remarks left

src/spdx/parser/rdf/creation_info_parser.py Outdated Show resolved Hide resolved
parsing_method=str)
cross_references = []
for (_, _, cross_reference_node) in graph.triples((extracted_licensing_info_node, RDFS.seeAlso, None)):
cross_references.append(cross_reference_node.toPython())
Copy link
Collaborator

Choose a reason for hiding this comment

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

makes sense, let's keep it that way :)

src/spdx/parser/rdf/snippet_parser.py Outdated Show resolved Hide resolved
@meretp meretp force-pushed the issue-456-add-rdf-parser branch from 51bfd7c to c7860ad Compare February 21, 2023 13:05
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.

Sorry, but there is still an issue with the range parser...

src/spdx/parser/rdf/snippet_parser.py Outdated Show resolved Hide resolved
src/spdx/parser/rdf/snippet_parser.py Outdated Show resolved Hide resolved
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.

Well then, off we go! :D

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…it is used in the parser and writer layer

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…paces prefix to the short identifier

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…helper method

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
extract method to apply parsing method or log error, change order of parameters, rename method_to_apply -> parsing_method

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
… as license expression (could be ListedLicense, ExtractedLicensingInfo or simple reference)

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…tly only supports SPDX 2.3

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…l helper method, rename argument

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…r json,yaml,xml and rdf parsing

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…, reformat

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…and Python 3.8

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…nctiveLicenseSet

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…eading/ trailing whitespaces in string values

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
The return value of err.args[0] is a string, so we need to use append to add this string to the list of messages in the logger.

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
…e general helper method

Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
Signed-off-by: Meret Behrens <meret.behrens@tngtech.com>
@meretp meretp force-pushed the issue-456-add-rdf-parser branch from b34f727 to 1cbe629 Compare February 22, 2023 10:17
@meretp meretp merged commit 872ab59 into spdx:refactor-python-tools Feb 22, 2023
@meretp meretp deleted the issue-456-add-rdf-parser branch February 22, 2023 10:21
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.

2 participants