Closed sarangbhagwat closed 1 year ago
@sarangbhagwat, this is a nice addition and thanks for the typo correction. Could you add the parameter to the docstring, add a test (either in the docstring or as a test function in the tests folder), and make sure all tests are passing? I'll get it merged as soon as this gets done.
Sure thing! I just added both.
Nice, @sarangbhagwat, I think it is almost ready. Here is what is left:
...
instead of >>>
when making multiple lines (just like in the ipython console).print
for consistency in BioSTEAM and most libraries out there. For example, use df_TEA_breakdown
instead of print(df_TEA_breakdown)
.The first point is what is breaking the tests. Before committing, you can check if tests are passing locally with:
pytest . -v --disable-numba=1
I really appreciate the contribution, Thanks!
Fixed the docstring (and the one for UnitGroup, which was failing due to the "Materiral" typo that was fixed in my earlier commit). Thanks!
@sarangbhagwat, great! No worries on the error in the tests. It has to do with IDs not matching. I'll take care of it soon and merge.
Thanks again!
@sarangbhagwat, I accidentally included changes that relies on thermosteam's show
branch which is currently under review. All tests are passing using that branch. I'll wait until that gets merged before merging this branch.
See issue 'Unit group metric fractions do not add to 100%'.
This adds an argument 'scale_to_positive_values', set to True by default to retain original behavior.
Before:
Output: Net electricity production 0 100 100 -2.92 200 -3.55 300 -0.808
After:
Output: Net electricity production 0 108 100 -3.14 200 -3.83 300 -0.872