Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue126 #174

Closed
wants to merge 6 commits into from
Closed

Issue126 #174

wants to merge 6 commits into from

Conversation

jkirsh2
Copy link
Contributor

@jkirsh2 jkirsh2 commented Apr 24, 2023

  • added cumulative energy delta tracking to vehicles and stations
  • include energy dispensed/expended in summary report

jkirsh2 and others added 4 commits April 24, 2023 15:44
Copy link
Collaborator

@robfitzgerald robfitzgerald left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks great. so satisfying to see this now in the logs:

│ Total kWh Expended By Vehicles               │ 676.09 kWh │
│ Total Gasoline Expended By Vehicles          │ 70.24 Gal  │
│ Total kWh Dispensed By Stations              │ 872.03 kWh │
│ Total Gasoline Dispensed By Stations         │ 7.0 Gal    │

a few minor requests to wrap {}'s in Map(). thank you!

:param delta_energy: the energy dispensed for a charge event
:return: the updated Station
"""
energy_dispensed = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap with immutables.Map

:param delta_energy:
:return:
"""
energy_expended = {k: self.energy_expended[k] + delta_energy[k] for k in self.energy.keys()}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap with immutables.Map

:param delta_energy:
:return:
"""
energy_gained = {k: self.energy_gained[k] + delta_energy[k] for k in self.energy.keys()}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto

Wrapped dictionary

Signed-off-by: Joshua Hoshiko <[email protected]>
Wrapped dictionary 

Signed-off-by: Joshua Hoshiko <[email protected]>
@jhoshiko
Copy link
Collaborator

I wrapped the dictionaries since the two volunteers working on this had to leave, but we'll need to reformat vehicle.py and station.py with black since I can't do that through github's file editor. Talking with the team, it might make sense to add running black automatically with a pre-commit hook.

@robfitzgerald
Copy link
Collaborator

i'll take a stab at fixing this, likely pushing up a new PR with the changes + formatting

@nreinicke
Copy link
Collaborator

Closing as this was included in #179

@nreinicke nreinicke closed this Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants