-
Notifications
You must be signed in to change notification settings - Fork 7
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
CMR-9088: Add draft support for UMM-V to CMR graphql #51
Conversation
Codecov Report
@@ Coverage Diff @@
## MMT-3263 #51 +/- ##
==========================================
Coverage 100.00% 100.00%
==========================================
Files 57 59 +2
Lines 1215 1227 +12
Branches 155 155
==========================================
+ Hits 1215 1227 +12
|
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.
What version of UMM-V is MMT using? We should probably make sure there aren't any problems in the fields returned from cmr-graphql if there is a version mismatch. cmr-graphql is on UMM-V 1.7.
And I didn't think about that for the UMM-T PR, but cmr-graphql is on UMM-T 1.1. Those values can be found in serverless.yml, line 28
|
||
const contextValue = buildContextValue() | ||
|
||
describe('Collection', () => { |
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.
This isn't testing a Collection
src/utils/umm/variableKeyMap.json
Outdated
"associationDetails": "meta.association-details", | ||
"conceptId": "meta.concept-id", | ||
"dataType": "umm.DataType", | ||
"definition": "umm.Definition", | ||
"dimensions": "umm.Dimensions", | ||
"fillValue": "umm.FillValue", |
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 this needs to be plural
src/types/variable.graphql
Outdated
"The expanded or long name related to the variable Name." | ||
longName: String | ||
"The measurement information of a variable." | ||
"The LonRange consists of an index range for longitude." |
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.
This comment doesn't seem to match the field measurementIdentifiers
src/utils/umm/variableKeyMap.json
Outdated
"associationDetails": "meta.association-details", | ||
"conceptId": "meta.concept-id", | ||
"dataType": "umm.DataType", | ||
"definition": "umm.Definition", | ||
"dimensions": "umm.Dimensions", | ||
"fillValue": "umm.FillValue", | ||
"latRange": "umm.LatRange", |
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.
latRange
is not defined in variable.graphql. I also don't see it in the UMM-V model
src/utils/umm/variableKeyMap.json
Outdated
"longName": "umm.LongName", | ||
"lonRange": "umm.LonRange", |
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.
lonRange
is not defined in variable.graphql. I also don't see it in the UMM-V model
src/utils/umm/variableKeyMap.json
Outdated
"measurementIdentifiers": "umm.MeasurementIdentifiers", | ||
"name": "umm.Name", | ||
"nativeId": "meta.native-id", | ||
"offset": "umm.Offset", | ||
"relatedUrls": "umm.RelatedURLs", | ||
"samplingIdentifiers": "umm.SamplingIdentifiers", | ||
"sets": "umm.Sets", |
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.
A few of these newly added mappings are not in alphabetical order
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.
indexRanges
is defined in variable.graphql, but it not listed in the mapping. I think maybe it should be here but latRanges and lonRanges shouldn't?
src/types/variable.graphql
Outdated
"The scale is the numerical factor by which all values in the stored data field are multiplied in order to obtain the original values. May be used together with Offset. An example of a scale factor is '0.002'." | ||
scale: Float | ||
"The set information of a variable. The variable is grouped within a set. The set is defined by the name, type, size and index. For example, Name: 'Data_Fields', Type: 'General', Size: '15', Index: '7' for the case of the variable named 'LST_Day_1km'." | ||
sets: JSON |
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.
Please make sure these fields are sorted alphabetically
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.
Same comments from variable.graphql apply to this file. (I'd get that file fixed and copy/paste into the VariableDraft type, then remove what shouldn't be there)
} | ||
|
||
input VariableDraftInput { | ||
id: Int! |
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.
It looks like this parameter isn't commented on the other Draft types, but it should be commented on all of them. Please add a comment describing the id
field
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.
✅
|
||
const contextValue = buildContextValue() | ||
|
||
describe('Variable', () => { |
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.
Variable Draft
src/types/variableDraft.graphql
Outdated
indexRanges: JSON | ||
"The expanded or long name related to the variable Name." | ||
longName: String | ||
"The LonRange consists of an index range for longitude." |
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.
"The measurement information of a variable."
added "draft" for the describe name.
Overview
Added UMM-V draft support.
What is the feature?
Added UMM-V draft support
Added all the field for UMM-V that are currently in MMT
Added test cases for