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

Type issues with v2 (Postgres-only) API #233

Closed
davenquinn opened this issue Sep 10, 2024 · 2 comments
Closed

Type issues with v2 (Postgres-only) API #233

davenquinn opened this issue Sep 10, 2024 · 2 comments
Assignees
Labels

Comments

@davenquinn
Copy link
Member

Some field types are not the same in the current API as they were before #229. Mostly this seems to be numbers that are incorrectly represented as strings.

A few high-priority ones:

I'm sure there are a few others, especially in the columns route.

@davenquinn
Copy link
Member Author

Tests for these could be added to the automated suite once #232 is finished, as well

@amyfromandi
Copy link
Contributor

Fixed these issues. Passed tests highlighted below using the new standard test suite. Looks like there are a few more tests for the units endpoint to resolve.

  API Tests
Intervals Tests
      ✔ /defs/intervals should return metadata (77ms)
    ✔ /defs/intervals?sample should return a sample (223ms)

>     ✔ t_age and b_age should have the correct format and data types (295ms)


    ✔ /defs/intervals?timescale= should accept a timescale parameter (159ms)
    ✔ /defs/intervals?id= should accept an interval id (279ms)
    ✔ /defs/intervals?all should return all definitions (278ms)
    ✔ /defs/intervals?timescale=...&format=csv should return CSV (167ms)
    ✔ /defs/intervals?late_age=...&early_age=... should accept an early and late age (299ms)
    ✔ /defs/intervals?age=... should accept an age (158ms)

Units Tests
     1) should accept an interval_name
    ✔ should return metadata
    2) should return a sample

>     ✔ t_age, b_age, t_prop, b_prop, b_int_age, and t_int_age should have the correct format and data types (164ms)


    3) should accept an interval_name
    ✔ should accept an age (332ms)
    ✔ should accept an age_top and age_bottom (434ms)
    ✔ should accept a section_id (193ms)
    ✔ should accept a response parameter (680ms)
    ✔ should accept a lith parameter (839ms)
    ✔ should accept a lith_type parameter (578ms)
    ✔ should accept a lith_class parameter (634ms)
    ✔ should accept a environ parameter (517ms)
    ✔ should accept a environ_type parameter (640ms)
    ✔ should accept a environ_class parameter (1910ms)
    ✔ should accept a project_id (825ms)
    4) should accept a strat_name parameter
    ✔ should accept a strat_name_id parameter (216ms)
    5) should output GeoJSON
    6) should output TopoJSON
    7) should accept a geom_age parameter
    8) should output CSV
    9) should accept an econ_id filter
    10) should accept an econ filter
    11) should accept an econ_type filter
    12) should accept an econ_class filter
    13) should accept a PBDB collection filter
    14) should order the output given the input

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants