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-442] change CLI to read version from document #446

Conversation

armintaenzertng
Copy link
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>
Copy link
Collaborator

@meretp meretp left a comment

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?

@@ -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
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
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
Collaborator Author

SPDXParsingErrors are excepted now :)

@meretp
Copy link
Collaborator

meretp commented Jan 26, 2023

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.

None yet

2 participants