ODM2 / ODM2RESTfulWebServices

A Python RESTful web service inteface for accessing data in an ODM2 database via Django rest swagger APIs.
http://odm2.github.io/ODM2RESTfulWebServices/
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Result values keys lower case or match Python API model? #55

Closed lsetiawan closed 6 years ago

lsetiawan commented 7 years ago

Currently, result values keys are all lower case since this is how it's displayed within the pandas dataframe.

Example:

[
  {
    "valueid": 1064,
    "resultid": 1064,
    "datavalue": 1.2256,
    "valuedatetime": "2015-11-17T13:55:12",
    "valuedatetimeutcoffset": -7
  }
]

Do we want this to be this way or the keys should be CamelCase like any other model? If so, I either have to figure out the camel case conversion/mapping or this should be implemented within ODM2PythonAPI.

emiliom commented 7 years ago

The only odm2api query that returns a pandas Dataframe is the one for ResultValues. I forget, but what do other queries returns as far as case for properties -- CamelCase, right? If they're all CamelCase:

My 3 cents. Thanks.

emiliom commented 7 years ago

If all other queries do in fact return CamelCase, please open an odm2api github issue to point out this inconsistency and express a future need to change the resultvalues query.

lsetiawan commented 7 years ago

Thanks @emiliom. That answers my question. It seems like currently getResultValues is the only functions that outputs to Pandas DataFrame, and have this all lowercase names. I'll open up an Issue in odm2api.

emiliom commented 6 years ago

PR #77 (and related discussions) addressed this issue. All results are now returned as CamelCase. Closing.