cannect 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- cannect/__init__.py +30 -0
- cannect/api/__init__.py +0 -0
- cannect/config.py +114 -0
- cannect/core/__init__.py +0 -0
- cannect/core/ascet/__init__.py +3 -0
- cannect/core/ascet/amd.py +698 -0
- cannect/core/ascet/formula.py +33 -0
- cannect/core/ascet/oid.py +29 -0
- cannect/core/ascet/ws.py +154 -0
- cannect/core/can/__init__.py +2 -0
- cannect/core/can/ascet/__init__.py +3 -0
- cannect/core/can/ascet/_db2code.py +344 -0
- cannect/core/can/ascet/_db2elem.py +399 -0
- cannect/core/can/ascet/comdef.py +256 -0
- cannect/core/can/ascet/comrx.py +139 -0
- cannect/core/can/ascet/diag.py +691 -0
- cannect/core/can/db/__init__.py +4 -0
- cannect/core/can/db/reader.py +148 -0
- cannect/core/can/db/schema.py +269 -0
- cannect/core/can/db/specification/__init__.py +0 -0
- cannect/core/can/db/specification/message.py +230 -0
- cannect/core/can/db/specification/styles.py +81 -0
- cannect/core/can/db/specification/wrapper.py +161 -0
- cannect/core/can/db/vcs.py +104 -0
- cannect/core/can/rule.py +229 -0
- cannect/core/can/testcase/__init__.py +0 -0
- cannect/core/can/testcase/unitcase/__init__.py +0 -0
- cannect/core/can/testcase/unitcase/asw2can.py +48 -0
- cannect/core/can/testcase/unitcase/decode.py +63 -0
- cannect/core/can/testcase/unitcase/diagnosis.py +479 -0
- cannect/core/can/testcase/unitcase/encode.py +60 -0
- cannect/core/ir/__init__.py +2 -0
- cannect/core/ir/changehistory.py +310 -0
- cannect/core/ir/delivereables.py +71 -0
- cannect/core/ir/diff.py +97 -0
- cannect/core/ir/ir.py +581 -0
- cannect/core/ir/sdd.py +148 -0
- cannect/core/mdf.py +66 -0
- cannect/core/subversion.py +136 -0
- cannect/core/testcase/__init__.py +3 -0
- cannect/core/testcase/plotter.py +181 -0
- cannect/core/testcase/style.py +981 -0
- cannect/core/testcase/testcase.py +160 -0
- cannect/core/testcase/unitcase.py +227 -0
- cannect/errors.py +20 -0
- cannect/schema/__init__.py +5 -0
- cannect/schema/candb.py +226 -0
- cannect/schema/datadictionary.py +60 -0
- cannect/utils/__init__.py +3 -0
- cannect/utils/excel.py +29 -0
- cannect/utils/logger.py +81 -0
- cannect/utils/ppt.py +236 -0
- cannect/utils/tools.py +207 -0
- cannect-1.0.0.dist-info/METADATA +214 -0
- cannect-1.0.0.dist-info/RECORD +58 -0
- cannect-1.0.0.dist-info/WHEEL +5 -0
- cannect-1.0.0.dist-info/licenses/LICENSE +21 -0
- cannect-1.0.0.dist-info/top_level.txt +1 -0
cannect/__init__.py
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
__all__ = [
|
|
2
|
+
|
|
3
|
+
# .core
|
|
4
|
+
"Ascet",
|
|
5
|
+
"AscetCAN",
|
|
6
|
+
"DataBaseCAN",
|
|
7
|
+
"IR",
|
|
8
|
+
"Subversion",
|
|
9
|
+
|
|
10
|
+
# .utils
|
|
11
|
+
"ComExcel",
|
|
12
|
+
"Logger",
|
|
13
|
+
"Tools",
|
|
14
|
+
|
|
15
|
+
# .schema
|
|
16
|
+
"DataDictionary",
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
from cannect.config import mount
|
|
20
|
+
from cannect.core import ascet as Ascet
|
|
21
|
+
from cannect.core.can import AscetCAN, DataBaseCAN
|
|
22
|
+
from cannect.core.subversion import Subversion
|
|
23
|
+
from cannect.core.testcase import TestCase, UnitTestCase, Plot
|
|
24
|
+
from cannect.core.ir import IR
|
|
25
|
+
from cannect.core.ir.changehistory import ChangeHistoryManager
|
|
26
|
+
|
|
27
|
+
from cannect.schema import DataDictionary
|
|
28
|
+
|
|
29
|
+
from cannect.utils import ComExcel, Logger
|
|
30
|
+
from cannect.utils import tools as Tools
|
cannect/api/__init__.py
ADDED
|
File without changes
|
cannect/config.py
ADDED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
from cannect.schema.datadictionary import DataDictionary
|
|
2
|
+
from cannect.errors import InternalServerError
|
|
3
|
+
from datetime import datetime
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
import os, psutil
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
__namespace__ = {
|
|
9
|
+
"21301106": "김남균",
|
|
10
|
+
"22011005": "강지원",
|
|
11
|
+
"22011029": "김병욱",
|
|
12
|
+
"22011032": "김성령",
|
|
13
|
+
"22011033": "김성호",
|
|
14
|
+
"22011057": "김한솔",
|
|
15
|
+
"22011072": "문병헌",
|
|
16
|
+
"22011085": "박원진",
|
|
17
|
+
"22011110": "안성웅",
|
|
18
|
+
"22011115": "양웅",
|
|
19
|
+
"22011133": "이동훈",
|
|
20
|
+
"22403040": "이승욱",
|
|
21
|
+
"22011148": "이제혁",
|
|
22
|
+
"22011154": "이진노",
|
|
23
|
+
"22011160": "임동훈",
|
|
24
|
+
"22403041": "조규나",
|
|
25
|
+
"22011187": "조재형",
|
|
26
|
+
"22011206": "한대성"
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
E = ENV = env = DataDictionary(**os.environ)
|
|
31
|
+
E.COMPANY = "HYUNDAI KEFICO Co.,Ltd."
|
|
32
|
+
E.COPYRIGHT = f'Copyright {E.COMPANY} 2020-{datetime.now().year}. All rights reserved.'
|
|
33
|
+
E.DIVISION = "ELECTRIFICATION PT CONTROL TEAM 1"
|
|
34
|
+
E.KOREANAME = __namespace__.get(E.USERNAME, '알 수 없음')
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def mount(svn_path=None):
|
|
38
|
+
"""
|
|
39
|
+
cannect 사용자 초기 환경 설정(Configuration)
|
|
40
|
+
- KEFICO 도메인이 아닌 경우 오류 표출
|
|
41
|
+
- KEFICO 서버 접근 권한 및 SVN 권한 확인
|
|
42
|
+
- 전역 환경 변수 설정
|
|
43
|
+
:return:
|
|
44
|
+
"""
|
|
45
|
+
global E
|
|
46
|
+
|
|
47
|
+
if svn_path is None:
|
|
48
|
+
svn_path = Path(r"\\kefico\keti\ENT\SDT\SVN")
|
|
49
|
+
else:
|
|
50
|
+
svn_path = Path(svn_path)
|
|
51
|
+
|
|
52
|
+
# 운영 환경; KEFICO 도메인 확인
|
|
53
|
+
if not (
|
|
54
|
+
E.get('USERDNSDOMAIN', '') == 'KEFICO.GLOBAL' and
|
|
55
|
+
E.get('USERDOMAIN', '') == 'HKEFICO' and
|
|
56
|
+
E.get('USERDOMAIN_ROAMINGPROFILE', '') == 'HKEFICO'
|
|
57
|
+
):
|
|
58
|
+
raise PermissionError(f'USER: {e.get("USERNAME")} NOT AUTHORIZED')
|
|
59
|
+
|
|
60
|
+
# 전역 환경 변수 설정
|
|
61
|
+
E.DOWNLOADS = E.USERPROFILE / 'Downloads'
|
|
62
|
+
E.SVN = svn_path
|
|
63
|
+
E.SVN_CAN = svn_path / 'dev.bsw/hkmc.ems.bsw.docs/branches/HEPG_Ver1p1/11_ProjectManagement'
|
|
64
|
+
E.SVN_CANDB = E.SVN_CAN / 'CAN_Database'
|
|
65
|
+
E.SVN_CONF = svn_path / 'GSL_Build/1_AswCode_SVN/PostAppSW/0_XML/DEM_Rename'
|
|
66
|
+
E.SVN_HISTORY = svn_path / 'GSL_Release/4_SW변경이력'
|
|
67
|
+
E.SVN_IR = svn_path / 'GSL_Build/8_IntegrationRequest'
|
|
68
|
+
E.SVN_MODEL = svn_path / 'model/ascet/trunk'
|
|
69
|
+
E.SVN_UNECE = svn_path / 'Autron_CoWork/사이버보안/Module_Test_Results'
|
|
70
|
+
E.SVN_SDD = svn_path / 'GSL_Build/7_Notes'
|
|
71
|
+
for p in psutil.disk_partitions():
|
|
72
|
+
if (Path(p.device) / "ETASData").exists():
|
|
73
|
+
E.ETAS = Path(p.device) / "ETASData"
|
|
74
|
+
if (E.ETAS / "ASCET6.1").exists():
|
|
75
|
+
E.ASCET = Path(E.ETAS / "ASCET6.1")
|
|
76
|
+
|
|
77
|
+
# 접근 권한 1차 확인; KEFICO 서버 권한 확인
|
|
78
|
+
for key, path in E.items():
|
|
79
|
+
if key.startswith("SVN"):
|
|
80
|
+
if not path.exists():
|
|
81
|
+
raise InternalServerError(f"{{{path}}} NOT EXIST IN {E.COMPANY} SERVER")
|
|
82
|
+
|
|
83
|
+
# 접근 권한 2차 확인; SVN 권한 확인
|
|
84
|
+
for path in [
|
|
85
|
+
E.SVN_CAN,
|
|
86
|
+
E.SVN_CONF,
|
|
87
|
+
E.SVN_HISTORY,
|
|
88
|
+
E.SVN_IR,
|
|
89
|
+
E.SVN_MODEL,
|
|
90
|
+
E.SVN_UNECE,
|
|
91
|
+
E.SVN_SDD
|
|
92
|
+
]:
|
|
93
|
+
if not (path / ".svn").is_dir():
|
|
94
|
+
raise InternalServerError(f"{{{path}}} IS NOT LINKED TO SVN")
|
|
95
|
+
return
|
|
96
|
+
|
|
97
|
+
# Initialize
|
|
98
|
+
if E.USERNAME == '22011148':
|
|
99
|
+
mount(svn_path=Path(r"E:\SVN"))
|
|
100
|
+
else:
|
|
101
|
+
mount()
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
if __name__ == "__main__":
|
|
105
|
+
print(env.KOREANAME)
|
|
106
|
+
print(env.TEMP)
|
|
107
|
+
print(env.USERPROFILE / 'Downloads')
|
|
108
|
+
print(env.SVN)
|
|
109
|
+
print(env.SVN_CAN)
|
|
110
|
+
print(env.SVN_CANDB)
|
|
111
|
+
print(env.SVN_SDD)
|
|
112
|
+
print(env.ETAS)
|
|
113
|
+
print(env.ASCET)
|
|
114
|
+
# print(env)
|
cannect/core/__init__.py
ADDED
|
File without changes
|