List matrix of steps used to test instances.
436471
def matrix(ctx, scenario_name, subcommand):  # pragma: no cover
    

    args = ctx.obj.get('args')
    command_args = {
        'subcommand': subcommand,
    }

    s = scenarios.Scenarios(
        base.get_configs(args, command_args), scenario_name)
    s.print_matrix()
1194012
def filtered(self, step_names):
        """"""
        return Graph(steps=self.steps, dag=self.dag.filter(step_names))
182704
private List<TestCaseDef> getFailureCases( FunctionInputDef inputDef, VarTupleSet failureTuples, VarTupleSet validTuples)
    {
    logger_.debug( "{}: Creating failure test cases", inputDef);
    
    List<TestCaseDef> failureCases = new ArrayList<TestCaseDef>();

    // For each failure input tuple not yet used in a test case...
    Tuple nextUnused;
    while( (nextUnused = failureTuples.getNextUnused()) != null)
      {
      // Completed bindings for all variables?
      TestCaseDef failureCase = createTestCase( nextUnused, inputDef, validTuples);
      if( failureCase != null)
        {
        // Yes, add new failure test case.
        failureTuples.used( nextUnused);
        failureCases.add( failureCase);
        }
      }

    logger_.info( "{}: Created {} failure test cases", inputDef, failureCases.size());
    return failureCases;
    }
682982
def system_listMethods(self):
        """"""

        methods = set(self.funcs.keys())
        if self.instance is not None:
            # Instance can implement _listMethod to return a list of
            # methods
            if hasattr(self.instance, '_listMethods'):
                methods |= set(self.instance._listMethods())
            # if the instance has a _dispatch method then we
            # don't have enough information to provide a list
            # of methods
            elif not hasattr(self.instance, '_dispatch'):
                methods |= set(list_public_methods(self.instance))
        return sorted(methods)
1209139
def passed(self):
        
        return [test for test in self.all() if not test.failed() and not test.skipped()]
84922
def GetMethodCalls(self, method):
        '''
        '''
        return [(row[0], row[2]) for row in self.call_log if row[1] == method]
938143
def system_listMethods(self):
        """"""

        methods = self.funcs.keys()
        if self.instance is not None:
            # Instance can implement _listMethod to return a list of
            # methods
            if hasattr(self.instance, '_listMethods'):
                methods = remove_duplicates(
                        methods + self.instance._listMethods()
                    )
            # if the instance has a _dispatch method then we
            # don't have enough information to provide a list
            # of methods
            elif not hasattr(self.instance, '_dispatch'):
                methods = remove_duplicates(
                        methods + list_public_methods(self.instance)
                    )
        methods.sort()
        return methods
183423
def _get_input_steps(self):
        
        input_steps = []

        for step in self.steps_sorted:
            parent_steps = self._parent_steps(step)

            if len(parent_steps) == 0:
                input_steps.append(step)

        return input_steps
330260
private synchronized List<ListenerInfo> getStepListenerInfo(Step step, InjectionReferences injectionRefs) {
        if (!stepLevelListenerInfo.containsKey(step.getId())) {
            List<ListenerInfo> stepListenerInfoList = new ArrayList<ListenerInfo>();
            stepLevelListenerInfo.put(step.getId(), stepListenerInfoList);

            Listeners stepLevelListeners = step.getListeners();
            if (stepLevelListeners != null) {
                for (Listener listener : stepLevelListeners.getListenerList()) {
                    ListenerInfo info = buildListenerInfo(listener, injectionRefs);
                    stepListenerInfoList.add(info);
                }
            }

            return stepListenerInfoList;
        } else {
            return stepLevelListenerInfo.get(step.getId());
        }
    }
1120225
def _calc_sampleset(w1, w2, step, minimal):
        """"""
        if minimal:
            arr = [w1 - step, w1, w2, w2 + step]
        else:
            arr = np.arange(w1 - step, w2 + step + step, step)

        return arr
73437
def do_dimension_name_list(mc, args):
    ''''''
    fields = {}
    if args.metric_name:
        fields['metric_name'] = args.metric_name
    if args.limit:
        fields['limit'] = args.limit
    if args.offset:
        fields['offset'] = args.offset
    if args.tenant_id:
        fields['tenant_id'] = args.tenant_id

    try:
        dimension_names = mc.metrics.list_dimension_names(**fields)
    except (osc_exc.ClientException, k_exc.HttpError) as he:
        raise osc_exc.CommandError('%s\n%s' % (he.message, he.details))

    if args.json:
        print(utils.json_formatter(dimension_names))
        return

    if isinstance(dimension_names, list):
        utils.print_list(dimension_names, ['Dimension Names'], formatters={
            'Dimension Names': lambda x: x['dimension_name']})
777311
def show_vmatrix(vm):
    '''
        
    '''
    unhandled = vm
    while(unhandled.__len__()>0):
        next_unhandled = []
        for i in range(0,unhandled.__len__()):
            ele = unhandled[i]
            print(ele)
            cond = elel.is_leaf(ele)
            if(cond):
                pass
            else:
                children = ele[0]
                next_unhandled.append(children)
        unhandled = next_unhandled
706287
def __system_listMethods(**kwargs):
    """"""
    entry_point = kwargs.get(ENTRY_POINT_KEY)
    protocol = kwargs.get(PROTOCOL_KEY)

    return registry.get_all_method_names(entry_point, protocol, sort_methods=True)
1037945
def _step_template(name, run_file, inputs, outputs, parallel, step_parallelism, scatter=None):
    
    scatter_inputs = []
    sinputs = []
    for inp in inputs:
        step_inp = {"id": workflow.get_base_id(inp["id"]), "source": inp["id"]}
        if inp.get("wf_duplicate"):
            step_inp["id"] += "_toolinput"
        for attr in ["source", "valueFrom"]:
            if attr in inp:
                step_inp[attr] = inp[attr]
        sinputs.append(step_inp)
        # An initial parallel scatter and multiple chained parallel sample scatters
        if (parallel == "multi-parallel" and
              (not step_parallelism or
               step_parallelism.get(workflow.get_step_prefix(inp["id"])) == "multi-parallel")):
            scatter_inputs.append(step_inp["id"])
        # scatter on inputs from previous processes that have been arrayed
        elif (_is_scatter_parallel(parallel) and (_do_scatter_var(inp, parallel)
                                                  or (scatter and inp["id"] in scatter))):
            scatter_inputs.append(step_inp["id"])
    out = {"run": run_file,
           "id": name,
           "in": sinputs,
           "out": [{"id": workflow.get_base_id(output["id"])} for output in outputs]}
    if _is_scatter_parallel(parallel):
        assert scatter_inputs, "Did not find items to scatter on: %s" % name
        out.update({"scatterMethod": "dotproduct",
                    "scatter": scatter_inputs})
    return out
1322482
def list_():  # pylint: disable=redefined-builtin
    
    load_dbenv_if_not_loaded(
    )  # Important to load the dbenv in the last moment

    from aiida.orm.querybuilder import QueryBuilder
    from aiida.orm import DataFactory
    MultiplyParameters = DataFactory('phtools.factors')

    qb = QueryBuilder()
    qb.append(MultiplyParameters)
    results = qb.all()

    s = ""
    for result in results:
        obj = result[0]
        s += "{}, pk: {}\n".format(str(obj), obj.pk)
    sys.stdout.write(s)
696676
def steps(self):
        
        if self._steps is None:
            self._steps = StepList(
                self._version,
                flow_sid=self._solution['flow_sid'],
                engagement_sid=self._solution['sid'],
            )
        return self._steps
1151853
def get(self, instance_ids=None, filters=None):
        """"""
        params = {}
        if filters:
            params["filters"] = make_filters(filters)
        if instance_ids:
            params['InstanceIds'] = instance_ids
        reservations = self.call("DescribeInstances",
                                 response_data_key="Reservations",
                                 **params)
        if reservations:
            return list(chain(*(r["Instances"] for r in reservations)))
        return []