Files
s-canvas/pyproject.toml
HYUNJUNGLEE fc963007b7
All checks were successful
CI / Ruff + Test (Py3.11 + Py3.13) (3.11) (push) Successful in 23s
CI / Ruff + Test (Py3.11 + Py3.13) (3.13) (push) Successful in 23s
fix(ci): uv lock 생성 + setup-uv 옵션 정리 + UI 진행률 인디케이터 (#6, #4 부분)
CI uv setup 실패 (#6 후속):
- 원인: astral-sh/setup-uv@v3 의 enable-cache:true 가 **/uv.lock 미발견 시 fail.
  7개 push 모두 ::error::No file ... matched to [**/uv.lock] → 10-20초 만에 abort.
- 해결: uv.lock 생성 (438KB, 89 packages 해결) + cache-dependency-glob 명시.

연쇄 수정 (uv.lock 생성 과정에서 노출):
- pyproject.toml: scipy/pyproj/numpy 핀을 hard-pin == 에서 range > = 로 완화
  (base vs [py313] extras 충돌 해소). requires-python ">=3.9" → ">=3.11"
  (pyproj>=3.7 wheel 가용 환경과 일치). [tool.uv] no-progress = false 제거 (deprecated).
- .gitea/workflows/ci.yml: 별도 Setup Python step 제거 (uv venv가 자동 fetch),
  install step 단순화 (matrix 분기 EXTRAS 변수), 모든 run: 에 shell: bash 명시.

UI 진행률 인디케이터 (#4 부분):
- self.progress_bar (CTkProgressBar mode=indeterminate, MC overlap orange #FF5F00)
  status_bar 우측에 hidden 배치. start_progress(label)/stop_progress() 메서드 추가.
- self.textbox height 120 → 80 (인라인 로그 비중 축소, 백엔드 파일이 주 기록처).

ruff cleanup (harness/perf.py):
- Optional[Callable[...]] → Callable[...] | None (UP045).
- try/except/pass → contextlib.suppress (SIM105).
- 미사용 # noqa: BLE001 제거 (RUF100).

검증: uv lock 성공, ruff check All checks passed, py_compile + AST OK.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-08 17:13:33 +09:00

144 lines
5.2 KiB
TOML

# 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"
# pyproj>=3.7 (py313 extras) 이 Py3.11+ 만 지원. CI matrix Py3.11/3.13 와 일치.
# Py3.9/3.10 legacy 지원이 필요하면 pyproj 범위 좁혀야 함.
requires-python = ">=3.11"
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,<4", # 3.6.1 (build pin) ~ 3.7+ (py313 extras) 동시 수용. lock 파일이 정확 핀.
"rasterio==1.4.3",
# --- Numerical ---
"numpy>=2.0.2,<3", # py313 extras 와 충돌 방지 위해 범위 핀.
"scipy>=1.13,<2", # 1.13.x (Py3.9~3.12) ~ 1.14+ (Py3.13) 둘 다 lock 가능.
"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 자동 다운로드 가능)
# ─────────────────────────────────────────────────────────────────────────
# 빌드 시스템 (편집 가능 설치 / 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 등) 호출",
]