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>
87 lines
2.6 KiB
YAML
87 lines
2.6 KiB
YAML
# Gitea Actions — Red → Green 게이트.
|
|
# 피드백 #6: "Git을 이용해서 개발 cycle (Red→Green)이 완료되면 Git(s-canvas)에 자동
|
|
# 업로드 프로세스 구축 (ruff, pytest 등을 적극 활용)"
|
|
#
|
|
# 트리거: push 모든 브랜치, PR. main 브랜치는 추가 보호.
|
|
#
|
|
# Stage 구성:
|
|
# 1. ruff (린트) — 30초 미만
|
|
# 2. py_compile (전체 syntax) — 10초 미만
|
|
# 3. pytest (회귀 + 빠른 단위) — 1~2분
|
|
# 4. (선택) coverage report
|
|
#
|
|
# 모두 통과 = Green. main 브랜치는 Green 통과 시에만 push 허용 (Gitea repo 설정).
|
|
|
|
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
lint-and-test:
|
|
name: Ruff + Test (Py3.11 + Py3.13)
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.11", "3.13"]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup uv (fast Python pkg manager)
|
|
uses: astral-sh/setup-uv@v3
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Setup Python ${{ matrix.python-version }}
|
|
run: uv python install ${{ matrix.python-version }}
|
|
|
|
- name: Install deps
|
|
run: |
|
|
uv venv .venv --python ${{ matrix.python-version }}
|
|
uv pip install --python .venv -e ".[dev]"
|
|
# Py3.13은 호환 핀 별도
|
|
if [ "${{ matrix.python-version }}" = "3.13" ]; then
|
|
uv pip install --python .venv -e ".[py313,dev]"
|
|
fi
|
|
|
|
- name: Ruff lint
|
|
run: |
|
|
source .venv/bin/activate
|
|
ruff check --output-format=github
|
|
|
|
- name: py_compile (전체 .py)
|
|
run: |
|
|
source .venv/bin/activate
|
|
python -c "
|
|
import py_compile, pathlib, sys
|
|
errs = []
|
|
for p in sorted(pathlib.Path('.').rglob('*.py')):
|
|
if any(s in str(p) for s in ('venv', '_unused', '__pycache__', '.bak')):
|
|
continue
|
|
try:
|
|
py_compile.compile(str(p), doraise=True)
|
|
except py_compile.PyCompileError as e:
|
|
errs.append((p, str(e)[:200]))
|
|
for p, m in errs:
|
|
print(f'::error file={p}::{m}')
|
|
sys.exit(1 if errs else 0)
|
|
"
|
|
|
|
- name: pytest (회귀)
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest -ra --tb=short -m "not slow and not integration"
|
|
|
|
- name: pytest (slow + integration, allow failure)
|
|
if: ${{ matrix.python-version == '3.13' }}
|
|
continue-on-error: true
|
|
run: |
|
|
source .venv/bin/activate
|
|
pytest -ra --tb=short -m "slow or integration"
|