Skip to content

Commit

Permalink
minor bug-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Tom Close committed Oct 23, 2015
1 parent 4ce527f commit d17bcbb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
8 changes: 4 additions & 4 deletions nineml/abstraction/componentclass/visitors/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ def action_parameter(self, parameter, **kwargs): # @UnusedVariable

def action_alias(self, alias, **kwargs): # @UnusedVariable
self.check_pass()
def action_randomvariable(self, randomvariable, **kwargs): # @UnusedVariable
self.check_pass()

def action_randomvariable(self, randomvariable, **kwargs): # @UnusedVariable @IgnorePep8
self.check_pass()

def action_constant(self, constant, **kwargs): # @UnusedVariable
self.check_pass()

def action_randomdistribution(self, random_distribution, **kwargs): # @UnusedVariable @IgnorePep8
self.check_pass()
self.check_pass()
2 changes: 1 addition & 1 deletion nineml/abstraction/componentclass/visitors/queriers.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ def action_constant(self, constant, **kwargs): # @UnusedVariable

def action_randomvariable(self, random_variable, **kwargs): # @UnusedVariable @IgnorePep8
if self._is_required(random_variable):
self.constants.add(random_variable)
self.constants.add(random_variable)

def action_alias(self, alias, **kwargs): # @UnusedVariable
if (self._is_required(alias) and
Expand Down
22 changes: 11 additions & 11 deletions nineml/abstraction/connectionrule/visitors/xml.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,28 +28,28 @@ def load_connectionruleclass(self, element, **kwargs): # @UnusedVariable
blocks = self._load_blocks(element, block_names=block_names)
return ConnectionRule(
name=element.attrib['name'],
propertyrecieveport=blocks["PropertyRecievePort"],
property_recieve_ports=blocks["PropertyRecievePort"],
parameters=blocks["Parameter"],
constant=blocks["Constant"],
alias=blocks["Alias"],
select=blocks["Select"])
constants=blocks["Constant"],
aliases=blocks["Alias"],
selects=blocks["Select"])

@read_annotations
def load_select(self, element):
block_names = ('Mask', 'Number', 'Preference', 'Selected',
'NumberSelected', 'RandomVariables', 'Select', 'RepeatUntil')
'NumberSelected', 'RandomVariables', 'Select',
'RepeatUntil')
blocks = self.load_blocks(element, block_names=block_names)
return Select(
return Select(
mask=blocks["Mask"],
number=blocks["Number"],#Does the appropriate object get expanded here
number=blocks["Number"],
preference=blocks["Preference"],
selecteds=blocks["Selected"],
selecteds=blocks["Selected"],
number_selecteds=blocks["NumberSelected"],
random_variables=blocks["RandomVariables"],
select=blocks["Select"],
random_variables=blocks["RandomVariables"],
select=blocks["Select"],
repeat_untils=blocks["RepeatUntil"])


tag_to_loader = dict(
tuple(ComponentClassXMLLoader.tag_to_loader.iteritems()) +
(("ConnectionRule", load_connectionruleclass),
Expand Down
4 changes: 4 additions & 0 deletions nineml/abstraction/dynamics/visitors/queriers.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def action_onevent(self, on_event, **kwargs): # @UnusedVariable
if self.element is on_event:
self._found()

def action_randomvariable(self, random_variable, **kwargs): # @UnusedVariable @IgnorePep8
if self.element is random_variable:
self._found()


class DynamicsExpressionExtractor(ComponentExpressionExtractor,
DynamicsActionVisitor):
Expand Down

0 comments on commit d17bcbb

Please sign in to comment.