Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camtrap DP with only custom resources can pass validation #301

Closed
peterdesmet opened this issue Feb 27, 2023 · 1 comment
Closed

Camtrap DP with only custom resources can pass validation #301

peterdesmet opened this issue Feb 27, 2023 · 1 comment

Comments

@peterdesmet
Copy link
Member

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:

  • deployments, media, event-observations or media-observations, with further requirements for those (i.e. the table schemas).
  • Not deployments, media, event-observations or media-observations (i.e. custom tables)

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:

  • deployments, media, media-observations + any custom resource
  • deployments, media, event-observations + any custom resource
  • deployments, media, media-observations, event-observations + any custom resource

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
Copy link
Member Author

peterdesmet commented May 26, 2023

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).

@peterdesmet peterdesmet changed the title Required resources: express in specs? Camtrap DP with only custom resources can pass validation May 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant