From b23364d2fd6ddbe9542c716a80ba002e48eddb90 Mon Sep 17 00:00:00 2001 From: Max Levinson Date: Thu, 9 Apr 2026 10:51:04 -0400 Subject: [PATCH 1/2] Added .devcontainer to .gitignore --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 88f1ea2..63d41ae 100644 --- a/.gitignore +++ b/.gitignore @@ -166,3 +166,6 @@ cython_debug/ #.idea/ *.pyc .vscode/settings.json + +# ignore local devcontainer settings +.devcontainer/* \ No newline at end of file From 01366c89c3380a5e3e6cdf36f2adca9d5fa3b0fd Mon Sep 17 00:00:00 2001 From: Max Levinson Date: Fri, 10 Apr 2026 12:31:32 -0400 Subject: [PATCH 2/2] If Merkle Tree Exists, read and add hashes to rocrate-metadata --- src/fairscape_cli/utils/build_utils.py | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/fairscape_cli/utils/build_utils.py b/src/fairscape_cli/utils/build_utils.py index a37b1a7..71f7be7 100644 --- a/src/fairscape_cli/utils/build_utils.py +++ b/src/fairscape_cli/utils/build_utils.py @@ -317,13 +317,17 @@ def process_merkle_tree(crate_path: Path) -> bool: metadata_file = crate_path / "ro-crate-metadata.json" output_path = crate_path / "ro-crate-merkle-tree.json" - try: - tree = generate_merkle_tree(crate_path) - if tree is None: - return False - with open(output_path, 'w') as f: - json.dump(tree, f, indent=2) + try: + if output_path.exists(): + pass + else: + tree = generate_merkle_tree(crate_path) + if tree is None: + return False + else: + with open(output_path, 'w') as f: + json.dump(tree, f, indent=2) # Annotate root entity with the Merkle root hash with open(metadata_file, 'r') as f: