-
Notifications
You must be signed in to change notification settings - Fork 1
feat: 백엔드 기능 추가 및 개선 #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
마이그레이션 스크립트 추가
- Balance: coin_amount 컬럼 추가 - Coin: is_deleted 컬럼 추가 (soft delete) - CoinRepository: soft delete 관련 조회 메서드 추가
- UpbitClient: 업비트 API 호출 클라이언트 - UpbitService: OHLCV 데이터 조회 서비스 - UpbitController: 캔들 데이터 API 엔드포인트 - OHLCV DTO 정의
- CoinService: 코인 등록/조회/삭제 비즈니스 로직 - CoinController: 내 코인 API 엔드포인트 - CoinDTO: 요청/응답 DTO 정의
- v1_router에 /api/v1 prefix 추가 - coin, upbit 라우터 등록 - uvicorn reload 옵션 비활성화
- OpenAI 클라이언트 및 비트코인 트레이딩 분석 기능 구현 - AI 분석 응답 DTO (AiAnalysisResponse) 추가 - 비트코인 분석가 프롬프트 상수 정의
- UpbitService 제거하고 컨트롤러에서 직접 UpbitClient 사용 - DI를 위한 get_upbit_client 함수 추가 - 잔고 조회, 현재가 조회, 매수 기능 추가 - async 함수를 sync 함수로 변경 - 에러 처리 및 입력값 검증 강화
- APScheduler 의존성 추가 (v3.10.0) - AsyncIOScheduler를 앱 라이프사이클에 통합 - 5분 간격 테스트 작업 구현
- RiskLevel에 NONE 타입 추가 (분석 결과 없음 상태) - Alembic 마이그레이션 파일 추가
- get_all_include_deleted 메서드 추가 - 라우터 변수명을 coin_router로 통일 - 트레이드 서비스 기초 구조 추가
- TradeType enum에 HOLD 추가 - Decision.HOLD 케이스에서도 거래 기록 생성 - trade_type 필드에 AI 결정(buy/sell/hold) 저장 - 현재 가격 및 AI 분석 사유 기록
- Trade 모델에 status, execution_reason 필드 추가 - coin_id, trade_type nullable로 변경 - TradeController 및 TransactionResponse DTO 추가 - TradeRepository에 코인 정보 포함 조회 메서드 추가 - v1 라우터에 trade API 등록 - 관련 마이그레이션 파일 추가
- trade_execution_job 추가 (5분마다 AI 분석 및 자동 거래) - TradeService.execute() 호출하여 모든 활성 코인 거래 처리 - 에러 핸들링 및 로깅 추가 - 현재는 주석 처리하여 비활성화 상태
- 코인 삭제 전 잔고가 남아있는지 확인 - 잔고가 있으면 400 에러 반환하여 삭제 방지 - UpbitClient 연동하여 실시간 잔고 조회
- ruff formatter 적용 - Enum 클래스 docstring 개행 추가 - alembic 마이그레이션 파일 포맷팅 - import 순서 정리
- GEMINI.md, CLAUDE.md 제외 - .gemini, .claude 디렉토리 제외
- pyproject.toml 의존성 업데이트 - uv.lock 파일 갱신 - upbit_client.py 개선
GEMINI.md와 .gemini 폴더를 gitignore에 추가
- Dockerfile 및 .dockerignore 추가 - docker-compose.yml 업데이트 - .env.example에 Docker 환경용 기본값 및 설명 추가
- pytest, pytest-asyncio, pytest-mock, pytest-cov 의존성 추가 - pytest 설정 및 테스트 디렉토리 구조 추가
- trade_execution_job을 별도 파일로 분리하여 모듈화 - 스케줄러 활성화 및 실행 주기 설정 (30초)
- TradeRepository에 커서 기반 조회 메서드 추가 - TransactionsResponse에 next_cursor, has_next 필드 추가 - 거래 내역 API에 cursor, limit 쿼리 파라미터 추가 - API 설명 및 사용법 문서화
- 프로젝트 개요, 기술 스택, 구조 설명 추가 - 모듈별 상세 설명 및 API 명세 추가 - 데이터베이스 스키마 및 Enum 정의 추가 - 자동 거래 시스템 흐름 및 에러 처리 문서화 - 설치/실행 가이드 및 환경변수 설명 추가
GitHub Actions 워크플로우 설정 추가
- astral-sh/setup-uv 액션 추가 - pip 캐시를 uv 캐시로 변경 - uv sync로 의존성 설치 - uv run으로 pytest, ruff 실행
CLAUDE.md와 .claude 디렉토리를 무시 목록에 추가
Backend 테스트 커버리지 리포트
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary