-
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-1900: As a developer, I would like to be able to make an HTTPS request that is routed to my variable generation service, so that I can request UMM-Var records are generated in the cloud #63
Conversation
Codecov Report
@@ Coverage Diff @@
## main #63 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 63 65 +2
Lines 1304 1336 +32
Branches 176 180 +4
=========================================
+ Hits 1304 1336 +32
|
Is there anything special you need to do to get the python lambda working? Does |
Yes I did run the commands below to get things working. Will update the README |
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.
Nice work. Most of my comments are small, including:
- Trying out a Python 3.11 runtime.
- Cleaning up the
requirements.txt
to only include 3rd party packages explicitly imported inhandler.py
. - The context manager thing for the temporary directory clean-up.
- Running a Python linter/style checker over
handler.py
to catch some minor things.
Potentially a more important thing is that there is no unit testing of handler.py
. I think that's because this is the fist instance of Python in this repository. Not sure what @abbottry thinks about that (given the high test coverage he was just touting).
The only other thing is a PSA about the token handling. I'll try and get that consistent in earthdata-varinfo
(for search/download vs the publication) for the next version, which will mean you have a simpler life, albeit with a couple of code changes in the next PR for this repo.
@owenlittlejohns we absolutely need python tests, you're right! We should also tie that into GitHub actions. |
Added a python unit 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.
Thanks for adding the unit tests. I think the only thing missing from them is plugging them in to the CI/CD workflow so that they run for PRs, etc. (Unless I've missed something here)
README.md
Outdated
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.
As a person who is new to GraphQL
is it possible we could have something that links to a "NASA How To for GraphQL". This ReadMe
feels a bit dense. I can't tell what I need to install and how to get there and what part is actually related to earthdata-varinfo
. It seems like the section for "Generate Collection Variable Drafts", is what is applicable here but it doesn't come off really clearly to me.
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 most of this looks good. I didn't really give too much feedback on the GraphQL
portions because I am not too familiar with it.
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.
Thanks for plumbing in the tests to the CI/CD. Nice work!
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.
Only requesting changes to block merging, so I can do a test deployment
* Switch to using the AWS SDK instead of HTTP requests * DAS-1899: Fixes a typo * DAS-1899: Fixed jest tests * DAS-1899: Renaming files with lowercase letters --------- Co-authored-by: William Valencia <william.m.valencia@nasa.gov>
Overview
What is the feature?
DAS-1900: As a developer, I would like to be able to make an HTTPS request that is routed to my variable generation service, so that I can request UMM-Var records are generated in the cloud
We decided that variable generation(earthdata-varinfo) will be routed through graphQL
What is the Solution?
I created an earthdata-varinfo lambda. Also modified the cmr-graphQL to accept a generateVariableDrafts query under the existing collection query, which will return variable drafts generated by the earthdata-varinfo lambda.
What areas of the application does this impact?
Collection query will have a new field(generateVariableDrafts) that can be requested.
Also added a new field for variableDrafts called metadataSpecification.
Testing
Reproduction steps
Attachments
Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.
Checklist