analyser_hj3415 2.2.0__py2.py3-none-any.whl → 2.3.0__py2.py3-none-any.whl

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,6 @@ from typing import Tuple
7
7
  from db_hj3415 import myredis, mymongo
8
8
  from analyser_hj3415.analysers import eval
9
9
  from utils_hj3415 import utils
10
- from analyser_hj3415 import myredis as analyser_redis
11
10
 
12
11
  import logging
13
12
 
@@ -45,7 +44,7 @@ def red(code: str) -> int:
45
44
  recent_price = float('nan')
46
45
  return 0
47
46
 
48
- red_price = analyser_redis.red(code)['red_price']
47
+ red_price = eval.red(code)['red_price']
49
48
  deviation = cal_deviation(recent_price, red_price)
50
49
  if red_price < 0 or (recent_price >= red_price):
51
50
  score = 0
@@ -86,9 +85,9 @@ def mil(code: str) -> Tuple[int, int, int, int]:
86
85
  Returns:
87
86
  tuple: 주주수익률, 이익지표, 투자수익률, PFCF포인트
88
87
  """
89
- mil_dict = analyser_redis.mil(code)
88
+ mil_dict = eval.mil(code)
90
89
 
91
- print(pprint.pformat(mil_dict, width=200))
90
+ # print(pprint.pformat(mil_dict, width=200))
92
91
 
93
92
  # 주주수익률 평가
94
93
  if math.isnan(mil_dict['주주수익률']):
@@ -179,9 +178,9 @@ def blue(code: str) -> Tuple[int, int, int, int, int]:
179
178
 
180
179
  c104y = myredis.C104(code, 'c104y')
181
180
 
182
- blue_dict = analyser_redis.blue(code)
181
+ blue_dict = eval.blue(code)
183
182
 
184
- print(pprint.pformat(blue_dict, width=200))
183
+ # print(pprint.pformat(blue_dict, width=200))
185
184
 
186
185
  def 유동비율평가(유동비율: float) -> int:
187
186
  # 채점은 0을 기준으로 마이너스 해간다. 즉 0이 제일 좋은 상태임.
@@ -276,7 +275,7 @@ def growth(code: str) -> Tuple[int, int]:
276
275
  Returns:
277
276
  tuple : 매출액증가율, 영업이익률 평가 포인트
278
277
  """
279
- growth_dict = analyser_redis.growth(code)
278
+ growth_dict = eval.growth(code)
280
279
 
281
280
  logger.debug(pprint.pformat(growth_dict, width=200))
282
281
 
@@ -1,11 +1,11 @@
1
- from analyser_hj3415.analysers import eval
1
+ from analyser_hj3415.analysers import eval, score
2
2
  from db_hj3415.myredis import Base
3
3
  import json
4
4
 
5
5
  page = '.analyser'
6
6
 
7
7
 
8
- def red(code: str) -> dict:
8
+ def red_n_score(code: str) -> dict:
9
9
  """
10
10
  redis 사용 - 소멸타이머 사용
11
11
  리턴값
@@ -24,6 +24,7 @@ def red(code: str) -> dict:
24
24
  except AttributeError:
25
25
  # redis에 해당하는 값이 없는 경우
26
26
  data = eval.red(code)
27
+ data['score'] = score.red(code)
27
28
  # print(data)
28
29
  if data:
29
30
  # 데이터를 Redis에 캐싱
@@ -37,7 +38,7 @@ def red(code: str) -> dict:
37
38
  return json.loads(cached_data)
38
39
 
39
40
 
40
- def mil(code: str) -> dict:
41
+ def mil_n_score(code: str) -> dict:
41
42
  """
42
43
  redis 사용 - 소멸타이머 사용
43
44
  리턴값
@@ -79,6 +80,7 @@ def mil(code: str) -> dict:
79
80
  except AttributeError:
80
81
  # redis에 해당하는 값이 없는 경우
81
82
  data = eval.mil(code)
83
+ data['score'] = score.mil(code)
82
84
  # print(data)
83
85
  if data:
84
86
  # 데이터를 Redis에 캐싱
@@ -92,7 +94,7 @@ def mil(code: str) -> dict:
92
94
  return json.loads(cached_data)
93
95
 
94
96
 
95
- def blue(code: str) -> dict:
97
+ def blue_n_score(code: str) -> dict:
96
98
  """
97
99
  redis 사용 - 소멸타이머 사용
98
100
  리턴값
@@ -130,6 +132,7 @@ def blue(code: str) -> dict:
130
132
  except AttributeError:
131
133
  # redis에 해당하는 값이 없는 경우
132
134
  data = eval.blue(code)
135
+ data['score'] = score.blue(code)
133
136
  # print(data)
134
137
  if data:
135
138
  # 데이터를 Redis에 캐싱
@@ -143,7 +146,7 @@ def blue(code: str) -> dict:
143
146
  return json.loads(cached_data)
144
147
 
145
148
 
146
- def growth(code: str) -> dict:
149
+ def growth_n_score(code: str) -> dict:
147
150
  """
148
151
  redis 사용 - 소멸타이머 사용
149
152
  리턴값
@@ -162,6 +165,7 @@ def growth(code: str) -> dict:
162
165
  except AttributeError:
163
166
  # redis에 해당하는 값이 없는 경우
164
167
  data = eval.growth(code)
168
+ data['score'] = score.growth(code)
165
169
  # print(data)
166
170
  if data:
167
171
  # 데이터를 Redis에 캐싱
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: analyser_hj3415
3
- Version: 2.2.0
3
+ Version: 2.3.0
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,15 +1,15 @@
1
1
  analyser_hj3415/.DS_Store,sha256=OQfTSOHL-zjUtnNyBpNRVUJUstR4j6I7jihKDFQQmME,6148
2
2
  analyser_hj3415/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
3
  analyser_hj3415/cli.py,sha256=qzRnpDRJvQnQevSKHBpKbTsBjmSWllZjzTV4z_alg2A,4891
4
- analyser_hj3415/myredis.py,sha256=zgsXO4G2VsXt4LID4VF-Y7AqkPjV8Th66a2czuma_bM,8738
4
+ analyser_hj3415/myredis.py,sha256=mSAELRPfiahhD_0yPeKtOhVEiOotOjYZv-T-JNG8kOU,8941
5
5
  analyser_hj3415/run.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
6
6
  analyser_hj3415/tools.py,sha256=SNsrnL5CKmKAdFkmlwgREMIkWDRi6N9LngCdhhhop3Y,13606
7
7
  analyser_hj3415/trash.py,sha256=vHrv8Q61QOkcwhmWfrj_yVdsdd5MoAxs9gXMOJEjMHM,8360
8
8
  analyser_hj3415/analysers/eval.py,sha256=mlHi6EPc8l8O6vKnWyX4Cz1BaeGhUpWM8gVZRNhm-JU,13299
9
9
  analyser_hj3415/analysers/report.py,sha256=whggmLXl7yF-BjQ6JKgxmhILT2T4uFP-rit_BSes9xM,9189
10
- analyser_hj3415/analysers/score.py,sha256=C_Xiqo44o2OAXHaHiHYLa60HwKwpUt_H18uO5Iff1TM,16308
11
- analyser_hj3415-2.2.0.dist-info/entry_points.txt,sha256=dHaCM3eOAGONmxTWuRVqo9Zyq2C7J5TZmpH0PD6FW5k,103
12
- analyser_hj3415-2.2.0.dist-info/LICENSE,sha256=QVKTp0dTnB5xG8RLgG17LwSWCKNEzYoVVM6KjoCPKc0,1079
13
- analyser_hj3415-2.2.0.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
14
- analyser_hj3415-2.2.0.dist-info/METADATA,sha256=OJhj-1acjb5Ht817i0tzqYdLUkA94NpGVZ-dclMstKo,6417
15
- analyser_hj3415-2.2.0.dist-info/RECORD,,
10
+ analyser_hj3415/analysers/score.py,sha256=j5bH_r2-Sc53JWgmdBmL7pJk9cc8oQ7iZkYRPPOA-so,16217
11
+ analyser_hj3415-2.3.0.dist-info/entry_points.txt,sha256=dHaCM3eOAGONmxTWuRVqo9Zyq2C7J5TZmpH0PD6FW5k,103
12
+ analyser_hj3415-2.3.0.dist-info/LICENSE,sha256=QVKTp0dTnB5xG8RLgG17LwSWCKNEzYoVVM6KjoCPKc0,1079
13
+ analyser_hj3415-2.3.0.dist-info/WHEEL,sha256=Sgu64hAMa6g5FdzHxXv9Xdse9yxpGGMeagVtPMWpJQY,99
14
+ analyser_hj3415-2.3.0.dist-info/METADATA,sha256=S1sYBsG7yZg3-ngZckbo4EABYBYD93wTE4MFWwiaG2s,6417
15
+ analyser_hj3415-2.3.0.dist-info/RECORD,,