-
Notifications
You must be signed in to change notification settings - Fork 0
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
Feature/thumbnails #11
Conversation
This adds an environment config for thumbnail filetypes, so we know which files to ship and treat as thumbnails in the science archive.
Pull Request Test Coverage Report for Build 9355323460Details
💛 - Coveralls |
Remove mapping in settings, update filestore path, etc...
…tem/ocs_archive into feature/thumbnails
Also add a couple of tests for thumbnail files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry just noticed this PR! I think we need to add a few fields to required headers, but otherwise looks good.
ocs_archive/settings/settings.py
Outdated
@@ -44,6 +44,9 @@ def get_tuple_from_environment(variable_name, default): | |||
# Fits headers that must be present | |||
REQUIRED_HEADERS = get_tuple_from_environment('REQUIRED_HEADERS', 'PROPID,DATE-OBS,INSTRUME,SITEID,TELID,OBSTYPE,BLKUID') | |||
|
|||
# Metadata that must be present when ingesting a thumbnail | |||
REQUIRED_THUMBNAIL_METADATA = get_tuple_from_environment('REQUIRED_THUMBNAIL_METADATA', 'frame_basename,size') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we also need the site_id, instrument_id, and observation_day to be required so we know where to store/retrieve the thumbnails in the daydirs. Actually looking above I think we need to require observation_day for LCO fits files too since its required for that path!
This is so that the archive can call this function in the thumbnail model without making an extra join to get all of the header information from the associated frame. Rather, it can provide a set of metadata to simply build the correct file path.
We keep the same interface for get_filestore_path so that the ingester can utilize it, but add a static method that takes a subset of frame metadata to also generate a filestore path so that we don't have to pull the entire frame header from another table in the archive. Add thumbnail file and test for ingesting to filestore
Break out the INTEGER_TYPES from the fits file to the settings module
This is to address the 422 errors we ocassionally get from coveralls
…e in the runner environment.
These are the changes needed to support the ingester and science archive in storing thumbnails. Here we just add some validation to make sure some additional thumbnail metadata is included in the payload. Also add a set of thumbnail filetypes which the ingester uses to know where to send the file.