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

RAD-71: Initial Association datamodel schema support. #162

Merged
merged 2 commits into from
Jan 31, 2023

Conversation

PaulHuwe
Copy link
Collaborator

@PaulHuwe PaulHuwe commented Sep 7, 2022

As the title says.. this is an initial take on a schema for associations. This was based on the JSON code at the bottom of this box. I am opening this in draft PR to facilitate conversation. There is a question of if we would like to validate JSON association files or not.

{
"asn_type": "image",
"asn_rule": "candidate_Asn_Lv2Image_i2d",
"version_id": null,
"code_version": "0.16.2.dev16+g640b0b79",
"degraded_status": "No known degraded exposures in association.",
"program": "00001",
"constraints": "DMSAttrConstraint({'name': 'program', 'sources': ['program'], 'value': '001'})\nConstraint_TargetAcq({'name': 'target_acq', 'value': 'target_acquisition'})\nDMSAttrConstraint({'name': 'science', 'DMSAttrConstraint({'name': 'asn_candidate', 'sources': ['asn_candidate'], 'value': "\\('o036',\\ 'observation'\\)"})",
"asn_id": "o036",
"asn_pool": "r00001_20200530t023154_pool",
"target": "16",
"products": [
{
"name": "r00001036001_02101_0001_wfi_i2d",
"members": [
{
"expname": "r0000101001001001001_01101_0001_WFI01_cal.asdf",
"exptype": "science",
"exposerr": "null"
},
{
"expname": "r0000101001001001001_01101_0002_WFI01_cal.asdf",
"exptype": "science",
"exposerr": "null"
},
{
"expname": "r0000101001001001001_01101_0003_WFI01_cal.asdf",
"exptype": "science",
"exposerr": "null"
},
{
"expname": "r0000101001001001001_01101_0004_WFI01_cal.asdf",
"exptype": "science",
"exposerr": "null"
},
]
}
]
}

@WilliamJamieson
Copy link
Collaborator

Does the association have to be JSON? For consistency with the rest of the files maybe they should be yaml or asdf files (in this case adding a few extra things to the yaml would make it an asdf file).

@PaulHuwe PaulHuwe changed the title Initial Association datamodel schema support. RAD-71: Initial Association datamodel schema support. Jan 20, 2023
Copy link
Contributor

@mairanteodoro mairanteodoro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me.

@ddavis-stsci ddavis-stsci marked this pull request as ready for review January 31, 2023 19:56
Copy link
Collaborator

@ddavis-stsci ddavis-stsci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ddavis-stsci ddavis-stsci merged commit b2871b0 into spacetelescope:main Jan 31, 2023
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.

4 participants