Skip to content

Commit

Permalink
Merge pull request #424 from EdAbati/fix-dashboard-data-process
Browse files Browse the repository at this point in the history
Fix dashboard data processing
  • Loading branch information
benoit-cty authored Jul 25, 2023
2 parents 45386fc + 291e061 commit 0963f17
Show file tree
Hide file tree
Showing 13 changed files with 4,051 additions and 3,709 deletions.
2 changes: 1 addition & 1 deletion .conda/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{% set version = "2.2.6" %}
{% set version = "2.2.7" %}

package:
name: codecarbon
Expand Down
2 changes: 1 addition & 1 deletion codecarbon/_version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "2.2.6"
__version__ = "2.2.7"
3 changes: 1 addition & 2 deletions codecarbon/core/emissions.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,6 @@ def get_country_emissions(self, energy: Energy, geo: GeoMetadata) -> float:
) # kgs

country_energy_mix: Dict = energy_mix[geo.country_iso_code]

emissions_per_kWh = self._global_energy_mix_to_emissions_rate(
country_energy_mix
)
Expand Down Expand Up @@ -243,7 +242,7 @@ def _global_energy_mix_to_emissions_rate(energy_mix: Dict) -> EmissionsPerKWh:
# Sanity check
if energy_sum_computed != energy_sum:
logger.error(
f"We find {energy_sum_computed} TWh instead of {energy_sum} TWh for {energy_mix.get('official_name_en')}, using world average."
f"We find {energy_sum_computed} TWh instead of {energy_sum} TWh for {energy_mix.get('country_name')}, using world average."
)
return EmissionsPerKWh.from_g_per_kWh(
carbon_intensity_per_source.get("world_average")
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 0963f17

Please sign in to comment.