Apologies for the large PR. I couldn't figure out how to break it up.
Instead of passing the initializer method when adding a resource,
pass the component/manager, since we know the initializer will be
component.on_initialize_simulants()
In this vein, adds component to Pipeline and RandomnessStream
Gets the initializer of a ResourceGroup from its resources (which
all must have the same component and type).
Improve error message when multiple components try to create the
same resource.
Added methods set_attributes() and get_value_modifier() to simplify
creation of pipelines and their modifiers.
Testing
Added tests of new functionality
Ensured all tests pass
Specify the component that creates resources and resource groups
Description
Changes and notes
Apologies for the large PR. I couldn't figure out how to break it up.
component.on_initialize_simulants()
ResourceGroup
from its resources (which all must have the same component and type).set_attributes()
andget_value_modifier()
to simplify creation of pipelines and their modifiers.Testing
Added tests of new functionality Ensured all tests pass