bluesky / event-model

data model for event-based data collection and analysis
https://blueskyproject.io/event-model
BSD 3-Clause "New" or "Revised" License
13 stars 30 forks source link

Projection configuration fix #192

Closed dylanmcreynolds closed 3 years ago

dylanmcreynolds commented 3 years ago

Addresses an issue found that the projection schema does not have enough types.

Description

The projection schema's "location" field contained "event" and "configuration". This PR adds "start".

Motivation and Context

The initial commits for projections and projectors contained the mistaken notion that the only two places in a docstream that might want to be projected are the start document and event fields. It was realized later that event descriptr configuration fields would also want to be project. This PR adds "start" to the projection location enum, and changes the meaning of "configuration" from the start document to the event descriptor. Fixes

Additionally, fixes Fixes #183. This issue asked for more schema validation against calculated and liked fields. For example:

if type == calculated: calcuation field is also required if type == linked: location field is also required

How Has This Been Tested?

Tests in test_projections added for checking validation changes.

This PR will have a corresponding PR in databroker.

dylanmcreynolds commented 3 years ago

arghh....tests failing for jsonshema2

dylanmcreynolds commented 3 years ago

Added skips in some tests for less than jsonschema3. h/t to @danielballan

dylanmcreynolds commented 3 years ago

Added value field to fix #194