데이터 파이프라인 이식

This commit is contained in:
2026-01-24 08:41:22 +09:00
parent 84d4decd3a
commit fb6570a992
20 changed files with 3277 additions and 0 deletions

49
git-hooks/pre-commit.ps1 Normal file
View File

@@ -0,0 +1,49 @@
# git-hooks/pre-commit.ps1
Write-Host "🔍 Pre-commit: Validating game data..." -ForegroundColor Cyan
# 변경된 CSV 파일 확인
$changedFiles = git diff --cached --name-only --diff-filter=ACM
$CSVFiles = $changedFiles | Where-Object { $_ -match "GameData/.*\.csv$" }
if ($CSVFiles.Count -eq 0) {
Write-Host " 변경된 CSV 파일이 없습니다." -ForegroundColor Gray
exit 0
}
Write-Host "📊 검증할 파일:" -ForegroundColor Yellow
$CSVFiles | ForEach-Object { Write-Host " - $_" }
Write-Host ""
# Python 설치 확인
$pythonCmd = Get-Command python -ErrorAction SilentlyContinue
if (-not $pythonCmd) {
Write-Host "❌ Python이 설치되어 있지 않습니다." -ForegroundColor Red
Write-Host "💡 https://www.python.org/downloads/ 에서 Python을 설치하세요." -ForegroundColor Yellow
exit 1
}
# 검증 스크립트 실행
Push-Location DataTools
try {
python validate_data.py
$exitCode = $LASTEXITCODE
Pop-Location
if ($exitCode -ne 0) {
Write-Host ""
Write-Host "❌ 데이터 검증 실패!" -ForegroundColor Red
Write-Host "💡 CSV 파일을 수정 후 다시 커밋해주세요." -ForegroundColor Yellow
exit 1
}
Write-Host "✅ 데이터 검증 통과!" -ForegroundColor Green
exit 0
}
catch {
Pop-Location
Write-Host "❌ 검증 중 오류 발생: $_" -ForegroundColor Red
exit 1
}