Closed simleo closed 4 months ago
Fixes #178.
from rocrate.rocrate import ROCrate metadata = { "@context": "https://w3id.org/ro/crate/1.1/context", "@graph": [ { "@id": "ro-crate-metadata.json", "@type": "CreativeWork", "about": {"@id": "./"}, "conformsTo": {"@id": "https://w3id.org/ro/crate/1.1"} }, { "@id": "./", "@type": "Dataset", "creator": {"@id": "#josiah"}, "hasPart": {"@id": "http://example.org/foo"} }, { "@id": "http://example.org/foo", "@type": "File" }, { "@id": "#josiah", "@type": "Person", 'name': 'Josiah Carberry' }, ] } crate = ROCrate(metadata) crate.write("crate")
If the metadata points to nonexistent local files or directories, the behavior when writing the crate is as described in #136 (see also the unit test added in this PR).
Fixes #178.
If the metadata points to nonexistent local files or directories, the behavior when writing the crate is as described in #136 (see also the unit test added in this PR).