ep-sdk-4pd 0.1.5__tar.gz → 0.1.7__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ep_sdk_4pd
3
- Version: 0.1.5
3
+ Version: 0.1.7
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.7'
@@ -8,11 +8,11 @@ from ep_sdk_4pd.ep_system import EpSystem
8
8
  from ep_sdk_4pd.models import HistoryDataRequest, PredictDataRequest
9
9
 
10
10
  # test 地址
11
- # endpoint = 'http://172.27.88.56:6001'
11
+ endpoint = 'http://172.27.88.56:6001'
12
12
 
13
13
 
14
14
  # prod 地址
15
- endpoint = 'http://172.27.88.56:6601'
15
+ # endpoint = 'http://172.27.88.56:6601'
16
16
 
17
17
  class EpData:
18
18
 
@@ -21,8 +21,9 @@ class EpData:
21
21
  scope = None,
22
22
  days = 0
23
23
  ):
24
+ # 最晚时间为系统时间 D-2
24
25
  date_str = EpSystem.get_system_date(is_online=True)
25
- calculated_date = datetime.strptime(date_str, "%Y-%m-%d")
26
+ calculated_date = datetime.strptime(date_str, "%Y-%m-%d") - timedelta(days=2)
26
27
  system_date = calculated_date.strftime("%Y-%m-%d") # 转换回字符串
27
28
 
28
29
  request = HistoryDataRequest(
@@ -71,9 +72,8 @@ class EpData:
71
72
  def get_predict_data(
72
73
  scope
73
74
  ):
74
- # 最晚时间为系统时间 D-1
75
75
  date_str = EpSystem.get_system_date(is_online=True)
76
- calculated_date = datetime.strptime(date_str, "%Y-%m-%d") - timedelta(days=1)
76
+ calculated_date = datetime.strptime(date_str, "%Y-%m-%d")
77
77
  system_date = calculated_date.strftime("%Y-%m-%d") # 转换回字符串
78
78
 
79
79
  request = PredictDataRequest(
@@ -10,11 +10,11 @@ from datetime import datetime
10
10
  from ep_sdk_4pd.models import ModelOutputDirRequest, RunStrategyRequest, CallTrainDoneRequest
11
11
 
12
12
  # test 地址
13
- # endpoint = 'http://172.27.88.56:6001'
13
+ endpoint = 'http://172.27.88.56:6001'
14
14
 
15
15
 
16
16
  # prod 地址
17
- endpoint = 'http://172.27.88.56:6601'
17
+ # endpoint = 'http://172.27.88.56:6601'
18
18
 
19
19
  class EpSystem:
20
20
 
@@ -27,7 +27,7 @@ class HistoryDataRequest(BaseRequest):
27
27
  """
28
28
  Model for HistoryDataRequest
29
29
 
30
- 获取具体系统时间往前x天的数据
30
+ 获取具体系统时间往前x天的数据(最晚时间为系统时间 D-2)
31
31
  特别注意:get_history_data 或 get_predict_data 会get_system_date进行检测,不可获取system_date以后得数据,避免数据穿越现象
32
32
  """
33
33
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ep_sdk_4pd
3
- Version: 0.1.5
3
+ Version: 0.1.7
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.5'
11
+ VERSION = '0.1.7'
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_run_strategy():
5
5
  print('-------------test_get_run_strategy-------------')
6
6
 
7
- data = EpSystem.get_run_strategy(is_online=False)
7
+ data = EpSystem.get_run_strategy(is_online=True)
8
8
  print(data)
9
9
  print('-------------------------------------')
10
10
 
@@ -1 +0,0 @@
1
- __version__ = '0.1.5'
File without changes
File without changes