qcodes/tests/dataset/helper_functions.py
def verify_data_dict(data: Dict[str, Dict[str, np.ndarray]],
                     dataframe: Optional[Dict[str, pandas.DataFrame]],
                     parameter_names: Sequence[str],
                     expected_names: Dict[str, Sequence[str]],
                     expected_shapes: Dict[str, Sequence[Tuple[int, ...]]],
                     expected_values: Dict[str, Sequence[np.ndarray]]) -> None:
    """
    Simple helper function to verify a dict of data. It can also optionally

    The expected names values
    and shapes should be given as a dict with keys given by the dependent
    parameters. Each value in the dicts should be the sequence of expected
    names/shapes/values for that requested parameter and its dependencies.
    The first element in the sequence must be the dependent parameter loaded.

    Args:
        data: The dict data to verify the shape and content of.
        dataframe: The data represented as a dict of Pandas DataFrames.
        parameter_names: names of the parameters requested. These are expected
            as top level keys in the dict.
        expected_names: names of the parameters expected to be loaded for a
            given parameter as a sequence indexed by the parameter.
        expected_shapes: expected shapes of the parameters loaded. The shapes
            should be stored as a tuple per parameter in a sequence containing
            all the loaded parameters for a given requested parameter.
        expected_values: expected content of the data arrays stored in a
            sequence

    """
    # check that all the expected parameters in the dict are
    # included in the list of parameters
    assert all(param in parameter_names for param in list(data.keys()))
    if dataframe is not None:
        assert all(param in parameter_names for
                   param in list(dataframe.keys()))
    for param in parameter_names:
        innerdata = data[param]
        verify_data_dict_for_single_param(innerdata,
                                          expected_names[param],
                                          expected_shapes[param],
                                          expected_values[param])
        if dataframe is not None:
            innerdataframe = dataframe[param]
            verify_dataframe_for_single_param(innerdataframe,
                                              expected_names[param],
                                              expected_shapes[param],
                                              expected_values[param])

    Simple helper function to verify a dict of data. It can also optionally

    The expected names values
    and shapes should be given as a dict with keys given by the dependent
    parameters. Each value in the dicts should be the sequence of expected
    names/shapes/values for that requested parameter and its dependencies.
    The first element in the sequence must be the dependent parameter loaded.

    Args:
        data: The dict data to verify the shape and content of.
        dataframe: The data represented as a dict of Pandas DataFrames.
        parameter_names: names of the parameters requested. These are expected
            as top level keys in the dict.
        expected_names: names of the parameters expected to be loaded for a
            given parameter as a sequence indexed by the parameter.
        expected_shapes: expected shapes of the parameters loaded. The shapes
            should be stored as a tuple per parameter in a sequence containing
            all the loaded parameters for a given requested parameter.
        expected_values: expected content of the data arrays stored in a
            sequence

    
Simple helper function to verify a dict of data. It can also optionally
The expected names values
and shapes should be given as a dict with keys given by the dependent
parameters. Each value in the dicts should be the sequence of expected
names/shapes/values for that requested parameter and its dependencies.
The first element in the sequence must be the dependent parameter loaded.
Simple helper function to verify a dict of data . It can also optionally The expected names values and shapes should be given as a dict with keys given by the dependent parameters . Each value in the dicts should be the sequence of expected names / shapes / values for that requested parameter and its dependencies . The first element in the sequence must be the dependent parameter loaded .
def verify_data_dict(data: Dict[str, Dict[str, np.ndarray]],
                     dataframe: Optional[Dict[str, pandas.DataFrame]],
                     parameter_names: Sequence[str],
                     expected_names: Dict[str, Sequence[str]],
                     expected_shapes: Dict[str, Sequence[Tuple[int, ...]]],
                     expected_values: Dict[str, Sequence[np.ndarray]]) -> None:
    assert all(param in parameter_names for param in list(data.keys()))
    if dataframe is not None:
        assert all(param in parameter_names for
                   param in list(dataframe.keys()))
    for param in parameter_names:
        innerdata = data[param]
        verify_data_dict_for_single_param(innerdata,
                                          expected_names[param],
                                          expected_shapes[param],
                                          expected_values[param])
        if dataframe is not None:
            innerdataframe = dataframe[param]
            verify_dataframe_for_single_param(innerdataframe,
                                              expected_names[param],
                                              expected_shapes[param],
                                              expected_values[param])
def verify_data_dict ( data : Dict [ str , Dict [ str , np . ndarray ] ] , dataframe : Optional [ Dict [ str , pandas . DataFrame ] ] , parameter_names : Sequence [ str ] , expected_names : Dict [ str , Sequence [ str ] ] , expected_shapes : Dict [ str , Sequence [ Tuple [ int , ... ] ] ] , expected_values : Dict [ str , Sequence [ np . ndarray ] ] ) -> None : assert all ( param in parameter_names for param in list ( data . keys ( ) ) ) if dataframe is not None : assert all ( param in parameter_names for param in list ( dataframe . keys ( ) ) ) for param in parameter_names : innerdata = data [ param ] verify_data_dict_for_single_param ( innerdata , expected_names [ param ] , expected_shapes [ param ] , expected_values [ param ] ) if dataframe is not None : innerdataframe = dataframe [ param ] verify_dataframe_for_single_param ( innerdataframe , expected_names [ param ] , expected_shapes [ param ] , expected_values [ param ] )
Simple helper function to verify a dict of data.
Simple helper function to verify a dict of data .
"""
    Simple helper function to verify a dict of data. It can also optionally

    The expected names values
    and shapes should be given as a dict with keys given by the dependent
    parameters. Each value in the dicts should be the sequence of expected
    names/shapes/values for that requested parameter and its dependencies.
    The first element in the sequence must be the dependent parameter loaded.

    Args:
        data: The dict data to verify the shape and content of.
        dataframe: The data represented as a dict of Pandas DataFrames.
        parameter_names: names of the parameters requested. These are expected
            as top level keys in the dict.
        expected_names: names of the parameters expected to be loaded for a
            given parameter as a sequence indexed by the parameter.
        expected_shapes: expected shapes of the parameters loaded. The shapes
            should be stored as a tuple per parameter in a sequence containing
            all the loaded parameters for a given requested parameter.
        expected_values: expected content of the data arrays stored in a
            sequence

    """ # check that all the expected parameters in the dict are # included in the list of parameters
data
Dict[str, Dict[str, np.ndarray]]
The dict data to verify the shape and content of.
The dict data to verify the shape and content of .
dataframe
Optional[Dict[str, pandas.DataFrame]]
The data represented as a dict of Pandas DataFrames.
The data represented as a dict of Pandas DataFrames .
parameter_names
Sequence[str]
names of the parameters requested. These are expected
as top level keys in the dict.
names of the parameters requested . These are expected as top level keys in the dict .
expected_names
Dict[str, Sequence[str]]
names of the parameters expected to be loaded for a
given parameter as a sequence indexed by the parameter.
names of the parameters expected to be loaded for a given parameter as a sequence indexed by the parameter .
expected_shapes
Dict[str, Sequence[Tuple[int, ...]]]
expected shapes of the parameters loaded. The shapes
should be stored as a tuple per parameter in a sequence containing
all the loaded parameters for a given requested parameter.
expected shapes of the parameters loaded . The shapes should be stored as a tuple per parameter in a sequence containing all the loaded parameters for a given requested parameter .
expected_values
Dict[str, Sequence[np.ndarray]]
expected content of the data arrays stored in a
sequence
expected content of the data arrays stored in a sequence