-
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
DAS-1901: Adding publishVariableDrafts field to publish generated variable drafts. #79
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #79 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 69 69
Lines 1516 1544 +28
Branches 208 209 +1
=========================================
+ Hits 1516 1544 +28 ☔ View full report in Codecov by Sentry. |
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.
publishVariableDrafts needs to be a mutation, not a return field within a query.
Other work being done this PI also makes the name publishVariableDrafts too similar to the publishDraft mutation, so maybe something like publishGeneratedVariables would be more clear about what exactly is expected of the mutation
src/resolvers/collection.js
Outdated
|
||
const { dataSources } = context | ||
|
||
const publish = true |
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 would just pass true below, future developers can look at the arguments of the method to understand what it is.
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.
Its passed as a key/value below, so If I remove this const, Id have to pass it as "publish: true" below. Would that be preferred?
…g token to authHeader
…thon requirements zip set to true
src/resolvers/variable.js
Outdated
|
||
// Pull out the variable concept ids from the source to use as parameters later | ||
const conceptIds = { | ||
params: { conceptId: Object.values(results).map((object) => Object.values(object)).flat() } |
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.
Can we split this up a bit or double check these all calls need to be made here?
{"conceptId": "V0002-TEST"} | ||
] | ||
} | ||
|
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.
Add newline
"Version": "1.8.2" | ||
} | ||
} | ||
] |
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.
Add newline
Overview
What is the feature?
DAS-1901: Adding the publishVariableDrafts field to the collection query to use earthdata-varinfo to generate and publish variable drafts.
What is the Solution?
Added publishVariableDrafts field to the collection query to use earthdata-varinfo to generate and publish variable drafts. Also obtained the rest of the variable info from CMR since earthdata-varinfo only returns the concept ids.
What areas of the application does this impact?
the collection Query will have an additional field for publishVariableDrafts
Testing
Reproduction steps
Attachments
Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.
Checklist