Granule campaign shortname la #339
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.

Description of the PR: This is the code change for issue #333. The schema for the project/Shortname is updated to Campaign/Shortname. The error message for the absence of a missing campaign shortname is updated as per the ticket.
For the 3rd section - Currently, it is NOT possible to include a GCMD keyword check for 'Campaign/Shortname' for granules separately since it is tied with the specific collection (See the .native file for granule in Earthdata search). The GCMD keyword check is tied to the collection. For example, if the GCMD keyword check fails for the collection (already included in the CMR ticket), then it is likely that the GCMD keyword should fail for the granule. Need further testing on this section. Possible suggestions are to cross-validate the GCMD keyword check for the granule with collection (based on pre-existing checks).
Code change: A code change was made in the
rules_override.jsonandcheck_messages_override.json. Further, we updated the outdated files in the test_downloader.py and schema_validator.py. There was an outdated imports DraftValidator, and this has to be updated before every commit. The final code is test by running pytest, and the run was successful before committing the code changes.Note: When running pytest, I get a warning message saying the library 'datetime.datetime.utcfromtimestamp() is deprecated. This means we need to update or replace 'pytz' in the
datetime_validator.pyRecords for testing:
G2479735136-CDDIS (umm-g)
G1004960419-CDDIS (umm-g), Collection C1000000011-CDDIS
G1811369774-CDDIS (umm-g), C1422097980-CDDIS
Expected output:


For the collection C1000000011-CDDIS