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

Machine-readable output #22

Merged
merged 54 commits into from
Nov 12, 2024
Merged

Machine-readable output #22

merged 54 commits into from
Nov 12, 2024

Conversation

m-aXimilian
Copy link
Contributor

@m-aXimilian m-aXimilian commented Nov 8, 2024

ToDos

  • add schema for xml and json
  • add tests (i.e., "basic output works")
  • add schema validation tests
  • add documentation

Description

This PR introduces a new encoding switch to choose how the CZICheck's result should be emitted to the output.
The switch is exposed as a command line parameter --encoding (-e for short).
One can choose between text (the default and the status quo, i.e., human readable text), json which will emit a json encoded result, and xml which will emit xml-encoded output.
To achieve this, the dependencies rapidjson and pugiXML are introduces to the project.

Note: libxo, as suggested in issue #16 has some shortcomings regarding cross-platform builds (Windows especially). This is why other libraries were used.

Fixes #16 , #23

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Describe the tests that you ran to verify your changes.
Provide instructions to reproduce.

Checklist:

  • I followed the Contributing Guidelines.
  • I did a self-review.
  • I commented my code, particularly in hard-to-understand areas.
  • I updated the documentation.
  • I have added tests that prove my fix is effective or that my feature works.
  • New and existing unit tests pass locally with my changes.

@m-aXimilian m-aXimilian added the cla Contributor License Agreement sent to Admin label Nov 8, 2024
@ptahmose
Copy link
Contributor

ptahmose commented Nov 9, 2024

version-number and version history need a bump

Copy link
Contributor

@ptahmose ptahmose left a comment

Choose a reason for hiding this comment

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

LGTM!
Please consider my remarks and suggestions.

ptahmose
ptahmose previously approved these changes Nov 11, 2024
Copy link
Contributor

@ptahmose ptahmose left a comment

Choose a reason for hiding this comment

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

LGTM

ptahmose
ptahmose previously approved these changes Nov 11, 2024
@m-aXimilian m-aXimilian requested a review from ptahmose November 11, 2024 16:16
ptahmose
ptahmose previously approved these changes Nov 11, 2024
ptahmose
ptahmose previously approved these changes Nov 12, 2024
@m-aXimilian
Copy link
Contributor Author

I have updated the test script to check (and create) expected results for json and XML output as well in this update
and the respective "good results" in this update
@ptahmose what do you think?

@m-aXimilian m-aXimilian merged commit e633b7a into ZEISS:main Nov 12, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla Contributor License Agreement sent to Admin
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proposal: machine-readable output
2 participants