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

[GSoC'21] Pr:5 . Complete the JSON saver #92

Merged
merged 34 commits into from Jul 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
240e16a
Error on missing package and file ids in v2.2
specter25 Mar 27, 2021
07cb513
Error on missing package and file ids in v2.1
specter25 Mar 27, 2021
7985e5b
Structural changes in spdxId fix for package and files
specter25 Apr 4, 2021
4efac7b
Structural modifications in error checks
specter25 May 12, 2021
b5d1201
Units Tests in tvloader structured and a few tests added
specter25 May 12, 2021
92fed8b
Fix statement about docs license
swinslow Jun 10, 2021
8574b91
Merge pull request #70 from swinslow/fix-docs-license-stmt
swinslow Jun 12, 2021
9b060e5
Add relationship filter function
ianling Jun 15, 2021
5417bc9
Merge pull request #74 from ion-channel/relationship_filter_upstream
swinslow Jul 1, 2021
68f2720
Merge pull request #87 from spdx/json
swinslow Jul 4, 2021
b238c88
Minor cleanup edits to text and comments
swinslow Jul 4, 2021
edbff31
Merge pull request #64 from specter25/package-spdxId
swinslow Jul 4, 2021
03d00c5
Fix missing colon for excludes in PackageVerificationCode
swinslow Jul 4, 2021
fe1c1e7
Merge pull request #88 from swinslow/issue-86
swinslow Jul 4, 2021
bf2d184
Fix multi-line text wrapping fields
swinslow Jul 4, 2021
dedb0ab
Merge pull request #89 from swinslow/issue-76
swinslow Jul 4, 2021
043e522
Add release notes for 0.2.0
swinslow Jul 4, 2021
024866f
Update README and add release details for 0.1.0
swinslow Jul 4, 2021
9b311cc
Add missing SPDX license IDs and go fmt
swinslow Jul 4, 2021
18cda74
Merge pull request #90 from swinslow/issue-85
swinslow Jul 4, 2021
c2f61ea
Fix link to release notes
swinslow Jul 4, 2021
c872465
Merge pull request #91 from swinslow/fix-readme-link
swinslow Jul 4, 2021
2d6415b
JSONsaver : lay down initia setup of jsonsaver
specter25 Jul 8, 2021
45a2a52
jsonSaver : saved other licenses to json
specter25 Jul 8, 2021
5704209
Jsonsaver : Saved document annotations from struct to json
specter25 Jul 9, 2021
9d1037e
JsonSaver : saved document describes from spdx struct to json
specter25 Jul 9, 2021
9787338
Jsonsaver : saved packages and relationships from spdx to json
specter25 Jul 10, 2021
9922fe7
Jsonsaver : save files from spdx strict to json
specter25 Jul 10, 2021
91fb849
jsonsaver : Save snippets from spdx struct to json
specter25 Jul 10, 2021
625fa97
jsonsaver : Parse Reviews from spdx struct to json
specter25 Jul 10, 2021
f14c07d
JsonSaver : Write bytes to io.Writer while saving json
specter25 Jul 14, 2021
cab3ae1
Jsonsaver : Fix tag names fro reverse compatibility
specter25 Jul 15, 2021
4012229
Jsonparser : fix bug while parsiing creators
specter25 Jul 15, 2021
7aab873
Jsonsaver : Fix return types of relationship parser
specter25 Jul 15, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Expand Up @@ -22,7 +22,7 @@ New **code files** should include a [short-form SPDX ID](https://spdx.org/ids) a
// SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
```

New **documentation files** should include a [short-form SPDX ID](https://spdx.org/ids) at the top, indicating the project license for code, which is CC-BY-4.0. This should look like the following:
New **documentation files** should include a [short-form SPDX ID](https://spdx.org/ids) at the top, indicating the project license for documentation, which is CC-BY-4.0. This should look like the following:

```
SPDX-License-Identifier: CC-BY-4.0
Expand Down
36 changes: 23 additions & 13 deletions README.md
@@ -1,42 +1,39 @@
[![Build Status](https://github.com/spdx/tools-golang/workflows/build/badge.svg)](https://github.com/spdx/tools-golang/actions)
[![Coverage Status](https://coveralls.io/repos/github/spdx/tools-golang/badge.svg)](https://coveralls.io/github/spdx/tools-golang)

# tools-golang
# SPDX tools-golang

tools-golang is a collection of Go packages intended to make it easier for
Go programs to work with [SPDX®](https://spdx.org/) files.

This software is in an early state, and its API may change significantly.

## Recent news

2021-03-20: **v0.1.0**: initial pre-v1 release tagged, prior to making more
extensive API changes in some pending PRs.
2021-07-04: **v0.2.0**: added support for parsing SPDX JSON files as well as
other improvements and bugfixes. See [RELEASE-NOTES.md](./RELEASE-NOTES.md)
for full details.

## What it does

tools-golang currently works with files conformant to versions 2.1 and 2.2
of the SPDX specification, available at: https://spdx.org/specifications
of the SPDX specification, available at: https://spdx.dev/specifications

tools-golang provides the following packages:

* *spdx* - in-memory data model for the sections of an SPDX document
* *tvloader* - tag-value file loader
* *tvsaver* - tag-value file saver
* *rdfloader* - RDF file loader
* *tvloader* - tag-value document loader
* *tvsaver* - tag-value document saver
* *rdfloader* - RDF document loader
* *jsonloader* - JSON document loader
* *builder* - builds "empty" SPDX document (with hashes) for directory contents
* *idsearcher* - searches for [SPDX short-form IDs](https://spdx.org/ids/) and builds SPDX document
* *licensediff* - compares concluded licenses between files in two packages
* *reporter* - generates basic license count report from SPDX document
* *spdxlib* - various utility functions for manipulating SPDX documents in memory
* *utils* - various utility functions that support the other tools-golang packages

Examples for how to use these packages can be found in the `examples/`
directory.

RDF support was added by @RishabhBhatnagar as part of his Google Summer of
Code 2020 project, and is in the process of being merged into the main
tools-golang code.

## What it doesn't do

tools-golang doesn't currently do any of the following:
Expand All @@ -56,6 +53,19 @@ tools-golang uses https://github.com/spdx/gordf to manage RDF input and output.
Other than that, tools-golang does not require anything outside the Go standard
library.

## Contributors

Thank you to all of the contributors to spdx/tools-golang. A full list can be
found in the GitHub repo and in [the release notes](RELEASE-NOTES.md).

In particular, thank you to the following for major contributions:

JSON parsing support was added by @specter25 as part of his Google Summer of
Code 2021 project.

RDF parsing support was added by @RishabhBhatnagar as part of his Google Summer
of Code 2020 project.

## Licenses

As indicated in `LICENSE-code`, tools-golang **source code files** are
Expand Down
43 changes: 43 additions & 0 deletions RELEASE-NOTES.md
@@ -0,0 +1,43 @@
SPDX-License-Identifier: CC-BY-4.0

# Release Notes for spdx/tools-golang

## 0.2.0

Released on: 2021-07-04

### New Features and Enhancements
* Add support for parsing SPDX JSON: #72, #75, #83, #84, #87
* bug fixes in interim versions: #77, #78, #79, #80, #81, #82
* Improve handling of multiple hash checksum types: #41, #49, #60
* Enable filtering relationships by various relationship types: #71, #74
* Improve package license visibility: #65, #66
* Rename primary branch to 'main': #69
* Add release notes and push release: #85, #90

### Bug fixes
* Fix multiline (`<text>`) wrapping for various fields: #31, #53, #58, #89, #76
* Fix special SPDX IDs in right-hand side of Relationships: #59, #63, #68
* Throw error when parsing tag-value elements without SPDX IDs: #26, #64
* Fix missing colon in 'excludes' for Package Verification Code when saving tag-value documents: #86, #88
* Fix incorrect license statement: #70

### Contributors
* @autarch
* @bisakhmondal
* @ianling
* @matthewkmayer
* @RishabhBhatnagar
* @specter25
* @swinslow

## 0.1.0

Released on: 2021-03-20

### Contributors
* @abhishekspeer
* @goneall
* @RishabhBhatnagar
* @rtgdk
* @swinslow