Skip to content

Fix Discovery.py encoding and add local status check script#11

Draft
Copilot wants to merge 3 commits into
devVeriACLossfrom
copilot/check-local-status
Draft

Fix Discovery.py encoding and add local status check script#11
Copilot wants to merge 3 commits into
devVeriACLossfrom
copilot/check-local-status

Conversation

Copilot AI commented Mar 31, 2026

Copy link
Copy Markdown

Discovery.py (auto-generated by Motor-CAD v2025.2.2) contained a Korean timestamp comment (오후 = PM) encoded in EUC-KR/CP949 with no encoding declaration, causing Python 3 to raise a SyntaxError on import. A new check_local_status.py utility provides a quick snapshot of the local development environment.

Changes

  • Discovery.py: Converted file encoding from EUC-KR to UTF-8 so Python 3 can parse it without error.
  • check_local_status.py (new): Standalone script reporting:
    • Python version & platform
    • Key package availability (numpy, scipy, matplotlib, pandas, nbformat, jupyter)
    • Presence of key repo directories and files
    • .m file counts by category (Class, tests, tools)
    • Simulation result file counts by type (.mat, .json, .mot, .jmag)
$ python check_local_status.py
==================================================
  eMach local status check
  Root: /path/to/eMach
==================================================

[Python environment]
  [OK]  Python  (3.12.3)

[Repository structure]
  [OK]  Class/
  [OK]  tools/
  ...

[MATLAB files (.m)]
  [OK]  Total .m files found  (1572)
...

Copilot AI and others added 2 commits March 31, 2026 10:17
Copilot AI changed the title [WIP] Add functionality to check local status Fix Discovery.py encoding and add local status check script Mar 31, 2026
Copilot AI requested a review from enjoyneer87 March 31, 2026 10:20
@enjoyneer87

Copy link
Copy Markdown
Owner

@copilot 로컬에서 chat으로 파이썬코드를 리팩토링하고 코드를 수정하는거랑 cli를 이용해서 하는거중에 어느게 토큰대비 효율적이면서 컨텍스트도 길게 이해하지?

Copilot AI commented Apr 1, 2026

Copy link
Copy Markdown
Author

@copilot 로컬에서 chat으로 파이썬코드를 리팩토링하고 코드를 수정하는거랑 cli를 이용해서 하는거중에 어느게 토큰대비 효율적이면서 컨텍스트도 길게...

간단히 비교하면:

Chat (Copilot Chat / 에이전트)

  • 장점: 여러 파일에 걸친 긴 컨텍스트를 한 번에 이해 가능, 리팩토링 의도/배경 설명 후 코드 수정 요청 가능
  • 단점: 대화가 길어질수록 토큰 소모가 빠름 (이전 대화 전체가 매 요청에 포함됨)

CLI (aider, Copilot CLI 등)

  • 장점: 파일 diff만 주고받아 토큰 효율이 높음, 대규모 파일 변경에 유리
  • 단점: 컨텍스트 전달을 직접 관리해야 하고 (어떤 파일을 포함할지), 여러 파일에 걸친 리팩토링은 설정이 번거로움

결론 – eMach 같은 MATLAB/Python 혼합 레포 기준:

  • 소규모·단일 파일 수정 → CLI가 토큰 효율적
  • 여러 파일에 걸친 리팩토링 또는 "이 클래스 구조 전체를 이해하고 바꿔줘" 같은 작업 → Chat/에이전트가 컨텍스트 유지 면에서 유리
  • aider (aider --model gpt-4o)는 두 장점을 절충: repo-map으로 전체 구조를 파악하면서 diff 방식으로 토큰을 절약해 중간 규모 리팩토링에 적합합니다.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants