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

Add validate_order function. #98

Open
danielballan opened this issue Jul 8, 2019 · 0 comments
Open

Add validate_order function. #98

danielballan opened this issue Jul 8, 2019 · 0 comments

Comments

@danielballan
Copy link
Member

This work was already started in #97 but in keeping with our new process of opening issues first to nail down the design, I'd like to move discussion here for the moment.

Scope should include:

  • All foreign keys are preceded by the documents they reference. That means:

    • RunStart before the EventDescriptors that reference them
    • EventDescriptors for the Events that reference them
    • Datum before the Events hat reference them
    • Resources before the Datum that reference them

    Note that this does not mean that a RunStart must be first. For example, Resource is allowed to precede a RunStart.

  • If a RunStop doc is present, it is the last doc. This is important because we sometimes use it as a signal to clean up resources (like Serializer.close()).

  • Event[Page]s within each stream are in time order.

  • Event[Page]s across streams are in time order up to the time resolution of a Page. That is, if we denote event_page['time'][0] as a_i ("a initial") and event_page['time'][-1] as a_f ("a final") for a given EventPage a, if b follows a and then b_f >= a_i. In English, each EventPage's highest time must be greater than or equal to the preceding EventPages' lowest times.

In terms of implementation, it would be good to avoid caching the entire run. It is possible to enforce these constraints without retaining every document in memory at once.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant