analyser_hj3415 2.10.2__tar.gz → 2.10.3__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: analyser_hj3415
3
- Version: 2.10.2
3
+ Version: 2.10.3
4
4
  Summary: Stock analyser and database processing programs
5
5
  Requires-Python: >=3.6
6
6
  Description-Content-Type: text/markdown
@@ -83,40 +83,22 @@ class Score:
83
83
  else:
84
84
  is_update_c108 = is_within_last_three_days(c108_recent_date.date())
85
85
 
86
- score_logger.info("Dart 최근 데이터 추출중..")
87
- # dart가 최근에 업데이트 되었는지...
88
- dart_recent_date = self.dart.get_recent_date()
89
- # print('code - ', code, ' | dart recent date - ', dart_recent_date.date())
90
- if dart_recent_date is None:
91
- is_update_dart = False
92
- else:
93
- is_update_dart = is_within_last_three_days(dart_recent_date.date())
94
-
95
86
  score_logger.info("Red score 계산중..")
96
87
  red_score = self.red.get(verbose=False).score
97
88
 
98
89
  score_logger.info("Mil data 계산중..")
99
90
  mil_data = self.mil.get(verbose=False)
100
91
 
101
- score_logger.info("Lstm 최근 데이터 조회중..")
102
- if myredis.Base.exists(f'{self.code}_mylstm_predictions'):
103
- is_lstm_up = self.lstm.is_up()
104
- else:
105
- is_lstm_up = None
106
-
107
92
  score_logger.info("\tProphet 최근 데이터 조회중..")
108
93
  prophet_score = self.prophet.scoring()
109
94
 
110
95
  return {
111
- 'code': self.code,
112
96
  'name': self.name,
113
97
  '시가총액': 시가총액,
114
98
  'is_update_c108': is_update_c108,
115
- 'is_update_dart': is_update_dart,
116
99
  'red_score': red_score,
117
100
  '이익지표': mil_data.이익지표,
118
101
  '주주수익률': mil_data.주주수익률,
119
- 'is_lstm_up': is_lstm_up,
120
102
  'prophet_score': prophet_score,
121
103
  }
122
104
  data_dict = myredis.Base.fetch_and_cache_data(redis_name, refresh, fetch_score, timer=expire_time_h * 3600)
@@ -124,6 +106,26 @@ class Score:
124
106
 
125
107
  @classmethod
126
108
  def ranking(self, refresh=False, expire_time_h=24, top='all') -> OrderedDict:
109
+ """
110
+ prophet score 기준으로 정렬하여 ordered dict로 반환함
111
+
112
+ Parameters:
113
+ refresh (bool): Specifies whether to refresh the ranking data. Defaults
114
+ to `False`.
115
+ expire_time_h (int): Time in hours after which the cached data should
116
+ expire. Defaults to `24` hours.
117
+ top (Union[str, int]): Determines how many top rankings to return.
118
+ Defaults to `'all'`. If an integer is provided, it limits the
119
+ ranking to the specified count.
120
+
121
+ Returns:
122
+ OrderedDict: A dictionary containing the rankings, sorted in
123
+ descending order by `prophet_score`.
124
+
125
+ Raises:
126
+ ValueError: Raised if the parameter `top` is neither `'all'` nor an
127
+ integer.
128
+ """
127
129
  print("**** Start score_ranking... ****")
128
130
  redis_name = 'score_ranking'
129
131
 
@@ -5,7 +5,7 @@ build-backend = "flit_core.buildapi"
5
5
 
6
6
  [project]
7
7
  name = "analyser_hj3415"
8
- version = "2.10.2"
8
+ version = "2.10.3"
9
9
  description = "Stock analyser and database processing programs"
10
10
  readme = "README.md"
11
11
  requires-python = ">=3.6"