8000 Update spdx3.model to SPDX v3.0.1 by bact · Pull Request #829 · spdx/tools-python · GitHub
[go: up one dir, main page]

Skip to content

Update spdx3.model to SPDX v3.0.1 #829

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

Open
wants to merge 23 commits into
base: main
Choose a base branch
from
Open
Show file tree< 8000 /tool-tip>
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Update notes on context file
Signed-off-by: Arthit Suriyawongkul <arthit@gmail.com>
  • Loading branch information
bact committed Oct 10, 2024
commit f8fecee1a38e23b0d88db3d1a218ccad36abdbd4
7 changes: 3 additions & 4 deletions src/spdx_tools/spdx3/writer/json_ld/json_ld_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
def write_payload(payload: Payload, file_name: str):
element_list = convert_payload_to_json_ld_list_of_elements(payload)

# this will be obsolete as soon as the context is publicly available under some URI
# Use the context file from https://spdx.org/rdf/3.0.1/spdx-context.jsonld
# The code should be updated to use the context file from the public IRI
# such as https://spdx.org/rdf/3.0.1/spdx-context.jsonld
with open(os.path.join(os.path.dirname(__file__), "context.json"), "r") as infile:
data = json.load(infile)
context = data.get("@context")
context = json.load(infile)

complete_dict = {"@context": context, "@graph": element_list}

Expand Down
Loading
0