Skip to content

[issue-442] change CLI to read version from document#446

Merged
armintaenzertng merged 2 commits into
spdx:refactor-python-toolsfrom
armintaenzertng:changeCLIversionLogic
Jan 26, 2023
Merged

[issue-442] change CLI to read version from document#446
armintaenzertng merged 2 commits into
spdx:refactor-python-toolsfrom
armintaenzertng:changeCLIversionLogic

Conversation

@armintaenzertng

Copy link
Copy Markdown
Collaborator

also print validation output to stderr

fixes #442

Signed-off-by: Armin Tänzer armin.taenzer@tngtech.com

also print validation output to stderr

Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>

@meretp meretp left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Looks good to me, only one (resp. two) additions from my side.

Looking at the changes I was wondering what happens if the parsed document doesn't have a version. From our implementation the parser would throw a SPDXParsingError whenever required fields are missing and maybe we also want to catch this to not print the whole stacktrace. What do you think?

Comment thread src/spdx/clitools/pyspdxtools.py Outdated
@@ -26,7 +26,7 @@
@click.command()
@click.option("--infile", "-i", prompt="input file path", help="The file containing the document to be validated or converted.")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Could you please also delete the prompt? I think we can do both of these changes within one PR that touches CLI.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

deleted

Signed-off-by: Armin Tänzer <armin.taenzer@tngtech.com>
@armintaenzertng

Copy link
Copy Markdown
Collaborator Author

SPDXParsingErrors are excepted now :)

@meretp

meretp commented Jan 26, 2023

Copy link
Copy Markdown
Collaborator

Perfect, thanks!

@armintaenzertng armintaenzertng merged commit d53df99 into spdx:refactor-python-tools Jan 26, 2023
@armintaenzertng armintaenzertng deleted the changeCLIversionLogic branch January 26, 2023 10:26
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