def model_dependencies(self): """Prints out variable dependencies for the model.""" from opus_core.variables.dependency_query import DependencyChart model, group = self.get_model_name() chart = DependencyChart(self.xml_configuration, model=model, model_group=group, specification=self.get_specification()) chart.print_model_dependencies()
def model_dependencies(self): """Prints out variable dependencies for the model.""" from opus_core.variables.dependency_query import DependencyChart model, group = self.get_model_name() chart = DependencyChart(self.xml_configuration, model=model, model_group=group, specification=self.get_specification()) chart.print_model_dependencies()
def model_dependencies(self, model=None, group=None): """Prints out all dependencies for the model.""" from opus_core.variables.dependency_query import DependencyChart if model is None: # current model model, group = self.get_model_name() spec = self.get_specification() else: spec = None if model == 'all': # print dependencies for all models for thismodel in self.scenario_models: thisgroups = None if isinstance(thismodel, dict): thisgroups = thismodel[thismodel.keys()[0]].get('group_members', None) thismodel = thismodel.keys()[0] if not isinstance(thisgroups, list): thisgroups = [thisgroups] for group in thisgroups: chart = DependencyChart(self.xml_configuration, model=thismodel, model_group=group) chart.print_model_dependencies() else: chart = DependencyChart(self.xml_configuration, model=model, model_group=group, specification=spec) chart.print_model_dependencies()
def model_dependencies(self, model=None, group=None): """Prints out all dependencies for the model.""" from opus_core.variables.dependency_query import DependencyChart if model is None: # current model model, group = self.get_model_name() spec = self.get_specification() else: spec = None if model == 'all': # print dependencies for all models for thismodel in self.scenario_models: thisgroups = None if isinstance(thismodel, dict): thisgroups = thismodel[thismodel.keys()[0]].get('group_members', None) thismodel = thismodel.keys()[0] if not isinstance(thisgroups, list): thisgroups = [thisgroups] for group in thisgroups: chart = DependencyChart(self.xml_configuration, model=thismodel, model_group=group) chart.print_model_dependencies() else: chart = DependencyChart(self.xml_configuration, model=model, model_group=group, specification=spec) chart.print_model_dependencies()