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-27350: Define mandatory properties for ObservationInfo #320

Merged
merged 2 commits into from Oct 30, 2020

Conversation

timj
Copy link
Member

@timj timj commented Oct 29, 2020

  • Declare up front that things like instrument and exposure_id must be calculable.
  • Tell ObservationInfo only to calculate properties used by registry. This can speed things up a little, although we are using most of the properties by this point.

Depends on lsst/astro_metadata_translator#42

* Demand up front that certain properties are calculable
* Do not calculate properties that are not required for the
  registry schema
# list here the properties we need for the schema
# Use a dict with values a boolean where True indicates
# that it is required that we calculate this property.
ingest_subset = {

Choose a reason for hiding this comment

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

Is this using a dict just for its hashing? Would a set work instead?

Copy link
Member Author

Choose a reason for hiding this comment

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

A set is what we need in the end but I use a dict here so that I can specify the required keys here once without having to have a separate list of the properties to calculate and the required properties. You see a few lines below that I convert this dict into two sets for the ObservationInfo constructor.

@timj timj merged commit 7191b3b into master Oct 30, 2020
@timj timj deleted the tickets/DM-27350 branch October 30, 2020 18:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants