OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. """ #import nineml.abstraction_layer as nineml #import os from nineml.abstraction_layer.testing_utils import TestableComponent from nineml.abstraction_layer.flattening import flatten #from nineml.abstraction_layer.flattening import ComponentFlattener from nineml.abstraction_layer.component_modifiers import ComponentModifier from nineml.utility import LocationMgr #from nineml.abstraction_layer.visitors import RenameSymbol LocationMgr.StdAppendToPath() comp_data = TestableComponent('nestequivalent_iaf_cond_exp') # Build the component: component = comp_data() component = flatten(component) component.backsub_all() ComponentModifier.close_all_reduce_ports(component=component) # Copy the descriptive strings: component.short_description = comp_data.metadata.short_description component.long_description = comp_data.metadata.long_description # Get the initial regime. If this component comes from an flattened component, # then we should look up the new regime from the locations in the old