marl / jams

A JSON Annotated Music Specification for Reproducible MIR Research
ISC License
186 stars 27 forks source link

Namespace required fields #32

Closed bmcfee closed 9 years ago

bmcfee commented 9 years ago

[ref #13, #26]

The current namespace implementation does not provide a way to indicate whether value or confidence are required fields. This is ultimately namespace-dependent, since beat and onset do not require values, but something like chord_harte certainly does. Without explicit required fields, it's impossible to properly unit-test the namespaces.

In general json-schema, you would indicate required fields in the type definition with the required = [ ... ] field. However, since the namespace schemas aren't complete definitions (only the specs for the value and confidence fields), this isn't directly possible by adding required to the ns schema. We can work around this by adding required to the namespace defs and re-routing it to the correct place from within jams.ns.ns_schema.

Disregard this issue. All observations should have all fields always.