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

DM-6086: JSON serialization for the SQuaSH dashboard application #17

Merged
merged 7 commits into from Jun 2, 2016

Conversation

jonathansick
Copy link
Contributor

This PR implements an extensible and consistent JSON schema for validate_drp output that is compatible with post-qa and the SQuaSH dashboard. The schema will ultimately allow SQuaSH users to inspect rich metadata surrounding metrics, in addition to the scalar metric measurements themselves. The schema is also self-documenting, and leverages Astropy units to annotate numeric values.

The schema itself is described in SQR-009. It is implemented through a group of Serialization classes whose role is to take data and render it into JSON through json instance properties. The serializers recursively serialize embedded documents.

The current implementation purposefully leaves the original implementation of validate_drp untouched at the expense of some fragility and repetition in metadata management. A future PR will create a standardized API for measurement classes that take serialization needs into account.

The Datum data structure wraps a value and annotates it with a name,
plot label and units (integrated with Astropy units).

Currently skips unit validation checks for millimag units. We need to
add 'millimag' as an Astropy unit derived from 'mag'.

Includes a unit tests.
The Blob and Parameters serializers are baseclasses that can be extended
for specialized schemas for different metrics

WIP MeasurementSerializer

Implement all serializers

Fix serializer base inits
This allows the serializers to know what bandpass is being used.
This serializes matched star catalog statistics along with fits to the
astrometric and photometric error models.
In calcSrd there are serializers that define the metrics as well as
serializers that define parameter sets.

In validate the measurements are captured with a MeasurementSerializer.

This setup can certainly be refactored, streamlined, and made more
robust by turning the measurement functions into classes that implement
an API that consistently provides the measurement itself in addition to
metadata.
Implements both parameter serializers specific for these measurements,
and the serialization itself as part of the validate core executable.
@jhoblitt
Copy link
Contributor

jhoblitt commented Jun 1, 2016

👍 This implementation seems reasonable under the circumstances.

@jonathansick jonathansick merged commit e7bbaed into master Jun 2, 2016
@jonathansick
Copy link
Contributor Author

I ❤️ the vote of confidence 💯.

@jonathansick
Copy link
Contributor Author

And for posterity, we're going to fix the architecture in the next PR.

@ktlim ktlim deleted the tickets/DM-6086 branch August 25, 2018 06:50
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

Successfully merging this pull request may close these issues.

None yet

2 participants