LCPDelta 2.2.2__tar.gz → 2.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {lcpdelta-2.2.2/lcpdelta_python_package/src/LCPDelta.egg-info → lcpdelta-2.2.3}/PKG-INFO +1 -1
- {lcpdelta-2.2.2 → lcpdelta-2.2.3/lcpdelta_python_package/src/LCPDelta.egg-info}/PKG-INFO +1 -1
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/api_endpoints.py +2 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/api_helper.py +35 -14
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/plant_service.py +5 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/pyproject.toml +2 -2
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/LICENSE +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/LICENSE-Apache +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/README.md +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/LCPDelta.egg-info/SOURCES.txt +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/LCPDelta.egg-info/dependency_links.txt +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/LCPDelta.egg-info/requires.txt +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/LCPDelta.egg-info/top_level.txt +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/__init__.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/__init__.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/api_helper_base.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/constants.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/credentials_holder.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/http/exceptions.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/http/retry_policies.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/response_objects/usage_info.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/__init__.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/base_endpoints.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/chart_helper.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/configs/__init__.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/configs/base_endpoints_default.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/configs/base_endpoints_dev.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/dps_helper.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/enums.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/helpers.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/loader.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/multi_series_dps_helper.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/ancillary_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/bm_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/carbon_calculator_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/contract_evolution_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/day_ahead_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/epex_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/hof_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/index_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/leaderboard_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/news_table_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/niv_evolution_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/nordpool_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/series_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/flextrack/__init__.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/flextrack/api_helper.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/flextrack/services/exporter_service.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/global_helpers.py +0 -0
- {lcpdelta-2.2.2 → lcpdelta-2.2.3}/setup.cfg +0 -0
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/api_endpoints.py
RENAMED
|
@@ -87,6 +87,8 @@ class EnactApiEndpoints:
|
|
|
87
87
|
def PLANT_INFO_BY_FUEL(self): return f"{self._base_endpoints.MAIN_BASE_URL}/EnactAPI/Plant/Data/PlantInfoByFuelType"
|
|
88
88
|
@property
|
|
89
89
|
def PLANT_IDS(self): return f"{self._base_endpoints.MAIN_BASE_URL}/EnactAPI/Plant/Data/PlantList"
|
|
90
|
+
@property
|
|
91
|
+
def FUEL_LIST(self): return f"{self._base_endpoints.MAIN_BASE_URL}/EnactAPI/Plant/Data/FuelList"
|
|
90
92
|
|
|
91
93
|
@property
|
|
92
94
|
def HOF(self): return f"{self._base_endpoints.MAIN_BASE_URL}/EnactAPI/HistoryOfForecast/Data_V2"
|
|
@@ -5,20 +5,22 @@ from typing import Union
|
|
|
5
5
|
from lcp_delta.global_helpers import convert_datetime_to_iso
|
|
6
6
|
from lcp_delta.common import APIHelperBase
|
|
7
7
|
from lcp_delta.enact.helpers import get_month_name
|
|
8
|
-
from lcp_delta.enact.services import
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
8
|
+
from lcp_delta.enact.services import (
|
|
9
|
+
ancillary_service,
|
|
10
|
+
bm_service,
|
|
11
|
+
carbon_calculator_service,
|
|
12
|
+
contract_evolution_service,
|
|
13
|
+
day_ahead_service,
|
|
14
|
+
epex_service,
|
|
15
|
+
hof_service,
|
|
16
|
+
index_service,
|
|
17
|
+
leaderboard_service,
|
|
18
|
+
news_table_service,
|
|
19
|
+
niv_evolution_service,
|
|
20
|
+
nordpool_service,
|
|
21
|
+
plant_service,
|
|
22
|
+
series_service,
|
|
23
|
+
)
|
|
22
24
|
|
|
23
25
|
class APIHelper(APIHelperBase):
|
|
24
26
|
def _make_series_request(
|
|
@@ -689,6 +691,25 @@ class APIHelper(APIHelperBase):
|
|
|
689
691
|
response = await self._post_request_async(self.endpoints.PLANT_IDS, request_body)
|
|
690
692
|
return plant_service.process_country_fuel_response(response)
|
|
691
693
|
|
|
694
|
+
def get_list_of_fuels(self, dispatch_type : str | None = None) -> list[str]:
|
|
695
|
+
"""Get a list of all the fuels, optionally supplying a dispatch type.
|
|
696
|
+
|
|
697
|
+
Args:
|
|
698
|
+
dispatch_type `str` (optional): The dispatch type. If no dispatch type is specified, all fuels are returned. Options are "Dispatchable", "Fixed", "Interconnector", "Wind", "Solar", "Hydro", "Storage" and "None".
|
|
699
|
+
|
|
700
|
+
Returns:
|
|
701
|
+
Response: The response object containing the plant data.
|
|
702
|
+
"""
|
|
703
|
+
request_body = plant_service.generate_fuel_list_request(dispatch_type)
|
|
704
|
+
response = self._post_request(self.endpoints.FUEL_LIST, request_body)
|
|
705
|
+
return plant_service.process_fuel_list_response(response)
|
|
706
|
+
|
|
707
|
+
async def get_list_of_fuels_async(self, dispatch_type : str | None = None) -> list[str]:
|
|
708
|
+
"""An asynchronous version of `get_list_of_fuels`."""
|
|
709
|
+
request_body = plant_service.generate_fuel_list_request(dispatch_type)
|
|
710
|
+
response = await self._post_request_async(self.endpoints.FUEL_LIST, request_body)
|
|
711
|
+
return plant_service.process_fuel_list_response(response)
|
|
712
|
+
|
|
692
713
|
def get_history_of_forecast_for_given_date(
|
|
693
714
|
self, series_id: str, date: datetime, country_id: str, option_id: str | None = None
|
|
694
715
|
) -> pd.DataFrame:
|
|
@@ -7,6 +7,11 @@ def generate_fuel_request(fuel: str) -> dict:
|
|
|
7
7
|
def generate_country_fuel_request(country_id: str, fuel_id: str) -> dict:
|
|
8
8
|
return {"Country": country_id, "Fuel": fuel_id}
|
|
9
9
|
|
|
10
|
+
def generate_fuel_list_request(dispatch_type: str | None = None) -> dict:
|
|
11
|
+
return {"DispatchType": dispatch_type}
|
|
10
12
|
|
|
11
13
|
def process_country_fuel_response(response: dict) -> dict:
|
|
12
14
|
return response["data"]
|
|
15
|
+
|
|
16
|
+
def process_fuel_list_response(response: dict) -> list[str]:
|
|
17
|
+
return response["data"]
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "LCPDelta"
|
|
7
|
-
version = "2.2.
|
|
7
|
+
version = "2.2.3"
|
|
8
8
|
authors = [
|
|
9
9
|
{ name="LCP Delta", email="enact.helpdesk@lcp.uk.com" },
|
|
10
10
|
]
|
|
@@ -52,7 +52,7 @@ dev = [
|
|
|
52
52
|
[tool.ruff]
|
|
53
53
|
src = ["lcpdelta_python_package/src"]
|
|
54
54
|
line-length = 120
|
|
55
|
-
target-version = "2.2.
|
|
55
|
+
target-version = "2.2.3"
|
|
56
56
|
|
|
57
57
|
[tool.ruff.lint.extend-per-file-ignores]
|
|
58
58
|
"__init__.py" = ["E402", "F401"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/LCPDelta.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/LCPDelta.egg-info/requires.txt
RENAMED
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/LCPDelta.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/api_helper_base.py
RENAMED
|
File without changes
|
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/credentials_holder.py
RENAMED
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/common/http/exceptions.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/base_endpoints.py
RENAMED
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/chart_helper.py
RENAMED
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/configs/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/enact/services/bm_service.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/flextrack/__init__.py
RENAMED
|
File without changes
|
{lcpdelta-2.2.2 → lcpdelta-2.2.3}/lcpdelta_python_package/src/lcp_delta/flextrack/api_helper.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|