ep-sdk-4pd 0.1.3__tar.gz → 0.1.5__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.
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/PKG-INFO +1 -1
- ep_sdk_4pd-0.1.5/ep_sdk_4pd/__init__.py +1 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd/ep_data.py +2 -3
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd/ep_system.py +5 -5
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd/models.py +1 -1
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd.egg-info/PKG-INFO +1 -1
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/setup.py +1 -1
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/tests/test_get_system_date.py +1 -1
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/tests/test_model_output_dir.py +1 -1
- ep_sdk_4pd-0.1.3/ep_sdk_4pd/__init__.py +0 -1
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/README.md +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd.egg-info/SOURCES.txt +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd.egg-info/dependency_links.txt +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd.egg-info/requires.txt +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/ep_sdk_4pd.egg-info/top_level.txt +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/setup.cfg +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/tests/test_call_train_done.py +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/tests/test_get_run_strategy.py +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/tests/test_history_data.py +0 -0
- {ep_sdk_4pd-0.1.3 → ep_sdk_4pd-0.1.5}/tests/test_predict_data.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ep_sdk_4pd
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.5
|
4
4
|
Summary: 4paradigm Electricity Platform Service SDK Library for Python
|
5
5
|
Home-page: https://gitlab.4pd.io/electricityproject/electricity-platform-sdk
|
6
6
|
Author: 4paradigm Electricity Platform SDK
|
@@ -0,0 +1 @@
|
|
1
|
+
__version__ = '0.1.5'
|
@@ -12,7 +12,7 @@ from ep_sdk_4pd.models import HistoryDataRequest, PredictDataRequest
|
|
12
12
|
|
13
13
|
|
14
14
|
# prod 地址
|
15
|
-
endpoint = 'http://
|
15
|
+
endpoint = 'http://172.27.88.56:6601'
|
16
16
|
|
17
17
|
class EpData:
|
18
18
|
|
@@ -21,9 +21,8 @@ class EpData:
|
|
21
21
|
scope = None,
|
22
22
|
days = 0
|
23
23
|
):
|
24
|
-
# 最晚时间为系统时间 D-2
|
25
24
|
date_str = EpSystem.get_system_date(is_online=True)
|
26
|
-
calculated_date = datetime.strptime(date_str, "%Y-%m-%d")
|
25
|
+
calculated_date = datetime.strptime(date_str, "%Y-%m-%d")
|
27
26
|
system_date = calculated_date.strftime("%Y-%m-%d") # 转换回字符串
|
28
27
|
|
29
28
|
request = HistoryDataRequest(
|
@@ -14,12 +14,12 @@ from ep_sdk_4pd.models import ModelOutputDirRequest, RunStrategyRequest, CallTra
|
|
14
14
|
|
15
15
|
|
16
16
|
# prod 地址
|
17
|
-
endpoint = 'http://
|
17
|
+
endpoint = 'http://172.27.88.56:6601'
|
18
18
|
|
19
19
|
class EpSystem:
|
20
20
|
|
21
21
|
@staticmethod
|
22
|
-
def model_output_dir(is_online: bool =
|
22
|
+
def model_output_dir(is_online: bool = True):
|
23
23
|
if is_online:
|
24
24
|
# 从环境变量中获取策略id
|
25
25
|
strategy_id = os.getenv('STRATEGY_ID')
|
@@ -60,7 +60,7 @@ class EpSystem:
|
|
60
60
|
return None
|
61
61
|
|
62
62
|
@staticmethod
|
63
|
-
def get_system_date(is_online: bool =
|
63
|
+
def get_system_date(is_online: bool = True):
|
64
64
|
"""
|
65
65
|
脚本每次预测的目标日,主要是拦截用户获取越界数据,用户不可修改
|
66
66
|
"""
|
@@ -74,7 +74,7 @@ class EpSystem:
|
|
74
74
|
return system_date
|
75
75
|
|
76
76
|
@staticmethod
|
77
|
-
def get_run_strategy(is_online: bool =
|
77
|
+
def get_run_strategy(is_online: bool = True):
|
78
78
|
"""
|
79
79
|
获取此刻运行的策略模型基础信息
|
80
80
|
:param is_online:
|
@@ -89,7 +89,7 @@ class EpSystem:
|
|
89
89
|
raise Exception('STRATEGY_ID is not set')
|
90
90
|
else:
|
91
91
|
# 线下环境,给固定的策略id
|
92
|
-
strategy_id =
|
92
|
+
strategy_id = 1
|
93
93
|
|
94
94
|
request = RunStrategyRequest(strategy_id=strategy_id)
|
95
95
|
full_url = f'{endpoint}{request.api}'
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: ep_sdk_4pd
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.5
|
4
4
|
Summary: 4paradigm Electricity Platform Service SDK Library for Python
|
5
5
|
Home-page: https://gitlab.4pd.io/electricityproject/electricity-platform-sdk
|
6
6
|
Author: 4paradigm Electricity Platform SDK
|
@@ -8,7 +8,7 @@ DESCRIPTION = '4paradigm Electricity Platform Service SDK Library for Python'
|
|
8
8
|
AUTHOR = '4paradigm Electricity Platform SDK'
|
9
9
|
AUTHOR_EMAIL = ''
|
10
10
|
URL = 'https://gitlab.4pd.io/electricityproject/electricity-platform-sdk'
|
11
|
-
VERSION = '0.1.
|
11
|
+
VERSION = '0.1.5'
|
12
12
|
REQUIRES = ['requests']
|
13
13
|
|
14
14
|
LONG_DESCRIPTION = ''
|
@@ -4,7 +4,7 @@ from ep_sdk_4pd.ep_system import EpSystem
|
|
4
4
|
def test_get_system_date():
|
5
5
|
print('-------------test_get_system_date-------------')
|
6
6
|
|
7
|
-
target_date = EpSystem.get_system_date(
|
7
|
+
target_date = EpSystem.get_system_date()
|
8
8
|
print(target_date)
|
9
9
|
print('-------------------------------------')
|
10
10
|
|
@@ -4,7 +4,7 @@ from ep_sdk_4pd.ep_system import EpSystem
|
|
4
4
|
def test_model_output_dir():
|
5
5
|
print('-------------test_model_output_dir-------------')
|
6
6
|
|
7
|
-
data = EpSystem.model_output_dir(is_online=
|
7
|
+
data = EpSystem.model_output_dir(is_online=True)
|
8
8
|
print(data)
|
9
9
|
print('-------------------------------------')
|
10
10
|
|
@@ -1 +0,0 @@
|
|
1
|
-
__version__ = '0.1.3'
|
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
|