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

mrc-6097 Metadata endpoint #4

Merged
merged 6 commits into from
Dec 20, 2024
Merged

mrc-6097 Metadata endpoint #4

merged 6 commits into from
Dec 20, 2024

Conversation

EmmaLRussell
Copy link
Contributor

@EmmaLRussell EmmaLRussell commented Dec 17, 2024

This branch implements a basic endpoint to provide metadata about the discovered datasets. For the test datasets the data part of the response looks like:

{
  "datasets": {
    "tile": {
      "gadm41": {
        "levels": [
          "admin0",
          "admin1"
        ]
      }
    }
  }
}

We currently only support one dataset type, "tile", with the idea that other datasets may be supported later.

When this happens we might change the metadata format somewhat, e.g. maybe a dataset supports multiple types of data, with shared feature ids. To be determined...

The static metadata is built on server start-up, from the discovered datasets, in a new buildMetadata method.

Other changes in this branch:

  • some of the auxiliary stuff used by server, including buildMetadata, moved to a server folder to avoid top level getting too cluttered. server.ts itself it still at the top level - I'll move that if it's too confusing!
  • Helper method in integrationTest: getData which expects a JSON success response and returns body.data.

@EmmaLRussell EmmaLRussell marked this pull request as ready for review December 17, 2024 17:02
@EmmaLRussell EmmaLRussell changed the base branch from mrc-6085-error-handling to main December 19, 2024 16:21
Copy link

codecov bot commented Dec 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.41%. Comparing base (b4c775a) to head (be540b4).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main       #4      +/-   ##
==========================================
+ Coverage   98.27%   98.41%   +0.13%     
==========================================
  Files          13       15       +2     
  Lines         116      126      +10     
  Branches       15       15              
==========================================
+ Hits          114      124      +10     
  Misses          2        2              

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

Copy link
Contributor

@absternator absternator left a comment

Choose a reason for hiding this comment

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

LGTM!!! just a capitalization comment

src/types/app.ts Outdated Show resolved Hide resolved
EmmaLRussell and others added 2 commits December 20, 2024 16:31
Co-authored-by: Anmol Thapar <mr.anmolthapar@gmail.com>
@EmmaLRussell EmmaLRussell merged commit e31e8fd into main Dec 20, 2024
2 checks passed
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.

3 participants