ResearchObject / ro-crate-py

Python library for RO-Crate
https://pypi.org/project/rocrate/
Apache License 2.0
46 stars 23 forks source link

allow multiple types in `add_file()` or add documentation about type manipulation #174

Closed mashehu closed 1 month ago

mashehu commented 7 months ago

According to the "Main Workflow Diagram" section in https://about.workflowhub.eu/Workflow-RO-Crate/ the workflow diagram should have types ["File", "ImageObject"], however using add_file() automatically assigns only type File.

Is there a way how I can add this additional type either during add_file() or afterwards?

simleo commented 6 months ago
diagram = crate.add_file("diagram.png", properties={"@type": ["File", "ImageObject"]})