cannect 1.0.3__tar.gz → 1.0.4__tar.gz

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.
Files changed (64) hide show
  1. {cannect-1.0.3/src/cannect.egg-info → cannect-1.0.4}/PKG-INFO +8 -4
  2. {cannect-1.0.3 → cannect-1.0.4}/README.md +7 -3
  3. {cannect-1.0.3 → cannect-1.0.4}/pyproject.toml +2 -2
  4. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ir/delivereables.py +4 -9
  5. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ir/ir.py +1 -21
  6. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/utils/tools.py +7 -2
  7. {cannect-1.0.3 → cannect-1.0.4/src/cannect.egg-info}/PKG-INFO +8 -4
  8. {cannect-1.0.3 → cannect-1.0.4}/LICENSE +0 -0
  9. {cannect-1.0.3 → cannect-1.0.4}/setup.cfg +0 -0
  10. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/__init__.py +0 -0
  11. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/api/__init__.py +0 -0
  12. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/config.py +0 -0
  13. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/__init__.py +0 -0
  14. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ascet/__init__.py +0 -0
  15. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ascet/amd.py +0 -0
  16. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ascet/formula.py +0 -0
  17. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ascet/oid.py +0 -0
  18. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ascet/ws.py +0 -0
  19. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/__init__.py +0 -0
  20. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/ascet/__init__.py +0 -0
  21. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/ascet/_db2code.py +0 -0
  22. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/ascet/_db2elem.py +0 -0
  23. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/ascet/comdef.py +0 -0
  24. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/ascet/comrx.py +0 -0
  25. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/ascet/diag.py +0 -0
  26. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/__init__.py +0 -0
  27. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/_dbc.py +0 -0
  28. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/reader.py +0 -0
  29. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/schema.py +0 -0
  30. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/specification/__init__.py +0 -0
  31. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/specification/message.py +0 -0
  32. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/specification/styles.py +0 -0
  33. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/specification/wrapper.py +0 -0
  34. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/db/vcs.py +0 -0
  35. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/rule.py +0 -0
  36. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/testcase/__init__.py +0 -0
  37. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/testcase/unitcase/__init__.py +0 -0
  38. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/testcase/unitcase/asw2can.py +0 -0
  39. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/testcase/unitcase/decode.py +0 -0
  40. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/testcase/unitcase/diagnosis.py +0 -0
  41. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/can/testcase/unitcase/encode.py +0 -0
  42. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ir/__init__.py +0 -0
  43. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ir/changehistory.py +0 -0
  44. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ir/diff.py +0 -0
  45. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/ir/sdd.py +0 -0
  46. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/mdf.py +0 -0
  47. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/subversion.py +0 -0
  48. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/testcase/__init__.py +0 -0
  49. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/testcase/plotter.py +0 -0
  50. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/testcase/style.py +0 -0
  51. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/testcase/testcase.py +0 -0
  52. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/core/testcase/unitcase.py +0 -0
  53. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/errors.py +0 -0
  54. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/schema/__init__.py +0 -0
  55. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/schema/candb.py +0 -0
  56. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/schema/datadictionary.py +0 -0
  57. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/utils/__init__.py +0 -0
  58. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/utils/excel.py +0 -0
  59. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/utils/logger.py +0 -0
  60. {cannect-1.0.3 → cannect-1.0.4}/src/cannect/utils/ppt.py +0 -0
  61. {cannect-1.0.3 → cannect-1.0.4}/src/cannect.egg-info/SOURCES.txt +0 -0
  62. {cannect-1.0.3 → cannect-1.0.4}/src/cannect.egg-info/dependency_links.txt +0 -0
  63. {cannect-1.0.3 → cannect-1.0.4}/src/cannect.egg-info/requires.txt +0 -0
  64. {cannect-1.0.3 → cannect-1.0.4}/src/cannect.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cannect
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: HYUNDAI-KEFICO EMS/ASW CONVENIENCE TOOL
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -265,6 +265,10 @@ print(vc.name) # DB 파일 이름 (확장자 제외)
265
265
  print(vc.filename) # DB 파일 이름 (확장자 포함)
266
266
  print(vc.revision) # DB 파일 최신 SVN Revision
267
267
  print(vc.filepath) # DB 파일 경로 (전체 경로)
268
+
269
+ # 현재 SVN 최신 CAN Excel SPEC에 대한 json 파일이 없는 경우 .json 호출 시 오류 발생
270
+ # 오류 발생 시 .to_json() 메소드 실행 필요
271
+ # vc.to_json()
268
272
  print(vc.json) # .revision에 해당하는 json 파일(전체 경로)
269
273
  print(vc.history) # DB 파일 SVN 이력
270
274
  ```
@@ -449,7 +453,7 @@ ir.deliverables = "사용자의 로컬 경로 지정"
449
453
  # - mode == "latest" : 대상 모델 Commit 미완료 상태, 최신 revision을 "변경 전" 모델로 간주 (기본 값)
450
454
  # - mode == "previous": 대상 모델 Commit 완료 상태, 직전 revision을 "변경 전" 모델로 간주
451
455
  # - mode == "select" : 대상 모델에 대한 revision을 사용자가 모두 선택(console)
452
- ir.select_previous_svn_version(mode="latest")
456
+ ir.select_previous_svn_version(mode="previous")
453
457
 
454
458
  # SDD 자동 업데이트 (잠재적 오류 내포)
455
459
  # 사용자는 개발 내용(이력)만 입력, 그 외 버전 관리는 자동 수행
@@ -492,11 +496,11 @@ from cannect import ChangeHistoryManager
492
496
 
493
497
  # ir 인스턴스가 존재한다고 가정
494
498
  # ∵ ir = IntegrationRequest(*modeuls)
495
- ppt = ChanHistoryManager(ir)
499
+ ppt = ChangeHistoryManager(ir)
496
500
 
497
501
  # 1페이지 작성
498
502
  ppt.title = "[CAN/공통] CAN BUS-OFF Recover Post Run 할당" # 제목
499
- ppt.developer = ir.User # 개발 담당
503
+ ppt.developer = "이*혁" # 개발 담당
500
504
  ppt.issue = "VCDM CR10786223" # Issue
501
505
  ppt.lcr = "자체 개선" # LCR
502
506
  ppt.problem = "OTA 업데이트 평가 중, ... 발생" # 문제 현상
@@ -239,6 +239,10 @@ print(vc.name) # DB 파일 이름 (확장자 제외)
239
239
  print(vc.filename) # DB 파일 이름 (확장자 포함)
240
240
  print(vc.revision) # DB 파일 최신 SVN Revision
241
241
  print(vc.filepath) # DB 파일 경로 (전체 경로)
242
+
243
+ # 현재 SVN 최신 CAN Excel SPEC에 대한 json 파일이 없는 경우 .json 호출 시 오류 발생
244
+ # 오류 발생 시 .to_json() 메소드 실행 필요
245
+ # vc.to_json()
242
246
  print(vc.json) # .revision에 해당하는 json 파일(전체 경로)
243
247
  print(vc.history) # DB 파일 SVN 이력
244
248
  ```
@@ -423,7 +427,7 @@ ir.deliverables = "사용자의 로컬 경로 지정"
423
427
  # - mode == "latest" : 대상 모델 Commit 미완료 상태, 최신 revision을 "변경 전" 모델로 간주 (기본 값)
424
428
  # - mode == "previous": 대상 모델 Commit 완료 상태, 직전 revision을 "변경 전" 모델로 간주
425
429
  # - mode == "select" : 대상 모델에 대한 revision을 사용자가 모두 선택(console)
426
- ir.select_previous_svn_version(mode="latest")
430
+ ir.select_previous_svn_version(mode="previous")
427
431
 
428
432
  # SDD 자동 업데이트 (잠재적 오류 내포)
429
433
  # 사용자는 개발 내용(이력)만 입력, 그 외 버전 관리는 자동 수행
@@ -466,11 +470,11 @@ from cannect import ChangeHistoryManager
466
470
 
467
471
  # ir 인스턴스가 존재한다고 가정
468
472
  # ∵ ir = IntegrationRequest(*modeuls)
469
- ppt = ChanHistoryManager(ir)
473
+ ppt = ChangeHistoryManager(ir)
470
474
 
471
475
  # 1페이지 작성
472
476
  ppt.title = "[CAN/공통] CAN BUS-OFF Recover Post Run 할당" # 제목
473
- ppt.developer = ir.User # 개발 담당
477
+ ppt.developer = "이*혁" # 개발 담당
474
478
  ppt.issue = "VCDM CR10786223" # Issue
475
479
  ppt.lcr = "자체 개선" # LCR
476
480
  ppt.problem = "OTA 업데이트 평가 중, ... 발생" # 문제 현상
@@ -4,8 +4,8 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "cannect"
7
- version = "1.0.3"
8
- description = "HYUNDAI-KEFICO EMS/ASW CONVENIENCE TOOL"
7
+ version = "1.0.4"
8
+ description = "HYUNDAI-KEFICO EMS/ASW CONVENIENCE TOOL\nAUTHOR: LEE JEHYEUK\nCONTACT: JeHyeuk.Lee@hyundai-kefico.com"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  dependencies = [
@@ -2,7 +2,7 @@ from cannect.config import env
2
2
  from cannect.utils import tools
3
3
  from pathlib import Path
4
4
  from datetime import datetime
5
- import os
5
+ import os, stat
6
6
 
7
7
 
8
8
  class Deliverables:
@@ -31,6 +31,7 @@ class Deliverables:
31
31
  root = self.Root
32
32
 
33
33
  os.makedirs(root, exist_ok=True)
34
+ os.chmod(root, stat.S_IWRITE)
34
35
  for n, path in enumerate(self.__slots__, start=0):
35
36
  if path == "Root":
36
37
  continue
@@ -43,16 +44,10 @@ class Deliverables:
43
44
  os.makedirs(os.path.join(full_path, f'Post'), exist_ok=True)
44
45
 
45
46
  if not any(file.endswith('.xlsm') for file in os.listdir(root)):
46
- try:
47
- tools.copy_to(env.SVN_IR / '0000_HNB_SW_IR_.xlsm', root)
48
- except PermissionError:
49
- pass
47
+ tools.copy_to(env.SVN_IR / '0000_HNB_SW_IR_.xlsm', root)
50
48
 
51
49
  if not any(file.endswith('.pptx') for file in os.listdir(root)):
52
- try:
53
- tools.copy_to(env.SVN_HISTORY / '0000_변경내역서 양식.pptx', root)
54
- except PermissionError:
55
- pass
50
+ tools.copy_to(env.SVN_HISTORY / '0000_변경내역서 양식.pptx', root)
56
51
  return
57
52
 
58
53
  def __getitem__(self, item):
@@ -498,7 +498,7 @@ class IntegrationRequest:
498
498
  self.logger.log(f' -> v{status}')
499
499
  else:
500
500
  self.logger.log(f' -> v{sdd.version_doc}')
501
- tools.copy_to(file, path)
501
+ tools.copy_to(file, path / row['SDDName'].replace('.zip', ''))
502
502
  tools.clear(temp, leave_path=True)
503
503
  return
504
504
 
@@ -561,23 +561,3 @@ if __name__ == "__main__":
561
561
  ir.resolve_sdd_version()
562
562
  ir.compare_model(prev='', post='', exclude_imported=False)
563
563
 
564
- # 변경내역서 작성
565
- # ppt = ChangeHistoryManager(
566
- # path=ir.deliverables["0000_CNGPIO_통신_인터페이스_개발_CANFD"],
567
- # logger=ir.logger
568
- # )
569
- # ppt.title = "[CAN] 송출 신호 음수 범위 미표출 오류 개선"
570
- # ppt.developer = "이제혁"
571
- # ppt.function = ir.table["FunctionName"]
572
- # ppt.issue = "VCDM CR10787115"
573
- # ppt.lcr = "자체 개선"
574
- # ppt.problem = "CF_Ems_DecelReq_Can 신호 음수 범위 표출 불가"
575
- # ppt.prev_model_description = ir.p_table # .select_previous_svn_version() 후행
576
- # ppt.post_model_description = ir.table
577
- # ppt.set_model_slides(ir.table)
578
- # ppt.prev_model_details = ir.p_table # .select_previous_svn_version() 후행
579
- # ppt.post_model_details = ir.table
580
- # ppt.parameters = ir.parameters # .compare_model()의 후행
581
-
582
- print(ir)
583
- # ir.to_clipboard()
@@ -3,7 +3,7 @@ from pathlib import Path
3
3
  from typing import Callable, Iterable, List, Union
4
4
  from xml.etree.ElementTree import Element, ElementTree
5
5
  from xml.dom import minidom
6
- import os, zipfile, shutil, io, re
6
+ import os, zipfile, shutil, io, re, stat
7
7
 
8
8
 
9
9
  def unzip(src: Union[str, Path], to: Union[str, Path] = "") -> bool:
@@ -39,7 +39,12 @@ def zip(path:Union[str, Path]):
39
39
  return
40
40
 
41
41
  def copy_to(file:Union[str, Path], dst:Union[str, Path]) -> str:
42
- shutil.copy(file, dst)
42
+ if os.path.isfile(str(file)):
43
+ os.chmod(dst, stat.S_IWRITE)
44
+ os.chmod(file, stat.S_IWRITE)
45
+ shutil.copy(file, dst)
46
+ else:
47
+ shutil.copytree(file, dst, dirs_exist_ok=True)
43
48
  # if '.' in os.path.basename(file):
44
49
  # shutil.copy(file, dst)
45
50
  # else:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cannect
3
- Version: 1.0.3
3
+ Version: 1.0.4
4
4
  Summary: HYUNDAI-KEFICO EMS/ASW CONVENIENCE TOOL
5
5
  Requires-Python: >=3.10
6
6
  Description-Content-Type: text/markdown
@@ -265,6 +265,10 @@ print(vc.name) # DB 파일 이름 (확장자 제외)
265
265
  print(vc.filename) # DB 파일 이름 (확장자 포함)
266
266
  print(vc.revision) # DB 파일 최신 SVN Revision
267
267
  print(vc.filepath) # DB 파일 경로 (전체 경로)
268
+
269
+ # 현재 SVN 최신 CAN Excel SPEC에 대한 json 파일이 없는 경우 .json 호출 시 오류 발생
270
+ # 오류 발생 시 .to_json() 메소드 실행 필요
271
+ # vc.to_json()
268
272
  print(vc.json) # .revision에 해당하는 json 파일(전체 경로)
269
273
  print(vc.history) # DB 파일 SVN 이력
270
274
  ```
@@ -449,7 +453,7 @@ ir.deliverables = "사용자의 로컬 경로 지정"
449
453
  # - mode == "latest" : 대상 모델 Commit 미완료 상태, 최신 revision을 "변경 전" 모델로 간주 (기본 값)
450
454
  # - mode == "previous": 대상 모델 Commit 완료 상태, 직전 revision을 "변경 전" 모델로 간주
451
455
  # - mode == "select" : 대상 모델에 대한 revision을 사용자가 모두 선택(console)
452
- ir.select_previous_svn_version(mode="latest")
456
+ ir.select_previous_svn_version(mode="previous")
453
457
 
454
458
  # SDD 자동 업데이트 (잠재적 오류 내포)
455
459
  # 사용자는 개발 내용(이력)만 입력, 그 외 버전 관리는 자동 수행
@@ -492,11 +496,11 @@ from cannect import ChangeHistoryManager
492
496
 
493
497
  # ir 인스턴스가 존재한다고 가정
494
498
  # ∵ ir = IntegrationRequest(*modeuls)
495
- ppt = ChanHistoryManager(ir)
499
+ ppt = ChangeHistoryManager(ir)
496
500
 
497
501
  # 1페이지 작성
498
502
  ppt.title = "[CAN/공통] CAN BUS-OFF Recover Post Run 할당" # 제목
499
- ppt.developer = ir.User # 개발 담당
503
+ ppt.developer = "이*혁" # 개발 담당
500
504
  ppt.issue = "VCDM CR10786223" # Issue
501
505
  ppt.lcr = "자체 개선" # LCR
502
506
  ppt.problem = "OTA 업데이트 평가 중, ... 발생" # 문제 현상
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes