Skip to content

Commit

Permalink
chore: bleedling edgedly upgrading to boaviztapi 0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
bpetit committed Sep 19, 2022
1 parent e0a3764 commit 6972285
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions boagent/api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,14 @@ def get_metrics(start_time: float, end_time: float, verbose: bool, location: str
"long_unit": "Watts"
},
"electricity_carbon_intensity": {
"value": boaviztapi_data["verbose"]["USAGE-1"]["gwp_factor"]["used_value"],
"value": boaviztapi_data["verbose"]["USAGE"]["gwp_factor"]["value"],
"description": "Carbon intensity of the elextricity mixed. Mix considered : {}".format(location),
"type": "gauge",
"unit": "kg CO2eq / kWh",
"long_unit": "Kilograms CO2 equivalent per KiloWattHour"
}
}
usage_location_status = boaviztapi_data["verbose"]["USAGE-1"]["usage_location"]["status"]
usage_location_status = boaviztapi_data["verbose"]["USAGE"]["usage_location"]["status"]
if usage_location_status == "MODIFY":
res["emissions_calculation_data"]["electricity_carbon_intensity"]["description"] += " WARNING : The provided trigram doesn't match any existing country. So this result is based on average European electricity mix. Be careful with this data."
elif usage_location_status == "SET":
Expand Down
3 changes: 2 additions & 1 deletion docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ services:
- boagent-network

boaviztapi:
image: ghcr.io/boavizta/boaviztapi:0.1.2
#image: ghcr.io/boavizta/boaviztapi:0.1.2
image: bpetit/boaviztapi:v0.1.3
ports:
- "5000:5000"
networks:
Expand Down

0 comments on commit 6972285

Please # to comment.