nerc-project / coldfront-plugin-cloud

ColdFront plugin to manage resource allocations on OpenStack and OpenShift
GNU General Public License v3.0
4 stars 10 forks source link

Output `0.000009` instead of `9.00E-06` in invoicing and write cost with 2 decimal points #157

Closed knikolla closed 5 months ago

knikolla commented 6 months ago

https://github.com/CCI-MOC/process_csv_report/issues/35

QuanMPhm commented 6 months ago

@knikolla Just so I'm sure, you want me to modify calculate_storage_gb_hours.py, or the functions it calls, so that in the invoice it exports, the rate for Storage GB Hours will be 0.000009, and the cost row will have 2 decimal points?

Why do we worry about rounding here if we will round it elsewhere, like in your PR for the processing program?

knikolla commented 6 months ago

@QuanMPhm Yes. That is, the formatting when printing the CSV file for that value should not be expressed as 9 * 10^-6.

We worry about rounding here for consistency so that the numbers between this invoice and the final processed invoice match.