analyser_hj3415 2.7.5__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.5 → analyser_hj3415-2.7.7}/PKG-INFO +1 -1
  2. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/cli.py +5 -8
  3. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/eval.py +15 -10
  4. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/pyproject.toml +1 -1
  5. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.DS_Store +0 -0
  6. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.gitattributes +0 -0
  7. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.gitignore +0 -0
  8. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.idea/.gitignore +0 -0
  9. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.idea/analyser-hj3415.iml +0 -0
  10. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  11. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.idea/misc.xml +0 -0
  12. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.idea/modules.xml +0 -0
  13. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/.idea/vcs.xml +0 -0
  14. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/LICENSE +0 -0
  15. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/README.md +0 -0
  16. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/.DS_Store +0 -0
  17. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/__init__.py +0 -0
  18. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/__init__.py +0 -0
  19. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/lstm.py +0 -0
  20. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/myprophet.py +0 -0
  21. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/mysklearn.py +0 -0
  22. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/mysklearn2.py +0 -0
  23. {analyser_hj3415-2.7.5 → analyser_hj3415-2.7.7}/analyser_hj3415/workroom/score.py +0 -0
  24. {analyser_hj3415-2.7.5 → 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.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
@@ -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))
@@ -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))
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "analyser_hj3415"
7
- version = "2.7.5"
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