analyser_hj3415 2.7.5__py2.py3-none-any.whl → 2.7.7__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
analyser_hj3415/cli.py CHANGED
@@ -117,7 +117,7 @@ def analyser_manager():
117
117
  for i, code in enumerate(myredis.Corps.list_all_codes()):
118
118
  red.code = code
119
119
  print(f"*** {i} / {red} ***")
120
- pprint.pprint(red.get(args.refresh))
120
+ pprint.pprint(red.get(args.refresh, verbose=False))
121
121
 
122
122
  # 원래 저장되었던 기대수익률로 다시 복원
123
123
  eval.Red.expect_earn = ee_orig
@@ -140,10 +140,7 @@ def analyser_manager():
140
140
  noti.telegram_to('manager', f"오늘의 Red({args.code})를 레디스캐시에 저장했습니다.(유효 12시간)")
141
141
 
142
142
  elif args.command == 'ranking':
143
- if args.refresh:
144
- result = eval.Red.ranking(expect_earn=args.expect_earn, refresh=True)
145
- else:
146
- result = eval.Red.ranking(expect_earn=args.expect_earn, refresh=False)
143
+ result = eval.Red.ranking(expect_earn=args.expect_earn, refresh=args.refresh)
147
144
  print(result)
148
145
  if args.noti:
149
146
  noti.telegram_to('manager', "오늘의 red ranking을 레디스캐시에 저장했습니다.(유효 12시간)")
@@ -156,7 +153,7 @@ def analyser_manager():
156
153
  for i, code in enumerate(myredis.Corps.list_all_codes()):
157
154
  mil.code = code
158
155
  print(f"*** {i} / {mil} ***")
159
- pprint.pprint(mil.get(args.refresh))
156
+ pprint.pprint(mil.get(args.refresh, verbose=False))
160
157
  else:
161
158
  assert utils.is_6digit(args.code), "code 인자는 6자리 숫자이어야 합니다."
162
159
  mil = eval.Mil(args.code)
@@ -173,7 +170,7 @@ def analyser_manager():
173
170
  for i, code in enumerate(myredis.Corps.list_all_codes()):
174
171
  blue.code = code
175
172
  print(f"*** {i} / {blue} ***")
176
- pprint.pprint(blue.get(args.refresh))
173
+ pprint.pprint(blue.get(args.refresh, verbose=False))
177
174
  else:
178
175
  assert utils.is_6digit(args.code), "code 인자는 6자리 숫자이어야 합니다."
179
176
  blue = eval.Blue(args.code)
@@ -190,7 +187,7 @@ def analyser_manager():
190
187
  for i, code in enumerate(myredis.Corps.list_all_codes()):
191
188
  growth.code = code
192
189
  print(f"*** {i} / {growth} ***")
193
- pprint.pprint(growth.get(args.refresh))
190
+ pprint.pprint(growth.get(args.refresh, verbose=False))
194
191
  else:
195
192
  assert utils.is_6digit(args.code), "code 인자는 6자리 숫자이어야 합니다."
196
193
  growth = eval.Growth(args.code)
analyser_hj3415/eval.py CHANGED
@@ -324,7 +324,7 @@ class Red:
324
324
  score = score,
325
325
  )
326
326
 
327
- def get(self, refresh = False) -> RedData:
327
+ def get(self, refresh = False, verbose = True) -> RedData:
328
328
  """
329
329
  RedData 형식의 데이터를 계산하여 리턴하고 레디스 캐시에 저장한다.
330
330
  :param refresh:
@@ -333,7 +333,8 @@ class Red:
333
333
  redis_name = f"{self.code}_red"
334
334
  analyser_logger.info(f"{self} RedData를 레디스캐시에서 가져오거나 새로 생성합니다.. refresh : {refresh}")
335
335
  expire_time = 3600 * 12
336
- print(f"{self} redisname: '{redis_name}' / expect_earn: {Red.expect_earn} / refresh : {refresh} / expire_time : {expire_time/3600}h")
336
+ if verbose:
337
+ print(f"{self} redisname: '{redis_name}' / expect_earn: {Red.expect_earn} / refresh : {refresh} / expire_time : {expire_time/3600}h")
337
338
 
338
339
  def fetch_generate_data(refresh_in: bool) -> dict:
339
340
  return asdict(self._generate_data(refresh_in))
@@ -372,9 +373,10 @@ class Red:
372
373
  # 원하는 기대수익률로 클래스 세팅
373
374
  Red.expect_earn = expect_earn_in
374
375
  AnalyserSettingsManager().set_value('RED_RANKING_EXPECT_EARN', str(expect_earn_in))
376
+ red = Red('005930')
375
377
  for i, code in enumerate(myredis.Corps.list_all_codes()):
376
- red = Red(code)
377
- red_score = red.get(refresh=refresh_in).score
378
+ red.code = code
379
+ red_score = red.get(refresh=refresh_in, verbose=False).score
378
380
  if red_score > 0:
379
381
  data[code] = red_score
380
382
  print(f"{i}: {red} - {red_score}")
@@ -631,7 +633,7 @@ class Mil:
631
633
  date = date_list,
632
634
  )
633
635
 
634
- def get(self, refresh = False) -> MilData:
636
+ def get(self, refresh = False, verbose = True) -> MilData:
635
637
  """
636
638
  MilData 형식의 데이터를 계산하여 리턴하고 레디스 캐시에 저장한다.
637
639
  :param refresh:
@@ -639,7 +641,8 @@ class Mil:
639
641
  """
640
642
  redis_name = f"{self.code}_mil"
641
643
  analyser_logger.info(f"{self} MilData를 레디스캐시에서 가져오거나 새로 생성합니다.. refresh : {refresh}")
642
- print(f"{self} redisname: '{redis_name}' / refresh : {refresh} / expire_time : {expire_time/3600}h")
644
+ if verbose:
645
+ print(f"{self} redisname: '{redis_name}' / refresh : {refresh} / expire_time : {expire_time/3600}h")
643
646
 
644
647
  def fetch_generate_data(refresh_in: bool) -> dict:
645
648
  return asdict(self._generate_data(refresh_in))
@@ -803,7 +806,7 @@ class Blue:
803
806
  date= date_list,
804
807
  )
805
808
 
806
- def get(self, refresh = False) -> BlueData:
809
+ def get(self, refresh = False, verbose = True) -> BlueData:
807
810
  """
808
811
  BlueData 형식의 데이터를 계산하여 리턴하고 레디스 캐시에 저장한다.
809
812
  :param refresh:
@@ -811,7 +814,8 @@ class Blue:
811
814
  """
812
815
  redis_name = f"{self.code}_blue"
813
816
  analyser_logger.info(f"{self} BlueData를 레디스캐시에서 가져오거나 새로 생성합니다.. refresh : {refresh}")
814
- print(f"{self} redisname: '{redis_name}' / refresh : {refresh} / expire_time : {expire_time/3600}h")
817
+ if verbose:
818
+ print(f"{self} redisname: '{redis_name}' / refresh : {refresh} / expire_time : {expire_time/3600}h")
815
819
 
816
820
  def fetch_generate_data(refresh_in: bool) -> dict:
817
821
  return asdict(self._generate_data(refresh_in))
@@ -902,7 +906,7 @@ class Growth:
902
906
  date= date_list,
903
907
  )
904
908
 
905
- def get(self, refresh = False) -> GrowthData:
909
+ def get(self, refresh = False, verbose = True) -> GrowthData:
906
910
  """
907
911
  GrowthData 형식의 데이터를 계산하여 리턴하고 레디스 캐시에 저장한다.
908
912
  :param refresh:
@@ -910,7 +914,8 @@ class Growth:
910
914
  """
911
915
  redis_name = f"{self.code}_growth"
912
916
  analyser_logger.info(f"{self} GrowthData를 레디스캐시에서 가져오거나 새로 생성합니다.. refresh : {refresh}")
913
- print(f"{self} redisname: '{redis_name}' / refresh : {refresh} / expire_time : {expire_time/3600}h")
917
+ if verbose:
918
+ print(f"{self} redisname: '{redis_name}' / refresh : {refresh} / expire_time : {expire_time/3600}h")
914
919
 
915
920
  def fetch_generate_data(refresh_in: bool) -> dict:
916
921
  return asdict(self._generate_data(refresh_in))
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: analyser_hj3415
3
- Version: 2.7.5
3
+ Version: 2.7.7
4
4
  Summary: Stock analyser and database processing programs
5
5
  Author-email: Hyungjin Kim <hj3415@gmail.com>
6
6
  Description-Content-Type: text/markdown
@@ -1,7 +1,7 @@
1
1
  analyser_hj3415/.DS_Store,sha256=qr9-0FPn5CFKe6kEu8_dWCNhzQ0sN7bwQgffKsaJEEo,6148
2
2
  analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
- analyser_hj3415/cli.py,sha256=IAABc8Q6thB8FhHUeWsA2m6sW3iHtlqNEm80tpgiyCs,11075
4
- analyser_hj3415/eval.py,sha256=sNvDTLK7V4Bko6KHmbQaW3PWhAll5UDZTEFu_Vr-OQg,38892
3
+ analyser_hj3415/cli.py,sha256=7ys-b9H_tJAbLLi_XpjmEvDiyNHddpg9F1FNAACfWnE,11005
4
+ analyser_hj3415/eval.py,sha256=4F0GIknCogAhv_iTq8auLrmwW20u8kH0HY0fP4SaVa4,39099
5
5
  analyser_hj3415/workroom/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  analyser_hj3415/workroom/lstm.py,sha256=O_VYURGNsLw6q_7Yi0nH4Y6nKbVBwzMojDN446cyJKM,4078
7
7
  analyser_hj3415/workroom/myprophet.py,sha256=xGbs4_cCeSNAX62H6rG-bUz6_rUOyO6787WAjLexMkw,1855
@@ -9,8 +9,8 @@ analyser_hj3415/workroom/mysklearn.py,sha256=wJXKz5MqqTzADdG2mqRMMzc_G9RzwYjj5_j
9
9
  analyser_hj3415/workroom/mysklearn2.py,sha256=1lIy6EWEQHkOzDS-av8U0zQH6DuCLKWMI73dnJx5KRs,1495
10
10
  analyser_hj3415/workroom/score.py,sha256=P6nHBJYmyhigGtT4qna4BmNtvt4B93b7SKyzdstJK24,17376
11
11
  analyser_hj3415/workroom/trash.py,sha256=zF-W0piqkGr66UP6-iybo9EXh2gO0RP6R1FnIpsGkl8,12262
12
- analyser_hj3415-2.7.5.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
13
- analyser_hj3415-2.7.5.dist-info/LICENSE,sha256=QVKTp0dTnB5xG8RLgG17LwSWCKNEzYoVVM6KjoCPKc0,1079
14
- analyser_hj3415-2.7.5.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
15
- analyser_hj3415-2.7.5.dist-info/METADATA,sha256=hRDaUXQFor19fIf0dnIF0GuAfR2eCQK6zbMegNFxd8o,6417
16
- analyser_hj3415-2.7.5.dist-info/RECORD,,
12
+ analyser_hj3415-2.7.7.dist-info/entry_points.txt,sha256=ZfjPnJuH8SzvhE9vftIPMBIofsc65IAWYOhqOC_L5ck,65
13
+ analyser_hj3415-2.7.7.dist-info/LICENSE,sha256=QVKTp0dTnB5xG8RLgG17LwSWCKNEzYoVVM6KjoCPKc0,1079
14
+ analyser_hj3415-2.7.7.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
15
+ analyser_hj3415-2.7.7.dist-info/METADATA,sha256=KGOyS4fsSdfpqpHu8O6O2YewMxWQGi1W8Sj45ixtYkk,6417
16
+ analyser_hj3415-2.7.7.dist-info/RECORD,,