Skip to content

Add JSON, YAML and XML writing and parsing support #96

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

Merged
merged 23 commits into from
Aug 28, 2019

Conversation

xavierfigueroav
Copy link
Collaborator

@xavierfigueroav xavierfigueroav commented Apr 5, 2019

  1. Add JSON, YAML and XML writers (json.py, yaml.py and xml.py in spdx/writers/)
  2. Add JSON, YAML and XML parsers and builders (jsonyamlxml.py and jsonyamlxmlbuilders.py in spdx/parsers/)

Signed-off-by: Xavier Figueroa xavierfigueroav@gmail.com

@xavierfigueroav xavierfigueroav changed the title Add JSON and YAML writing and parsing support Add YAML writing and parsing support Apr 5, 2019
setup.py Outdated
@@ -24,6 +24,7 @@ def test_suite():
'ply',
'rdflib',
'six',
'ruamel.yaml',
Copy link
Member

Choose a reason for hiding this comment

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

Please do not use that YAML parser: it requires a native and a C compiler. Use PyYaml instead

Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

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

Thanks. I think you are missing some tests?

Copy link
Collaborator

@krysnuvadga krysnuvadga left a comment

Choose a reason for hiding this comment

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

Just by having a quick glance, you might want to add support py3

@xavierfigueroav
Copy link
Collaborator Author

xavierfigueroav commented Apr 15, 2019

Just by having a quick glance, you might want to add support py3

@krysnuvadga You mean the example files only, right?

@xavierfigueroav
Copy link
Collaborator Author

@pombredanne @pombredanne I've made the changes requested. Please, let me know if something is wrong or missing

@pombredanne pombredanne changed the title Add YAML writing and parsing support Add YAML and JSON writing and parsing May 31, 2019
@xavierfigueroav xavierfigueroav changed the title Add YAML and JSON writing and parsing Add JSON, YAML and XML writing and parsing support Jun 21, 2019
@xavierfigueroav xavierfigueroav force-pushed the master branch 3 times, most recently from 4890ed7 to 23dfe4b Compare August 23, 2019 02:08
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
…YAML.

Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
… them.

Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
- '-or-later' instead of '+'
- '-only' instead of nothing

Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Modify tests to support Snippet information.

Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Add library 'xmltodict' as dependency in setup.py file.
Change the name of base writers, parsers and builders to indicate the XML support.

Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
…ML formats.

Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
Signed-off-by: Xavier Figueroa <xavierfigueroav@gmail.com>
@xavierfigueroav
Copy link
Collaborator Author

@pombredanne this is ready for review. Please check!

@pombredanne
Copy link
Member

@xavierfigueroav thank you!

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
Add missing notices
Organize and sorts imports
Import proper __future__

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne
Copy link
Member

I pushed a few cleanup commits. Please review

@xavierfigueroav
Copy link
Collaborator Author

@pombredanne Everything looks great!

Also remove __main__ from test code

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
This is mostly trimming extra white spaces.

Signed-off-by: Philippe Ombredanne <pombredanne@nexb.com>
@pombredanne pombredanne merged commit cee204f into spdx:master Aug 28, 2019
@pombredanne
Copy link
Member

All merged now. Thank you ++

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.

3 participants