-
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
XML macros: add named yields, tokenized macros, tokens for attributes, and fix replacement of toplevel yield #13152
Merged
mvdbeek
merged 16 commits into
galaxyproject:dev
from
bernt-matthias:topic/xml-replace-fix-test
Jan 19, 2022
Merged
Changes from 15 commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
0e730aa
fix replacement of toplevel yield
bernt-matthias 44855fe
remove apparently unnecessart code
bernt-matthias c3d3727
even simpler _expand_yield_statements
bernt-matthias c47bd55
add docstring
bernt-matthias 8ba6795
XmlMacroDef: store the macro element
bernt-matthias 0dfcf48
fix unit test
bernt-matthias be7a9a9
implement named yields
bernt-matthias bd64bfd
add test for the limited recursion possibilities
bernt-matthias c1604f5
use more xpath in test_tool_loader
bernt-matthias 7c64721
move doctests to unit tests
bernt-matthias 068f015
some more extensions for xml macros
bernt-matthias 372439c
fix tool loader if no macros are present
bernt-matthias 180ed75
check for cycles in nested macros
bernt-matthias 5198c82
Update lib/galaxy/util/xml_macros.py
bernt-matthias 72141b3
use copy instead of deepcopy
bernt-matthias a216858
fix deprecation warning
bernt-matthias File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
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.
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.
Are you sure this must be a cycle ? Also list lookups can be expensive, maybe make visited a set or an ordered set?
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.
Quite. Essentially this is a DFS of the expansions and if a previously expanded macro is expanded again we have a cycle. Note that visisted is kind of a stack (i.e. the macro names are removed at the end of the function.)
Then I will go for ordered set, since otherwise the test can not check for the message (or I just test for the prefix
"Cycle in nested macros"
.