Skip to content
Snippets Groups Projects

tests for elements, variometers, and observatories

All threads resolved!

@swilbur @erigler

These are very straightforward tests around checking the response formats for /elements/, /variometers/, and /observatories/ because these are all pretty static and don't change much.

I'm curious about some behavior I'm seeing and I'd love further insight if possible.

  1. Why is "geometry" always set to None on elements? elements.py
  2. Why do all of these resources get returned as an object with fields type and features instead of just as a list of resources? elements, observatories, variometers
  3. Why the choice to transform the static data instead of returning the static data as it's stored in the files? Similarly, why nest most of the info under "metadata"?
  4. Why aren't there separate classes for Observatories and Variometers?
  5. Why are the /variometers/ endpoints methods called get_observatories or get_observatories_by_id?
Edited by Hobbs, Alexandra (Contractor)

Merge request reports

Checking pipeline status.

Approval is optional

Merged by Hobbs, Alexandra (Contractor)Hobbs, Alexandra (Contractor) 3 months ago (Dec 11, 2024 4:16pm UTC)

Merge details

  • Changes merged into master with aad49ab8.
  • Deleted the source branch.

Pipeline #530191 passed

Pipeline passed for aad49ab8 on master

Test coverage 66.00% (0.00%) from 1 job

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • changed the description

  • Hobbs, Alexandra (Contractor) marked this merge request as ready

    marked this merge request as ready

  • Hobbs, Alexandra (Contractor) changed title from Draft: wrote some tests for elements, variometers, and observatories to tests for elements, variometers, and observatories

    changed title from Draft: wrote some tests for elements, variometers, and observatories to tests for elements, variometers, and observatories

  • There is a lot of wrapped up in your initial questions. I'll attempt a high-level (and non-exhaustive) explanation here, but we might want to get on a call to discuss the details.

    1. The resources mentioned (/ws/elements, /ws/variometers, and /ws/observatories) were all implemented, originally, to support the /plots application. Basically, they tell /plots what station IDs and elements are valid to request.
    2. These metadata are hard-coded for now, but there have been discussions of tying these to observatory category metadata stored in our mysql database. There is potentially a lot more information that could be stored in these metadata if/when we do this.
    3. Variometer metadata is actually pulled from IRIS/Earthscope servers as station.xml. Station.xml is not (yet) fully compatible with our internal metadata "standard", although there have been preliminary discussions on how to address this as well.

    @swilbur might be able to fill in a few of the implementation details, but I'll say that streamlining some of this is exactly what we hoped you will be able to help us with on our "backend" (not all in this MR obviously), so a longer dedicated conversation seems worthwhile at some point.

  • Erin (Josh) Rigler
  • Erin (Josh) Rigler
  • Erin (Josh) Rigler requested changes

    requested changes

  • added 26 commits

    Compare with previous version

  • added 1 commit

    Compare with previous version

  • added 1 commit

    • 496fa504 - remove length check in variometers

    Compare with previous version

  • Erin (Josh) Rigler approved this merge request

    approved this merge request

  • Erin (Josh) Rigler resolved all threads

    resolved all threads

  • mentioned in commit aad49ab8

  • Please register or sign in to reply
    Loading