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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ep_sdk_4pd
3
- Version: 0.1.3
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://82.157.231.254:6001'
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") - timedelta(days=2)
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://82.157.231.254:6001'
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 = False):
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 = False):
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 = False):
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 = 56
92
+ strategy_id = 1
93
93
 
94
94
  request = RunStrategyRequest(strategy_id=strategy_id)
95
95
  full_url = f'{endpoint}{request.api}'
@@ -27,7 +27,7 @@ class HistoryDataRequest(BaseRequest):
27
27
  """
28
28
  Model for HistoryDataRequest
29
29
 
30
- 获取具体系统时间往前x天的数据(最晚时间为系统时间 D-2)
30
+ 获取具体系统时间往前x天的数据
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.3
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.3'
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(is_online=True)
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=False)
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