analyser_hj3415 2.7.6__tar.gz → 2.7.7__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (24) hide show
  1. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/PKG-INFO +1 -1
  2. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/cli.py +5 -8
  3. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/eval.py +13 -9
  4. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/pyproject.toml +1 -1
  5. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.DS_Store +0 -0
  6. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.gitattributes +0 -0
  7. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.gitignore +0 -0
  8. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.idea/.gitignore +0 -0
  9. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.idea/analyser-hj3415.iml +0 -0
  10. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  11. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.idea/misc.xml +0 -0
  12. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.idea/modules.xml +0 -0
  13. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/.idea/vcs.xml +0 -0
  14. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/LICENSE +0 -0
  15. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/README.md +0 -0
  16. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/.DS_Store +0 -0
  17. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/__init__.py +0 -0
  18. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/__init__.py +0 -0
  19. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/lstm.py +0 -0
  20. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/myprophet.py +0 -0
  21. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/mysklearn.py +0 -0
  22. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/mysklearn2.py +0 -0
  23. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/score.py +0 -0
  24. {analyser_hj3415-2.7.6 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/trash.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: analyser_hj3415
3
- Version: 2.7.6
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
@@ -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)
@@ -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))
@@ -375,7 +376,7 @@ class Red:
375
376
  red = Red('005930')
376
377
  for i, code in enumerate(myredis.Corps.list_all_codes()):
377
378
  red.code = code
378
- red_score = red.get(refresh=refresh_in).score
379
+ red_score = red.get(refresh=refresh_in, verbose=False).score
379
380
  if red_score > 0:
380
381
  data[code] = red_score
381
382
  print(f"{i}: {red} - {red_score}")
@@ -632,7 +633,7 @@ class Mil:
632
633
  date = date_list,
633
634
  )
634
635
 
635
- def get(self, refresh = False) -> MilData:
636
+ def get(self, refresh = False, verbose = True) -> MilData:
636
637
  """
637
638
  MilData 형식의 데이터를 계산하여 리턴하고 레디스 캐시에 저장한다.
638
639
  :param refresh:
@@ -640,7 +641,8 @@ class Mil:
640
641
  """
641
642
  redis_name = f"{self.code}_mil"
642
643
  analyser_logger.info(f"{self} MilData를 레디스캐시에서 가져오거나 새로 생성합니다.. refresh : {refresh}")
643
- 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")
644
646
 
645
647
  def fetch_generate_data(refresh_in: bool) -> dict:
646
648
  return asdict(self._generate_data(refresh_in))
@@ -804,7 +806,7 @@ class Blue:
804
806
  date= date_list,
805
807
  )
806
808
 
807
- def get(self, refresh = False) -> BlueData:
809
+ def get(self, refresh = False, verbose = True) -> BlueData:
808
810
  """
809
811
  BlueData 형식의 데이터를 계산하여 리턴하고 레디스 캐시에 저장한다.
810
812
  :param refresh:
@@ -812,7 +814,8 @@ class Blue:
812
814
  """
813
815
  redis_name = f"{self.code}_blue"
814
816
  analyser_logger.info(f"{self} BlueData를 레디스캐시에서 가져오거나 새로 생성합니다.. refresh : {refresh}")
815
- 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")
816
819
 
817
820
  def fetch_generate_data(refresh_in: bool) -> dict:
818
821
  return asdict(self._generate_data(refresh_in))
@@ -903,7 +906,7 @@ class Growth:
903
906
  date= date_list,
904
907
  )
905
908
 
906
- def get(self, refresh = False) -> GrowthData:
909
+ def get(self, refresh = False, verbose = True) -> GrowthData:
907
910
  """
908
911
  GrowthData 형식의 데이터를 계산하여 리턴하고 레디스 캐시에 저장한다.
909
912
  :param refresh:
@@ -911,7 +914,8 @@ class Growth:
911
914
  """
912
915
  redis_name = f"{self.code}_growth"
913
916
  analyser_logger.info(f"{self} GrowthData를 레디스캐시에서 가져오거나 새로 생성합니다.. refresh : {refresh}")
914
- 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")
915
919
 
916
920
  def fetch_generate_data(refresh_in: bool) -> dict:
917
921
  return asdict(self._generate_data(refresh_in))
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "analyser_hj3415"
7
- version = "2.7.6"
7
+ version = "2.7.7"
8
8
  authors = [{name = "Hyungjin Kim", email = "hj3415@gmail.com"}]
9
9
  description = "Stock analyser and database processing programs"
10
10
  readme = "README.md"
File without changes