Skip to content
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-4267: Implementing notebook generation on granule list view #1840

Merged
merged 16 commits into from
Nov 28, 2024

Conversation

trevorlang
Copy link
Collaborator

@trevorlang trevorlang commented Nov 27, 2024

Overview

What is the feature?

Adds the ability to download a sample Jupiter notebook from a granule search result, if the collection is properly configured.

What is the Solution?

  • A new action was created to make a request to the notebook generation lambda
  • A button was added to the granule results that triggers a panel with more info about the notebook generation and a link to start the download

What areas of the application does this impact?

  • Granule results

Testing

Reproduction steps

  • Environment for testing: UAT
  • Collection to test with: C1238621141-POCLOUD

Generate a notebook without a bounding box

  1. Go to /search/granules?p=C1238621141-POCLOUD with the ee param set to uat
  2. Click the button to generate the notebook
  3. Confirm the UI shows a loading state while the notebook is being generated
  4. Confirm the save dialog is displayed when the download completes
  5. Choose a download location
  6. Use Jupyter lab to open the notebook
  7. Confirm the bounding box is not applied
  8. Confirm the notebook runs as expected. The full granule plot step may take a few minutes to complete.
  9. Confirm the Earthdata Search link in the notebook opens the correct page in Earthdata Search

Generate a notebook with a bounding box

  1. Go to /search/granules?p=C1238621141-POCLOUD with the ee param set to uat
  2. Add a bounding box
  3. Click the button to generate the notebook
  4. Confirm the UI shows a loading state while the notebook is being generated
  5. Confirm the save dialog is displayed when the download completes
  6. Choose a download location
  7. Use Jupyter lab to open the notebook
  8. Confirm the bounding box is applied by checking the list in the intro section, and the lower sections where the coordinates are defined
  9. Confirm the notebook runs as expected
  10. Confirm the Earthdata Search link in the notebook opens the correct page in Earthdata Search

Confirm the notebook download button does not exist for other collections

  1. Browse Earthdata Search to verify that the download notebook button only displays on the collection C1238621141-POCLOUD

Checklist

  • I have added automated tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

Copy link

codecov bot commented Nov 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.54%. Comparing base (2d59b50) to head (ddf7543).
Report is 16 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1840      +/-   ##
==========================================
+ Coverage   93.52%   93.54%   +0.02%     
==========================================
  Files         774      777       +3     
  Lines       18709    18787      +78     
  Branches     4787     4822      +35     
==========================================
+ Hits        17497    17575      +78     
+ Misses       1164     1131      -33     
- Partials       48       81      +33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@trevorlang trevorlang marked this pull request as ready for review November 27, 2024 19:58
Copy link
Collaborator

@bnp26 bnp26 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just fix the tests and we'll be good to go

@trevorlang trevorlang merged commit 39a8bb4 into main Nov 28, 2024
11 checks passed
@trevorlang trevorlang deleted the EDSC-4267 branch November 28, 2024 01:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants