Skip to content

don't make meta keys in data registry required arguments and don't use negative booleaness #115

@mikofski

Description

@mikofski

Currently the data registry meta keys: uncertainty, variance and isconstant are required arguments and if you don't enter them, then your any attempts to register data will raise an unhandled exception.

Also, currently the data registry using negative booleaness to test whether or not to include the values of these meta keys, and if False then the default value is an empty dictionary, {}. But what if you want the value to be None, this equates to False and get's changed to {} which can cause problems.

This was an issue in reg_copy in the LazyLoopingCalculator because it iterates over keys using .get(k) so the new uncertainty was {'key1': None, 'key2': None, ...} which then was registered in the "new" registry, and since the dictionary is not empty the registry tries to treat it as uncertainty, but uncertainty and variance are nested dictionaries to account for covariance (unnecessary for uncertainty actually). See #100

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions