tdwg / camtrap-dp

Camera Trap Data Package (Camtrap DP)
https://camtrap-dp.tdwg.org
MIT License
45 stars 5 forks source link

Camtrap DP with only custom resources can pass validation #301

Closed peterdesmet closed 1 year ago

peterdesmet commented 1 year ago

This issue is about how Camtrap DP specifies its resources / data files.

Preventing resources pretending to be Camtrap DP

Currently, a resource must either be:

This allows custom resources while also preventing resources named e.g. deployments from not following the specs.

Requiring resources

The specs don't include anything however on what resources we expect:

So a Camtrap DP with e.g. foo, bar, baz (3 custom resources) and pass validation.


I don't know how to express a combination of the above (requiring resources and allowing custom ones) in JSON schema. Does anyone have any experience with this?

Even if we did, the validation error would likely be very hard to understand. Should we leave what combination of required resources we expect to software handling Camtrap DP? In my opinion checking that is easier than figuring out that a resource named e.g. deployments is not following the specs.

Ping @tucotuco @kbubnicki @timrobertson100 @damianooldoni @pietrH

peterdesmet commented 1 year ago

Note that the single observation table (#314) has not resolved this issue. The issue is fairly minor though: technically, a Camtrap DP dataset can have just 3 custom resources and pass validation. As written above, such a dataset would likely fail any implementation.

Note that false positives will fail validation, i.e. custom tables pretending to be Camtrap DP tables (e.g. naming it deployments).