SEED-platform / seed

Standard Energy Efficiency Data (SEED) Platform™ is a web-based application that helps organizations easily manage data on the energy performance of large groups of buildings.
Other
107 stars 55 forks source link

Apply unit conversion to extra data #4496

Closed perryr16 closed 4 months ago

perryr16 commented 6 months ago

Any background context you want to provide?

There are 4 different data types outside the normal float, int, string... These are eui, area, ghg, and ghg_intensity. PropertyState fields associated with these four types are given a pint unit and saved in the db as <Quantity (value, 'unit')>. Before displaying values on the Inventory List table the quantity values are converted based on org display unit settings.

Extra data fields are not given a pint unit and are saved in whatever format they were imported as (string or number). Because they don't have pint units they are ignored when the unit conversion takes place allowing data to be misrepresented.

What's this PR do?

Adds a pint unit to extra data columns that have been assigned a data type in column settings.

How should this be manually tested?

What are the relevant tickets?

4494

Screenshots (if appropriate)

Inventory List Screenshot 2024-01-19 at 2 54 58 PM Screenshot 2024-01-19 at 2 54 37 PM

Mapping Screen Screenshot 2024-01-19 at 3 39 06 PM Screenshot 2024-01-19 at 3 38 11 PM

perryr16 commented 5 months ago

Timing note: properties /filter endpoint timing on develop: ~0.8 s properties /filter endpoint with new changes: ~1.0 s