Compare commits

..

9 Commits

Author SHA1 Message Date
kjh2064 1690510999 Merge pull request '[CHORE] Gitea CI 워크플로우 runs-on 라벨 수정' (#5) from feature/ci-runner-update into main
Quant Engine CI/CD Pipeline / validate-core (push) Failing after 2m14s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been skipped
Reviewed-on: http://178.104.200.7/kjh2064/QuantEngineByItz/pulls/5
2026-06-25 15:27:16 +09:00
kjh2064 0ab11bbe30 Merge pull request '[CHORE] Local KIS 데이터 수집 DB 갱신 반영' (#4) from feature/db-update into main
Quant Engine CI/CD Pipeline / validate-core (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been cancelled
Reviewed-on: http://178.104.200.7/kjh2064/QuantEngineByItz/pulls/4
2026-06-25 15:27:09 +09:00
kjh2064 956aaed9da Merge pull request '[TEST/DOCS] 검증 체계 고도화 및 플랫폼 통합 검증 보완' (#3) from codex/topic-testing-validation into main
Quant Engine CI/CD Pipeline / validate-core (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been cancelled
Snapshot Admin Web Validation / validate-snapshot-admin-smoke (push) Has been cancelled
Snapshot Admin Web Validation / validate-snapshot-admin-full (push) Has been cancelled
Reviewed-on: http://178.104.200.7/kjh2064/QuantEngineByItz/pulls/3
2026-06-25 15:27:01 +09:00
kjh2064 b567cc164c Merge pull request '[REFACTOR] 한국투자증권(KIS) 데이터 수집 엔진 효율화 및 DB 인프라 최적화' (#2) from codex/topic-kis-collector into main
Quant Engine CI/CD Pipeline / validate-core (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Has been cancelled
Reviewed-on: http://178.104.200.7/kjh2064/QuantEngineByItz/pulls/2
2026-06-25 15:26:52 +09:00
kjh2064 fb76039133 Merge pull request '[STYLE] 관리 화면 UI/UX 전면 개편 및 화면 밀도 최적화' (#1) from codex/topic-web-ui into main
Quant Engine CI/CD Pipeline / validate-core (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (push) Has been cancelled
Snapshot Admin Web Validation / validate-snapshot-admin-smoke (push) Has been cancelled
Snapshot Admin Web Validation / validate-snapshot-admin-full (push) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Has been cancelled
Reviewed-on: http://178.104.200.7/kjh2064/QuantEngineByItz/pulls/1
2026-06-25 15:26:45 +09:00
kjh2064 7cce836cc6 chore(ci): update workflow runs-on label to ubuntu-latest
Quant Engine CI/CD Pipeline / validate-core (pull_request) Failing after 2m33s
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Failing after 37s
2026-06-25 15:24:57 +09:00
kjh2064 540593f982 chore(kis): update local kis data collection database
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-core (pull_request) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
2026-06-25 15:18:22 +09:00
kjh2064 4bf7e97934 refactor(kis): 한국투자증권(KIS) 데이터 수집 엔진 효율화 및 DB 인프라 최적화
Quant Engine CI/CD Pipeline / validate-core (pull_request) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
2026-06-24 18:04:16 +09:00
kjh2064 532924e218 style(web): 관리자 화면 UI/UX 전면 개편 및 화면 밀도 최적화
Snapshot Admin Web Validation / validate-snapshot-admin-smoke (push) Has been cancelled
Snapshot Admin Web Validation / validate-snapshot-admin-full (push) Has been cancelled
Quant Engine CI/CD Pipeline / validate-core (pull_request) Has been cancelled
Quant Engine CI/CD Pipeline / validate-ui-and-storage (pull_request) Has been cancelled
WBS-9.3 - NULL Policy CI Gate / NULL Policy Validation (pull_request) Has been cancelled
2026-06-24 18:00:37 +09:00
12 changed files with 1753 additions and 310 deletions
+4 -4
View File
@@ -8,7 +8,7 @@ on:
jobs: jobs:
daily-backup: daily-backup:
runs-on: act-runner runs-on: ubuntu-latest
name: Daily Backup name: Daily Backup
steps: steps:
@@ -41,7 +41,7 @@ jobs:
ls -lh backups/ | tail -5 ls -lh backups/ | tail -5
weekly-full-backup: weekly-full-backup:
runs-on: act-runner runs-on: ubuntu-latest
name: Weekly Full Backup name: Weekly Full Backup
# 매주 월요일 1:00 UTC # 매주 월요일 1:00 UTC
@@ -85,7 +85,7 @@ jobs:
df -h | grep -E "Filesystem|data" df -h | grep -E "Filesystem|data"
backup-health-check: backup-health-check:
runs-on: act-runner runs-on: ubuntu-latest
name: Backup Health Check name: Backup Health Check
# 매일 12:00 UTC # 매일 12:00 UTC
@@ -127,7 +127,7 @@ jobs:
du -sh backups/ | awk '{print "Total size: " $1}' du -sh backups/ | awk '{print "Total size: " $1}'
test-recovery: test-recovery:
runs-on: act-runner runs-on: ubuntu-latest
name: Monthly Recovery Test name: Monthly Recovery Test
# 매월 1일 2:00 UTC # 매월 1일 2:00 UTC
+1 -1
View File
@@ -7,7 +7,7 @@ on:
jobs: jobs:
backup: backup:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Run backup - name: Run backup
+1 -1
View File
@@ -7,7 +7,7 @@ on:
jobs: jobs:
build-calibration-backlog: build-calibration-backlog:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
+2 -2
View File
@@ -20,7 +20,7 @@ on:
jobs: jobs:
validate-core: validate-core:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
@@ -157,7 +157,7 @@ jobs:
run: python3 tools/validate_db_first_pipeline_v1.py run: python3 tools/validate_db_first_pipeline_v1.py
validate-ui-and-storage: validate-ui-and-storage:
runs-on: self-hosted runs-on: ubuntu-latest
needs: validate-core needs: validate-core
if: github.event_name != 'push' if: github.event_name != 'push'
+2 -2
View File
@@ -31,7 +31,7 @@ on:
jobs: jobs:
validate-kis-config-smoke: validate-kis-config-smoke:
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
run: | run: |
@@ -90,7 +90,7 @@ jobs:
collect-kis-data-live: collect-kis-data-live:
if: github.event_name == 'schedule' if: github.event_name == 'schedule'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
@@ -7,7 +7,7 @@ on:
jobs: jobs:
evaluate-qualitative-sell: evaluate-qualitative-sell:
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
+2 -2
View File
@@ -17,7 +17,7 @@ jobs:
# Push-only smoke gate: no deployment, no web UI smoke, no long-running side effects. # Push-only smoke gate: no deployment, no web UI smoke, no long-running side effects.
validate-snapshot-admin-smoke: validate-snapshot-admin-smoke:
if: github.event_name == 'push' if: github.event_name == 'push'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
run: | run: |
@@ -58,7 +58,7 @@ jobs:
# Manual dispatch gate: full workflow + web UI validation only. # Manual dispatch gate: full workflow + web UI validation only.
validate-snapshot-admin-full: validate-snapshot-admin-full:
if: github.event_name == 'workflow_dispatch' if: github.event_name == 'workflow_dispatch'
runs-on: self-hosted runs-on: ubuntu-latest
steps: steps:
- name: Checkout Code - name: Checkout Code
run: | run: |
+1 -1
View File
@@ -9,7 +9,7 @@ concurrency:
jobs: jobs:
deploy-snapshot-admin: deploy-snapshot-admin:
runs-on: [self-hosted, snapshot-admin-host] runs-on: ubuntu-latest
timeout-minutes: 20 timeout-minutes: 20
steps: steps:
- name: Checkout Code - name: Checkout Code
@@ -14,7 +14,7 @@ on:
jobs: jobs:
null-policy-validation: null-policy-validation:
runs-on: act-runner runs-on: ubuntu-latest
name: NULL Policy Validation name: NULL Policy Validation
steps: steps:
+6
View File
@@ -168,6 +168,7 @@ def _issue_or_reuse_token(creds: KisCredentials) -> str:
# 2. 토큰이 만료되었거나 없을 시 KIS API로 새로 발급 요청 # 2. 토큰이 만료되었거나 없을 시 KIS API로 새로 발급 요청
requests = _requests() requests = _requests()
try:
resp = requests.post( resp = requests.post(
f"{creds.domain}/oauth2/tokenP", f"{creds.domain}/oauth2/tokenP",
json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret}, json={"grant_type": "client_credentials", "appkey": creds.app_key, "appsecret": creds.app_secret},
@@ -175,6 +176,8 @@ def _issue_or_reuse_token(creds: KisCredentials) -> str:
) )
resp.raise_for_status() resp.raise_for_status()
body = resp.json() body = resp.json()
except Exception as exc:
raise RuntimeError("KIS token refresh failed; check credentials and API availability.") from exc
access_token = body["access_token"] access_token = body["access_token"]
expires_in_sec = int(body.get("expires_in", 86400)) expires_in_sec = int(body.get("expires_in", 86400))
expires_at = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=expires_in_sec) expires_at = dt.datetime.now(dt.timezone.utc) + dt.timedelta(seconds=expires_in_sec)
@@ -209,9 +212,12 @@ def _send_request(creds: KisCredentials, path: str, tr_id: str, params: dict[str
"custtype": "P", "custtype": "P",
} }
requests = _requests() requests = _requests()
try:
resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15) resp = requests.get(f"{creds.domain}{path}", headers=headers, params=params, timeout=15)
resp.raise_for_status() resp.raise_for_status()
return resp.json() return resp.json()
except Exception as exc:
raise RuntimeError(f"KIS read-only request failed for {path} / {tr_id}.") from exc
# ── 조회(read-only) 함수 — 전부 GET, 전부 quotations/ranking 카테고리 (실측 확인) ────────── # ── 조회(read-only) 함수 — 전부 GET, 전부 quotations/ranking 카테고리 (실측 확인) ──────────
+4 -4
View File
@@ -1,9 +1,9 @@
"""KIS-first data collector for the CI scheduler. """KIS-first data collector for the CI scheduler.
The collector uses the existing `GatherTradingData.json` snapshot as the seed The collector treats SQLite as the canonical persistence layer.
universe, then enriches Korean tickers with read-only KIS quotations and `GatherTradingData.json` is emitted only after the DB-backed collection run
orderbook data, while retaining Naver/Yahoo fallbacks when available. finishes, so the JSON acts as a derived reporting artifact rather than the
The canonical persistence target is SQLite. source of truth.
""" """
from __future__ import annotations from __future__ import annotations
File diff suppressed because it is too large Load Diff