Publish validated provenance and case studies
Browse files
tests/test_validate_capture_manifest.py
CHANGED
|
@@ -120,3 +120,17 @@ def test_capture_manifest_rejects_principal_point_outside_image(tmp_path):
|
|
| 120 |
valid, errors = validate_capture_manifest(manifest)
|
| 121 |
assert valid is False
|
| 122 |
assert any("principal point" in error for error in errors)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
valid, errors = validate_capture_manifest(manifest)
|
| 121 |
assert valid is False
|
| 122 |
assert any("principal point" in error for error in errors)
|
| 123 |
+
|
| 124 |
+
|
| 125 |
+
def test_capture_manifest_checks_optional_depth_hash(tmp_path):
|
| 126 |
+
depth = tmp_path / "depth.npy"
|
| 127 |
+
depth.write_bytes(b"depth bytes")
|
| 128 |
+
record_a = _record("a", "train")
|
| 129 |
+
record_a["depth"] = depth.name
|
| 130 |
+
record_a["depth_sha256"] = "0" * 64
|
| 131 |
+
record_b = _record("b", "held_out")
|
| 132 |
+
manifest = tmp_path / "capture.json"
|
| 133 |
+
manifest.write_text(json.dumps({"project": "Simam3D", "views": [record_a, record_b]}), encoding="utf-8")
|
| 134 |
+
valid, errors = validate_capture_manifest(manifest, check_files=True)
|
| 135 |
+
assert valid is False
|
| 136 |
+
assert any("depth SHA-256 does not match" in error for error in errors)
|