Skip to content

Add diagnosis SDK domain with services and docs#73

Merged
junghoocha merged 2 commits intomainfrom
feature/spo-650-diagnosis-sdk
Feb 3, 2026
Merged

Add diagnosis SDK domain with services and docs#73
junghoocha merged 2 commits intomainfrom
feature/spo-650-diagnosis-sdk

Conversation

@junghoocha
Copy link
Copy Markdown
Contributor

📋 Summary

Diagnosis 도메인용 SDK 모듈을 신규로 추가하여 Python 클라이언트에서도 Diagnosis/DiagnosisReportItem CRUD 기능을 사용할 수 있도록 했습니다. DiagnosisPageInfo 엔티티를 통해 목록 응답을 타입 안전하게 다루고, 서비스 공개 API에 대한 문서와 샘플 워크플로우 스크립트를 함께 제공합니다.

🎯 Changes

  1. Diagnosis SDK 모듈 생성 (spb_onprem/diagnoses/)

    • entities: Diagnosis, DiagnosisReportItem, DiagnosisReportItemType, DiagnosisPageInfo
    • enums: DiagnosisStatus, DiagnosisOrderField, OrderDirection
    • params: 단일 조회/목록/생성/수정/삭제용 파라미터 함수
    • queries: GraphQL 쿼리 및 뮤테이션 정의
    • service: DiagnosisService 및 ReportItem 관련 메서드 구현
    • README: 사용 개요, 필터/정렬 예제, 테스트 안내
  2. SDK export 업데이트

    • spb_onprem/__init__.py 에 Diagnosis 서비스와 엔티티/필터 타입을 노출
  3. 서비스 문서 보강

    • DiagnosisService 공개 메서드에 Args/Returns docstring 추가
  4. 워크플로우 스크립트

    • sunrise-scripts/scripts/run_diagnosis_workflow.py: dataset_id 인자만으로 diagnosis/diagnosis_report_item 생성→수정→삭제 흐름 테스트 가능

🔧 Technical Details

  • PageInfo 패턴 적용: GraphQL 응답(diagnoses, next, totalCount)을 DiagnosisPageInfo Pydantic 모델로 검증하여 타입 안정성 확보
  • Undefined 처리: 선택적 인자는 UndefinedType 을 활용해 GraphQL 변수에서 생략 (업데이트/삭제 시 기존 패턴 유지)
  • README: 필터/정렬 사용 예시, 실행 커맨드, 테스트 안내 포함

@junghoocha junghoocha requested a review from Min-june February 3, 2026 05:10
@linear
Copy link
Copy Markdown

linear bot commented Feb 3, 2026

@junghoocha junghoocha requested a review from MinJaeLee1 February 3, 2026 05:11
@junghoocha junghoocha merged commit cc9bcd0 into main Feb 3, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants