Skip to content

ID's as key's for object collection #522

@vergauwenthomas

Description

@vergauwenthomas

Currently, the 'name' of an object is used as a key in a collection. This is sufficient for regular applications, but it would be more robust if the ID is used.

Example:

You have two models to compare. You add the temperature of both models, the key is 'temp', and when you add modeldata (sta.add_to_modeldata()), there is a dict.update and the collection only contains one ModelObstype.

If using the ID, this will not be an issue since the modelname and band etc is in the ID.

The result will be that dict selection will become impractical (dataset.obstypes[ ....]) and a get method must be created for each dict collection that uses the ID as key (dataset.get_obstype(...)). This get_ methods will raise an error of multiple candidates are found.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions