From c25038aff3d906508f536dbbbe79863477c61060 Mon Sep 17 00:00:00 2001 From: Daniel Armengod Date: Thu, 1 Feb 2024 22:12:50 +0100 Subject: [PATCH] Fixed relative paths after refactoring schemas into submodule --- main.py | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/main.py b/main.py index a0a4b9f..06f2f03 100644 --- a/main.py +++ b/main.py @@ -77,11 +77,11 @@ def did_web_issue_vc_and_check_revocation(vc_name, revoked=True): did_issuer = "did:web:idhub.pangea.org:did-registry:allRevoked" if revoked else "did:web:idhub.pangea.org:did-registry:noneRevoked" did_subject = didkit.key_to_did("key", jwk_subject) - vc_template = json.load(open(f'../../schemas/vc_templates/{vc_name}.json')) - data_base = json.load(open(f'../../schemas/vc_examples/base--data.json')) + vc_template = json.load(open(f'schemas/vc_templates/{vc_name}.json')) + data_base = json.load(open(f'schemas/vc_examples/base--data.json')) data_base["issuer"]["id"] = did_issuer data_base["credentialSubject"]["id"] = did_subject - data_specific = json.load(open(f'../../schemas/vc_examples/{vc_name}--data.json')) + data_specific = json.load(open(f'schemas/vc_examples/{vc_name}--data.json')) data = deep_merge_dict(data_base, data_specific) vc_rendered_unsigned = deep_merge_dict(vc_template, data) @@ -102,11 +102,11 @@ def did_web_issue_vc_test_newstyle(vc_name): did_issuer = "did:web:idhub.pangea.org" did_subject = didkit.key_to_did("key", jwk_subject) - vc_template = json.load(open(f'../../schemas/vc_templates/{vc_name}.json')) - data_base = json.load(open(f'../../schemas/vc_examples/base--data.json')) + vc_template = json.load(open(f'schemas/vc_templates/{vc_name}.json')) + data_base = json.load(open(f'schemas/vc_examples/base--data.json')) data_base["issuer"]["id"] = did_issuer data_base["credentialSubject"]["id"] = did_subject - data_specific = json.load(open(f'../../schemas/vc_examples/{vc_name}--data.json')) + data_specific = json.load(open(f'schemas/vc_examples/{vc_name}--data.json')) data = deep_merge_dict(data_base, data_specific) vc_rendered_unsigned = deep_merge_dict(vc_template, data) @@ -124,11 +124,11 @@ def issue_vc_test_newstyle(vc_name): did_issuer = didkit.key_to_did("key", jwk_issuer) did_subject = didkit.key_to_did("key", jwk_subject) - vc_template = json.load(open(f'../../schemas/vc_templates/{vc_name}.json')) - data_base = json.load(open(f'../../schemas/vc_examples/base--data.json')) + vc_template = json.load(open(f'schemas/vc_templates/{vc_name}.json')) + data_base = json.load(open(f'schemas/vc_examples/base--data.json')) data_base["issuer"]["id"] = did_issuer data_base["credentialSubject"]["id"] = did_subject - data_specific = json.load(open(f'../../schemas/vc_examples/{vc_name}--data.json')) + data_specific = json.load(open(f'schemas/vc_examples/{vc_name}--data.json')) data = deep_merge_dict(data_base, data_specific) vc_rendered_unsigned = deep_merge_dict(vc_template, data)