-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use id
entity attribute when setting exampleOfWork
property
#19396
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
github-actions
bot
added
area/testing
area/database
Galaxy's database or data access layer
labels
Jan 10, 2025
Test failures unrelated. |
davelopez
approved these changes
Jan 13, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! It looks good to me.
If we'd like to have the |
Sounds like a good idea :) 👍 |
jdavcs
added a commit
that referenced
this pull request
Jan 13, 2025
[24.2] Backport fix from #19396
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix the following error in 3 unit tests when using rocrate 0.13.0 (e.g. in
test_galaxy_packages
tests run on Python 3.13):Also:
_add_step_tool_pv
method, unused since commit 01782c0 .tmp_path
in ro-crate tests.How to test the changes?
(Select all options that apply)
License