Phase 0 of expert feedback (#1~#11): infrastructure + design + 1차 fixes
Implementations (즉시 동작): - #1 crash logging: harness/crash_logger.py (sys.excepthook + threading + faulthandler, 회전 파일 logs/scanvas.log). main 진입점 통합. - #2 smooth curves (1차): gate_3d_builder ogee profile를 arc-length parametric CubicSpline로 4× densify (8pt→32pt, 36→132 cells, 60 FPS 안전). - #3 TIN colormap: matplotlib "terrain"의 파란색 범위 제거 → 짙은갈색→황토→ 모래→능선 LinearSegmentedColormap. 9 사이트 교체. 회귀 테스트 추가. - #5 uv: pyproject.toml + UV_GUIDE.md. base/[py313]/[dev]/[build] extras + hatchling. - #6,#7,#8 dev cycle infra: .pre-commit-config.yaml (ruff+secrets+위생), .gitea/workflows/ci.yml (Py3.11+3.13 matrix), tests/test_regressions.py (18 회귀 테스트, iter=1~7 fix 박제), CONTRIBUTING.md (Red→Green 알고리즘). Design docs (다음 세션 마이그레이션 청사진): - #4 UI/UX 전면 수정: UI_REDESIGN_PLAN.md (12 popup→1 inspector, vtkTkRenderWidget embedding 게이트, 4 phase × 7 sessions). - #10 Core/Plugin: ARCHITECTURE_PLAN.md (Core 14 / Plugin 7 구조물 + 2 렌더 + 1 QA, STRUCTURE_REGISTRY 확장, manifest 기반 디스커버리). - #11 perf hotspots: PERFORMANCE_BASELINE.md (19 핫스팟, P1: 타일 직렬DL 5~30s, 캡처 직렬 4.5~15s, numpy 벡터화 가능 Python loops, 텍스처 4회 반복read). Behavior preservation: ruff 0 errors, pytest 17 passed/1 skipped(bpy), import 33/33 OK on Py3.13.13. Item #2 P2/P3 곡선, #4 UI 마이그레이션, #10 Phase 1 추출, #11 P1 최적화는 차기 세션. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
144
pyproject.toml
Normal file
144
pyproject.toml
Normal file
@@ -0,0 +1,144 @@
|
||||
# S-CANVAS — Python project metadata + uv-compatible dependency declaration.
|
||||
#
|
||||
# 사용법 (uv 권장 — 피드백 #5):
|
||||
# uv venv # 가상환경 생성 (.venv)
|
||||
# uv pip install -e . # 본 프로젝트 + 일반 deps
|
||||
# uv pip install -e ".[py313]" # Python 3.13 호환 변종
|
||||
# uv pip install -e ".[dev]" # 개발 도구 (ruff, pytest, pre-commit)
|
||||
#
|
||||
# 기존 pip 사용자도 호환:
|
||||
# pip install -e .
|
||||
#
|
||||
# 원본 requirements.txt는 build machine 빌드 재현용으로 보존.
|
||||
|
||||
[project]
|
||||
name = "scanvas"
|
||||
version = "0.7.0"
|
||||
description = "S-CANVAS — Generative Design & Visualization Engine (DXF + DEM + AI)"
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.9"
|
||||
license = { text = "Proprietary" }
|
||||
authors = [
|
||||
{ name = "Saman Corp.", email = "saman@example.com" },
|
||||
]
|
||||
keywords = ["cad", "dxf", "civil-engineering", "3d-visualization", "ai-rendering"]
|
||||
|
||||
# 기본 의존성 (build machine 핀 — Py3.9~3.12 검증).
|
||||
dependencies = [
|
||||
# --- GUI ---
|
||||
"customtkinter==5.2.2",
|
||||
"tkintermapview==1.29",
|
||||
"Pillow==11.3.0",
|
||||
|
||||
# --- 3D / mesh ---
|
||||
"pyvista==0.46.5",
|
||||
|
||||
# --- Geospatial / DXF ---
|
||||
"ezdxf==1.4.2",
|
||||
"pyproj==3.6.1",
|
||||
"rasterio==1.4.3",
|
||||
|
||||
# --- Numerical ---
|
||||
"numpy==2.0.2",
|
||||
"scipy==1.13.1",
|
||||
"matplotlib==3.9.4",
|
||||
|
||||
# --- Image / video ---
|
||||
"opencv-python==4.13.0.92",
|
||||
|
||||
# --- Network ---
|
||||
"requests==2.32.5",
|
||||
|
||||
# --- AI rendering ---
|
||||
"google-genai==1.47.0",
|
||||
"google-auth==2.49.2",
|
||||
|
||||
# --- Persistence / logging ---
|
||||
"SQLAlchemy==2.0.49",
|
||||
"structlog==25.5.0",
|
||||
"PyYAML==6.0.3",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
# Python 3.13 호환 변종 (wheel 미배포 패키지 핀 변경).
|
||||
py313 = [
|
||||
"pyproj>=3.7,<4",
|
||||
"scipy>=1.14",
|
||||
"numpy>=2.0.2",
|
||||
# 나머지 핀은 base와 동일 (uv가 자동 충돌 해결).
|
||||
]
|
||||
|
||||
# 개발 도구.
|
||||
dev = [
|
||||
"ruff>=0.15",
|
||||
"pytest>=8.0",
|
||||
"pytest-xdist>=3.5", # 병렬 테스트
|
||||
"pytest-cov>=5.0", # 커버리지
|
||||
"pre-commit>=3.7",
|
||||
]
|
||||
|
||||
# 배포용 .exe 빌드.
|
||||
build = [
|
||||
"pyinstaller==6.18.0",
|
||||
]
|
||||
|
||||
[project.scripts]
|
||||
scanvas = "scanvas_maker:_cli_entry" # 향후 CLI 진입점 노출 시 사용 (현재는 GUI 직접 실행)
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://gitea.hmac.kr/HYUNJUNGLEE/scanvas"
|
||||
Repository = "https://gitea.hmac.kr/HYUNJUNGLEE/scanvas.git"
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# uv 전용 설정
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
[tool.uv]
|
||||
# uv lock 파일 사용 (재현 가능 환경).
|
||||
# 명령: `uv lock` → uv.lock 생성/갱신, `uv sync` → 환경 동기화.
|
||||
|
||||
# Python 인터프리터 선택 우선순위 (uv가 자동 검색).
|
||||
python-preference = "managed" # managed = uv가 직접 받아 관리 (3.13 자동 다운로드 가능)
|
||||
|
||||
# 색상/진행률 표시.
|
||||
no-progress = false
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# 빌드 시스템 (편집 가능 설치 / pip install -e . 가능)
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
[build-system]
|
||||
requires = ["hatchling"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
# 단일 모듈 + 패키지 혼합 — root의 .py 파일들과 harness/ 패키지 모두 wheel에 포함.
|
||||
packages = ["harness"]
|
||||
include = [
|
||||
"*.py",
|
||||
"prompt_templates/**/*.yaml",
|
||||
"structure_types/**/*.yaml",
|
||||
]
|
||||
exclude = [
|
||||
"*.bak*",
|
||||
"_unused/**",
|
||||
"workspace/**",
|
||||
"venv*/**",
|
||||
"__pycache__/**",
|
||||
"test/**",
|
||||
"tests/**",
|
||||
]
|
||||
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
# Tooling — ruff/pytest config는 별도 파일(ruff.toml)에 있음. 여기는 보조 설정만.
|
||||
# ─────────────────────────────────────────────────────────────────────────
|
||||
[tool.pytest.ini_options]
|
||||
testpaths = ["tests"]
|
||||
python_files = ["test_*.py"]
|
||||
addopts = [
|
||||
"-ra", # short test summary for all
|
||||
"--strict-markers",
|
||||
"--tb=short",
|
||||
]
|
||||
markers = [
|
||||
"slow: 무거운 통합 테스트 (DXF/렌더 포함)",
|
||||
"integration: 외부 서비스 (Gemini API 등) 호출",
|
||||
]
|
||||
Reference in New Issue
Block a user