codeforboston / home-energy-analysis-tool

https://www.codeforboston.org/projects/
MIT License
12 stars 30 forks source link

Suggestion: use an enum for fuel types #45

Closed alanisaac closed 1 year ago

alanisaac commented 1 year ago

In order to prevent developer error, convert places where we define fuel_type from a string to a Python enum.

mciethan commented 1 year ago

Agreed that an enum makes sense for fuel types. One important property for a fuel type enum to have is BTU_per_usage, which is a numerical constant associated with each enum that is used to convert its unit of usage into BTUs. Those values are currently hard-coded into the bp_ua_estimates() method of engine.py

mciethan commented 1 year ago

fixed by 4fe1238