nilmtk / nilm_metadata

A schema for modelling meters, measurements, appliances, buildings etc
http://nilm-metadata.readthedocs.org
Apache License 2.0
49 stars 47 forks source link

Validation tool #10

Open JackKelly opened 10 years ago

JackKelly commented 9 years ago

Some quick thoughts: could have a single, machine-readable schema which we then use to generate docs, validator and wizard. Probably easiest to create the machine-readable schema in Python. e.g. we'd have a dataset_schema.py file containing an OrderedDict where keys are the key name in the metadata instant (e.g. 'instant') and values would be a dict with keys like 'type' (a list of classes e.g. 'int' or 'float' or 'TimeFrame'), and a 'description' (for the docs), 'required'. Based on JSONSchema. Because it's an OrderedDict that's the order we use for the docs and the wizard. Nested dicts should be allowed. lists should be allowed (use similar language to JSONSchema... e.g. 'type' = 'array', 'items' = 'TimeFrame', etc). Import list of AC_TYPES etc from NILMTK.

Not planning to do this any time soon. Just making a note here for future reference. If anyone else fancies doing this then go for it!