marl / jams

A JSON Annotated Music Specification for Reproducible MIR Research
ISC License
185 stars 26 forks source link

Derived JObject classes use the wrong schema for validation #171

Closed bmcfee closed 7 years ago

bmcfee commented 7 years ago

Title says it all: a good example is as follows:

fm = jams.FileMetadata(duration=None)
fm.validate()
# passes

even though this violates the schema. This is due to this line which is using the global schema for validation. Instead, it should be using self.__schema__.

I'm not sure how that snuck in, but it's an easy fix.