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

Merge JSON saving into main #104

Merged
merged 36 commits into from Feb 21, 2022
Merged

Merge JSON saving into main #104

merged 36 commits into from Feb 21, 2022

Conversation

swinslow
Copy link
Member

This merges the GSoC work by @specter25 into the main branch in anticipation of the upcoming 0.3.0 release. Thank you @specter25 for all your hard work, and apologies that I was delayed in merging it!

This will enable saving SPDX JSON 2.2 documents from the SPDX tools-golang in-memory data model.

There are still a couple of bugs I'd like to chase down before releasing 0.3.0 (see #103), but this should be ready for others to kick the tires and see if you're finding other issues.

specter25 and others added 30 commits July 8, 2021 22:21
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- parsed other licenses from spdx.Doxument2_2 to json
- tests pending

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Saved annoations on the root document from struct to json
- unit tests pending

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Saved document describes from spdxStruct to json
- unit tests pending from this section

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- saved packages from spdx struct to json
- saved relationships froms spdx struct to json

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- parsed files information from struct to json
- unckaged files spdx map altered (find a fix around it )

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- save snippets information from spdx struct to json
- unit tests for render function pending

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Write bytes from bytes.buffer to io.Writer while parsing json

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Parse a jsonsaved file using jsonloader and fixx the bugs discovered

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Don't remove () suffix while parsing creator person and organization

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Unnecessary functioanlity of maintinging the order of properyies removed
- usage of map[string]interafce{} introduced

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
[GSoC'21] Pr:5 . Complete the JSON saver
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Unit Tests fro creation info function

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Write units tests for render functions for snippets ,packages , files , reviews , relationships ,annotations

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Checksums algorithm had to be parsed to string from spdx.ChecksumAlgorithm

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- added test to renderfile function
- added tests to renderrelationships function

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
- Check whether an entire spdx document is saved correctly or not

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
…tions

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
…xamples

- bug fixes in json saver done as well
- test covereage of jsonparser increased

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
[GSoC'21] Pr:6 . JSON saver tests
- bug fix : sort maos keys and then range over keys instead of maps
- to maintain order while savings properties as maps

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
specter25 and others added 6 commits August 13, 2021 20:18
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
[GSoC'21] Pr:7 . JSON saver bug fix
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
… original document

Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
Signed-off-by: Ujjwal Agarwal <ujjwalcoding012@gmail.com>
[GSoC'21] Pr:8 . JSON saver bug fixes and Documentation enhancements
@swinslow swinslow added this to the 0.3.0 milestone Feb 21, 2022
@swinslow swinslow merged commit 8c21574 into main Feb 21, 2022
@swinslow swinslow added the enhancement New feature or request label Mar 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants