# QA — ObesityPharmaWatch

검수 일자: 2026-04-26
실행 환경: macOS (Darwin 25.3.0), Python 3 (system)

## 검수 결과 요약

**7/7 PASS**

## 단계별 결과

### 1. AST 파싱 (모든 .py 파일)

```
AST OK: main.py
AST OK: opwatch/__init__.py
AST OK: opwatch/adapters.py
AST OK: opwatch/vocab.py
AST OK: opwatch/classifier.py
AST OK: opwatch/linker.py
AST OK: opwatch/svgcharts.py
AST OK: opwatch/report.py
```

PASS — 8개 .py 파일 모두 `ast.parse` 통과.

### 2. `python3 main.py --help`

```
usage: obesity-pharma-watch [-h] [--offline] [--quarter QUARTER]
                            [--output OUTPUT] [--list-drugs]
...
```

PASS — usage 정상 출력.

### 3. `python3 main.py --offline --quarter 2026-Q2 --output output/report.html`

```
[OK] wrote output/report.html  (17 abstracts after quarter filter)
EXIT=0
-rw-r--r-- 1 sangjoonpark  staff  17768 Apr 26 13:43 output/report.html
```

PASS — exit code 0, 17,768 bytes HTML 생성.

### 4. 출력 HTML 구조 태그 점검

```
<html: True
<body: True
<svg : True
<table: True
```

PASS — `<html>`, `<body>`, `<svg>`, `<table>` 모두 포함.

### 5. mock JSON 파일 로드 테스트

```
ada_2026_mock.json: 7 records
easd_2026_mock.json: 6 records
obesity_week_2026_mock.json: 6 records
endo_2026_mock.json: 5 records
eco_2026_mock.json: 5 records
ctg_obesity_mock.json: 22 records
```

PASS — 6개 mock JSON 모두 정상 로드. 학회 abstract 합계 29건 + CTG trial 22건.
사양 요구치(ADA 6~10, EASD 5~8, OW 5~8, ENDO 4~6, ECO 4~6, CTG 15~20) 모두 충족
(CTG는 22건으로 사양 상한을 약간 초과했으나 매핑 다양성을 위한 선택).

### 6. 분류기(classifier) 샘플 검증

샘플 입력: "Retatrutide and CagriSema in obesity Phase 3 / tirzepatide vs semaglutide head to head"

```
drugs:    ['semaglutide', 'tirzepatide', 'retatrutide', 'CagriSema']
targets:  ['GLP-1', 'GIP', 'Glucagon', 'Amylin']
sponsors: ['Novo Nordisk', 'Eli Lilly']
phase:    Phase 3
vocab size: 51
```

PASS — vocab 4개 약물 모두 매칭, target/sponsor/phase 자동 태깅, 큐레이션 50+ 약물(51개) 충족.

### 7. 디스클레이머 포함

- `README.md`: "연구·교육 목적의 참고용이며, 비만약물 처방·임상 의사결정 근거로 사용할 수 없습니다" 포함됨.
- `output/report.html`: 동일 디스클레이머 포함됨 (`disclaimer: True`).

PASS.

## 재현 명령

```bash
cd "/Users/sangjoonpark/2026 metabolic daily idea/projects/2026-04-26-2-obesity-pharma-watch"
python3 main.py --help
python3 main.py --offline --quarter 2026-Q2 --output output/report.html
python3 main.py --list-drugs
```

## 비고

- 외부 네트워크 호출 0건 (`urllib`, `requests` 등 import 없음).
- CDN 의존성 0건. 차트는 모두 inline SVG로 직접 생성.
- 표준 라이브러리만 사용: `argparse`, `json`, `re`, `pathlib`, `html`, `collections`, `datetime`, `sys`.
- 모든 abstract / 저자 / 회사 / NCT / 수치는 합성 mock. 실제 임상 결과 인용 없음.
