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.
Old: define a generic macro shared by all atomistics workflows leveraging task generators, then define a set of macros each of which instantiates the task generator node and the generic macro node, then connects them and manually re-maps all the task generator input to be available at the macro level.
New: Create a meta-workflow that takes the task generator node as input and returns a macro class in which all the task generator IO has been dynamically re-mapped to be available at the macro level; instantiate this meta-macro once per task generator to get a set of macros.
There is absolutely nothing wrong with the "old" version, it's a perfectly legitimate and legal way to construct a set of macros! Further, the biggest advantage of the "new" way -- that the task generator input is dynamically remapped -- could also be used right in the "old" way. Using a "meta-macro" is purely stylistic and my personal preference.
@jan-janssen, it's your node package so I think it's fair if you use whatever one you prefer. However, if you chose to stick with the implementation on the base branch, I would still suggest to leverage the same dynamic remapping just to shorten the node definitions.
The commented out stuff works on the first commit of this PR, where both old and new exist at once. The output is just an array of zeros, as expected and desired.
I didn't do the same sort of thorough test for the other two, but I did make sure that they instantiated OK and had nice clean IO:
and