-
Notifications
You must be signed in to change notification settings - Fork 224
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
EDSC-4265: Develop API endpoint to dynamically create jupyter notebook #1834
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1834 +/- ##
==========================================
+ Coverage 93.46% 93.48% +0.01%
==========================================
Files 770 772 +2
Lines 18615 18670 +55
Branches 4800 4779 -21
==========================================
+ Hits 17398 17453 +55
+ Misses 1169 1168 -1
- Partials 48 49 +1 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
cb2a668
to
566af43
Compare
Writing here so I don't forget. We'll want to update the Something like:
|
@@ -174,11 +174,60 @@ Resources: | |||
- "s3:ListBucket" | |||
- "s3:ListAllMyBuckets" | |||
- "s3:GetObject" | |||
- "s3:PutObject" |
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.
Was this needed after you added the S3 actions to EDSCLambdaBase?
const params = JSON.parse(body) | ||
|
||
const { | ||
boundingBox, |
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.
Should this work with other spatial types?
const { name: variableName } = variableItems[0] | ||
|
||
// Read the Jupyter notebook template file | ||
const templateContent = fs.readFileSync('serverless/src/generateNotebook/notebookTemplate.ipynb', 'utf-8') |
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 import this file like we would a JSON file? So we wouldn't have to use fs.readFileSync
and just have esbuild include it in the build?
|
||
if (process.env.IS_OFFLINE) { | ||
config.endpoint = 'http://localhost:4569' | ||
config.forcePathStyle = 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.
On MMT we set this value for both offline and deployed versions, why is it only for offline mode here?
}) | ||
|
||
const { data: responseData } = granuleResponse | ||
const { data } = responseData |
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.
Does the try/catch wrapping this logic handle if the graphql response contains an errors
key?
Overview
What is the feature?
Creating a Lambda that can dynamically create a Jupyter Notebook based on parameter passed in.
What is the Solution?
Created a Node Lambda that will dynamically generate a notebook and saves it to S3 bucket.
Testing
Endpoint:
http://localhost:3001/dev/generateNotebook
Returns a 307 with URL to download the file in response header.
Also deployed my branch to SIT and verify the functionality as expected.
Checklist