validate
validate copied to clipboard
As a user, I want to validate that all context objects specified in observational products are referenced in the parent bundle/collection Reference_List
Motivation
...so that we can enable quality search results when searching at the collection/bundle level
Additional Details
Reverted per https://github.com/NASA-PDS/validate/pull/456
All unique context objects specified in observational products must be referenced in the Reference_List of the parent collection and bundle. These context objects are referenced from:
- Target_Identification
- Observing_System_Component
- Investigation_Area If the the context product is not referenced in the bundle/collection, throw a WARNING message (TBD, this will become an error once it is documented in the Standards Reference).
Acceptance Criteria
Given a bundle with target identified as X
When I perform validation of the bundle (-R pds4.bundle
) with products that have targets X and Y
Then I expect validate to throw a WARNING that all targets are not specified in the parent bundle
Given a collection J with target identified as X
When I perform validation of the bundle containing collection J (-R pds4.bundle
) with products that have targets X and Y
Then I expect validate to throw a WARNING that all targets are not specified in the parent collection
Given a collection J with target identified as X
When I perform validation of the bundle containing collection J (-R pds4.bundle
) with products that have targets X and Y with --skip-context-reference-check
flag
Then I expect validate to NOT throw a WARNING
Engineering Details
Some background: Per email chain with @mitchgordon, @lynnneakrase, @rsjoyner, @rchenatjpl , the issue arose regarding specifying numerous targets within a data collection. There were several other alternatives, including specifying the targets in the context collection and specifying a planetary_system instead of the individual targets, however, it was determined the best way to specify targets at the collection/bundle level is to explicitly add all targets to the bundle/collection label Reference_List. This solution should apply across all context objects.
- [ ] create new WARNING log message for
missing_context_reference
include in messageDisable with --skip-context-reference-check flag.
- [ ] implement algorithm to perform the check for child context products in the parent bundle / collection labels
- [ ] implement flag to disable this capability