Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use
id
entity attribute when setting exampleOfWork
property
Fix the following error in 3 unit tests when using rocrate 0.13.0 : ``` ______________________ test_export_invocation_to_ro_crate ______________________ tmp_path = PosixPath('/tmp/pytest-of-runner/pytest-5/test_export_invocation_to_ro_c0') def test_export_invocation_to_ro_crate(tmp_path): app = _mock_app() workflow_invocation = _setup_invocation(app) crate_directory = tmp_path / "crate" with store.ROCrateModelExportStore(crate_directory, app=app) as export_store: export_store.export_workflow_invocation(workflow_invocation) > validate_invocation_crate_directory(crate_directory) tests/data/model/test_model_store.py:627: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ tests/data/model/test_model_store.py:564: in validate_invocation_crate_directory validate_create_action(crate) _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ro_crate = <rocrate.rocrate.ROCrate object at 0x7fb4673c2520> def validate_create_action(ro_crate: ROCrate): workflow = ro_crate.mainEntity actions = [_ for _ in ro_crate.contextual_entities if "CreateAction" in _.type] assert len(actions) == 1 wf_action = actions[0] assert wf_action["instrument"] assert wf_action["instrument"] is workflow wf_objects = wf_action["object"] wf_results = wf_action["result"] assert len(wf_objects) == 1 assert len(wf_results) == 1 for entity in wf_results: if entity.id.endswith(".txt"): assert "File" in entity.type wf_output_file = entity assert wf_output_file["encodingFormat"] == "text/plain" > assert wf_output_file["exampleOfWork"] is workflow["output"][0] E AssertionError: assert '#d2ed04ef-36f8-49ae-86ce-47cb03a856c0' is <d2ed04ef-36f8-49ae-86ce-47cb03a856c0 FormalParameter> tests/data/model/test_model_store.py:540: AssertionError ``` Also: - Remove unused `_add_step_tool_pv` method.
- Loading branch information