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

Added API tests #132

Merged
merged 10 commits into from
Dec 24, 2024
Merged

Added API tests #132

merged 10 commits into from
Dec 24, 2024

Conversation

agennadi
Copy link
Collaborator

@agennadi agennadi commented Dec 24, 2024

Description

  1. Mock data is updated in init.sql: added data for landslide_zones, liquefaction_zones, tsunami_zones, soft_story_properties, addresses.
  2. API tests for GET methods are added.
  3. All API tests are executed by the CI pipeline.
  4. globalID in the Tsunami model is replaced with global_id to avoid case-sensitive issues.
  5. Bugs are fixed in the address_data_handler.py.
  6. The order of coordinates is fixed in the soft_story_properties_data_handler and address_data_handler.

Resolves #113.

Type of changes

  • Bugfix
  • Chore
  • New Feature

Testing

  • I added automated tests
  • I think tests are unnecessary

How to test

Tests can be run manually inside the backend docker container using docker exec -it datasci-earthquake-backend-1 pytest backend/api/tests.

@agennadi agennadi self-assigned this Dec 24, 2024
Copy link
Collaborator

@elucherini elucherini 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 left a comment with a very non urgent question

);
*/

insert into addresses (eas_fullid, address, unit_number, address_number, street_name, street_type, parcel_number, block, lot, cnn, longitude, latitude, zip_code, point, supdist, supervisor, supname, nhood, sfdata_as_of, created_timestamp, update_timestamp) values
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why do we have both (longitude, latitude), and point? Granted, since this table is probably going to be short-lived, it probably doesn't matter. Just curious

@elucherini elucherini merged commit c76f2b5 into master Dec 24, 2024
3 checks passed
@elucherini elucherini deleted the add_api_tests branch December 24, 2024 02:18
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.

Write APIs to display the soft stories and hazard zones on the map
2 participants