analyser_hj3415 2.2.0__tar.gz → 2.3.0__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
Files changed (31) hide show
  1. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/PKG-INFO +1 -1
  2. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/analysers/score.py +6 -7
  3. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/myredis.py +9 -5
  4. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/pyproject.toml +1 -1
  5. analyser_hj3415-2.3.0/tests/_trial_temp/test.log +1 -0
  6. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/tests/testmyredis.py +12 -12
  7. analyser_hj3415-2.2.0/tests/_trial_temp/test.log +0 -1
  8. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.DS_Store +0 -0
  9. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.gitattributes +0 -0
  10. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.gitignore +0 -0
  11. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.idea/.gitignore +0 -0
  12. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.idea/analyser-hj3415.iml +0 -0
  13. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.idea/inspectionProfiles/profiles_settings.xml +0 -0
  14. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.idea/misc.xml +0 -0
  15. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.idea/modules.xml +0 -0
  16. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/.idea/vcs.xml +0 -0
  17. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/LICENSE +0 -0
  18. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/README.md +0 -0
  19. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/.DS_Store +0 -0
  20. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/__init__.py +0 -0
  21. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/analysers/eval.py +0 -0
  22. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/analysers/report.py +0 -0
  23. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/cli.py +0 -0
  24. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/run.py +0 -0
  25. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/tools.py +0 -0
  26. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/analyser_hj3415/trash.py +0 -0
  27. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/tests/_trial_temp/_trial_marker +0 -0
  28. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/tests/testeval.py +0 -0
  29. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/tests/testreport.py +0 -0
  30. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/tests/testscore.py +0 -0
  31. {analyser_hj3415-2.2.0 → analyser_hj3415-2.3.0}/tests/testtools.py +0 -0
@@ -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
@@ -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에 캐싱
@@ -4,7 +4,7 @@ build-backend = "flit_core.buildapi"
4
4
 
5
5
  [project]
6
6
  name = "analyser_hj3415"
7
- version = "2.2.0"
7
+ version = "2.3.0"
8
8
  authors = [{name = "Hyungjin Kim", email = "hj3415@gmail.com"}]
9
9
  description = "Stock analyser and database processing programs"
10
10
  readme = "README.md"
@@ -0,0 +1 @@
1
+ 2024-08-21 16:23:57+0900 [-] Log opened.
@@ -17,42 +17,42 @@ class MyredisTests(unittest.TestCase):
17
17
  def tearDown(self):
18
18
  pass
19
19
 
20
- def test_red(self):
20
+ def test_red_n_score(self):
21
21
  test_one = random.choice(self.test_codes)
22
22
  print(test_one, '/', Corps.get_name(test_one))
23
- pprint.pprint(myredis.red(test_one))
23
+ pprint.pprint(myredis.red_n_score(test_one))
24
24
 
25
25
  time.sleep(2)
26
26
 
27
27
  print(test_one, '/', Corps.get_name(test_one))
28
- pprint.pprint(myredis.red(test_one))
28
+ pprint.pprint(myredis.red_n_score(test_one))
29
29
 
30
- def test_mil(self):
30
+ def test_mil_n_score(self):
31
31
  test_one = random.choice(self.test_codes)
32
32
  print(test_one, '/', Corps.get_name(test_one))
33
- pprint.pprint(myredis.mil(test_one))
33
+ pprint.pprint(myredis.mil_n_score(test_one))
34
34
 
35
35
  time.sleep(2)
36
36
 
37
37
  print(test_one, '/', Corps.get_name(test_one))
38
- pprint.pprint(myredis.mil(test_one))
38
+ pprint.pprint(myredis.mil_n_score(test_one))
39
39
 
40
- def test_blue(self):
40
+ def test_blue_n_score(self):
41
41
  test_one = random.choice(self.test_codes)
42
42
  print(test_one, '/', Corps.get_name(test_one))
43
- pprint.pprint(myredis.blue(test_one))
43
+ pprint.pprint(myredis.blue_n_score(test_one))
44
44
 
45
45
  time.sleep(2)
46
46
 
47
47
  print(test_one, '/', Corps.get_name(test_one))
48
- pprint.pprint(myredis.blue(test_one))
48
+ pprint.pprint(myredis.blue_n_score(test_one))
49
49
 
50
- def test_growth(self):
50
+ def test_growth_n_score(self):
51
51
  test_one = random.choice(self.test_codes)
52
52
  print(test_one, '/', Corps.get_name(test_one))
53
- pprint.pprint(myredis.growth(test_one))
53
+ pprint.pprint(myredis.growth_n_score(test_one))
54
54
 
55
55
  time.sleep(2)
56
56
 
57
57
  print(test_one, '/', Corps.get_name(test_one))
58
- pprint.pprint(myredis.growth(test_one))
58
+ pprint.pprint(myredis.growth_n_score(test_one))
@@ -1 +0,0 @@
1
- 2024-08-21 11:38:08+0900 [-] Log opened.
File without changes