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

CMR-10238: Adding the virtual catalog 'ALL' #379

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

doug-newman-nasa
Copy link
Contributor

Overview

What is the feature?

Allows users to perform collection searches across all providers.

What is the Solution?

Add the virtual catalog 'ALL' which will return collection inventories without a provider clause in the collection query

What areas of the application does this impact?

  • /stac - adds the 'all' child
  • /stac/ALL - returns collections across all providers using each collection's provider to formulate rel=child links.
  • /stac/ALL/collections - returns detailed collections across all providers using each collection's provider to formulate
  • rel=item links.
  • /stac/ALL/search - disallowed

Testing

Reproduction steps

  • SIT
  • Any collection
  1. Navigate to cmr.sit.earthdata.nasa.gov/stac
  2. Observe child link
    { "rel": "child", "title": "all", "type": "application/json", "href": "https://cmr.sit.earthdata.nasa.gov/stac/ALL" }
  3. Navigate to cmr.sit.earthdata.nasa.gov/stac/ALL
  4. Observe absence of rel=search links
  5. Observe standard rel=child links for each collection but note that the route to those collections is via their provider and not 'all'
    { "rel": "child", "href": "http://localhost:3000/stac/AMD_KOPRI/collections/Test%201_1.2", "title": "\"The Omnivores Dilemma\": The Effect of Autumn Diet on Winter Physiology and Condition of Juvenile Antarctic Krill", "type": "application/json" },
  6. Navigate to cmr.sit.earthdata.nasa.gov/stac/ALL/collections
  7. Observe, for each collection, the presence of a rel=items link that refers to the collection provider rather than 'all'. For example:
    { "rel": "items", "href": "http://localhost:3000/stac/AMD_KOPRI/collections/Test%201_1.2/items", "type": "application/geo+json", "title": "Collection Items" }
  8. Navigate to cmr.sit.earthdata.nasa.gov/stac/ALL/collections/Test%201_1.2
  9. Observe a 404 error
  10. Navigate to cmr.sit.earthdata.nasa.gov/stac/ALL/search
  11. Observe a 404 error
  12. Navigate to cmr.sit.earthdata.nasa.gov/stac/ALL/collections/Test%201_1.2/items
  13. Observe a 404 error
  14. Navigate to cmr.sit.earthdata.nasa.gov/stac/ALL/collections?q=amazonia&limit=12
  15. Observe collection with ID: AMZ1-WFI-L4-SR-1_NA
  16. Observe link within that collection of rel=items with href=https://data.inpe.br/bdc/stac/v1/collections/AMZ1-WFI-L4-SR-1/items

Attachments

Please include relevant screenshots or files that would be helpful in reviewing and verifying this change.

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

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 93.33333% with 3 lines in your changes missing coverage. Please review.

Project coverage is 88.39%. Comparing base (5d86a25) to head (110fb77).

Files with missing lines Patch % Lines
src/routes/healthcheck.ts 0.00% 2 Missing ⚠️
src/domains/collections.ts 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #379      +/-   ##
==========================================
+ Coverage   88.22%   88.39%   +0.17%     
==========================================
  Files          24       24              
  Lines        1180     1215      +35     
  Branches      261      269       +8     
==========================================
+ Hits         1041     1074      +33     
- Misses        139      141       +2     

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

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.

2 participants