Skip to content

Commit

Permalink
CarbonIntensityProvider and ElectricityMaps implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
danielhou0515 committed Sep 30, 2024
1 parent 50b2808 commit 1b10e7d
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 76 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
from __future__ import annotations

import requests
import pytest
import json
import pytest
import requests

from unittest.mock import patch

from zeus.carbon.carbon import (
ElectrictyMapsClient,
get_ip_lat_long,
CarbonIntensityNotFoundException,
CarbonIntensityNotFoundError,
)


Expand Down Expand Up @@ -100,5 +100,5 @@ def test_get_current_carbon_intensity_no_response(mock_requests):
assert latlong == (pytest.approx(42.2776), pytest.approx(-83.7409))
provider = ElectrictyMapsClient(latlong)

with pytest.raises(CarbonIntensityNotFoundException):
with pytest.raises(CarbonIntensityNotFoundError):
provider.get_current_carbon_intensity()
21 changes: 0 additions & 21 deletions zeus/carbon/__init__.py

This file was deleted.

4 changes: 2 additions & 2 deletions zeus/carbon/carbon.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

from __future__ import annotations

import requests
import logging
import abc
import json
import logging
import requests

logger = logging.getLogger(__name__)

Expand Down
19 changes: 0 additions & 19 deletions zeus/carbon/carbon_intensity_provider.py

This file was deleted.

30 changes: 0 additions & 30 deletions zeus/carbon/electricity_maps_carbon_intensity_provider.py

This file was deleted.

0 comments on commit 1b10e7d

Please sign in to comment.