Adding by_charge_key argument to calculate_itemized_cost, and some bug fixes#51
Open
Adding by_charge_key argument to calculate_itemized_cost, and some bug fixes#51
Conversation
…to also return itemized costs by charge key if requested. (for use with flows-mpc) Adding missing pytz requirement for tests adding copy of charge in costs.py during unit conversion to avoid pandas issue Fixing read-only issue in hours definition in get_charge_dict and create_charge_array. Also in test_create_charge_array. Issue is that with pandas 3.0.0, datetime.dt.hours.values is read-only and can't have minutes added Reformatted with black Tests passing with python 3.11 and pandas 3.0
Integrating total_cost into calculate_itemized_cost loop since dict has a different structure with by_charge_key True
5 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #51 +/- ##
==========================================
+ Coverage 93.40% 94.38% +0.97%
==========================================
Files 10 10
Lines 1593 1603 +10
==========================================
+ Hits 1488 1513 +25
+ Misses 105 90 -15 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
…s data has no_day_var=False and rollover=True across months Adding more specific charge key checks in test_costs updates for by_charge_key
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Main update: adding by_charge_key argument to calculate_itemized_cost in costs.py, to also return itemized costs by charge key if requested. (for use with flows-mpc)
Adding test for by_charge_key = True
Other bug fixes:n
Reformatted with black
Tests passing with python 3.11 and pandas 3.0
Pull request recommendations:
Thanks for contributing!