Skip to content

Conversation

@mjy926
Copy link
Contributor

@mjy926 mjy926 commented Dec 29, 2025

  • 패키지 관리를 poetry에서 uv로 변경했습니다.

@mjy926 mjy926 requested a review from a team as a code owner December 29, 2025 09:19
@mjy926 mjy926 self-assigned this Dec 29, 2025
@coderabbitai
Copy link

coderabbitai bot commented Dec 29, 2025

📝 Walkthrough

Walkthrough

프로젝트 전체의 의존성 관리 및 빌드 시스템을 Poetry에서 UV(astral-sh/uv) 및 Hatchling으로 마이그레이션합니다. CI 워크플로우, Docker 이미지 빌드 단계, 프로젝트 메타데이터(pyproject.toml), 설치 문서(README.md) 및 관련 설정 파일이 해당 툴체인에 맞게 업데이트됩니다.

Changes

Cohort / File(s) 변경 사항
CI 워크플로우
\.github/workflows/test.yaml
actions/setup-python@v4 및 Poetry 기반 명령들을 UV 기반으로 교체: astral-sh/setup-uv@v3 추가, 캐시 활성화, poetry 명령(설정/설치/실행) 대신 uv sync --frozenuv run 사용으로 전환
도커파일 / 빌드 이미지
Dockerfile
빌드 단계에서 Poetry 설치 제거 후 UV 바이너리 복사로 대체; poetry.lockuv.lock 변경; poetry installuv sync --frozen --no-dev --no-install-project; 런타임 환경 변수 및 패키지/의존성 처리(예: UV_* 변수, PYTHONUNBUFFERED=1), libmariadb-dev 설치, 포트 8080 노출 등 런타임 설정 추가
프로젝트 메타데이터 및 빌드 시스템
pyproject.toml
[tool.poetry][project] 매니페스트로 전환(메타데이터 필드 재구성); 의존성 선언을 Poetry 스타일에서 PEP 621/[project] 목록으로 이동; [dependency-groups]에 dev 그룹 추가; 빌드 시스템을 poetry-corehatchling으로 변경하고 [tool.hatch.build.targets.*] 설정 추가; 테스트/도구 설정 섹션 재배치/확장
Poetry 구성 정리
poetry.toml
[virtualenvs] 섹션 및 in-project = true 제거(프로젝트 내 가상환경 설정 삭제)
문서/설치 지침
README.md
설치 지침에서 Poetry 관련 명령과 설명 제거 후 uv sync 기반 설명으로 교체; Poetry 설치 링크를 UV 설치 링크로 업데이트; pre-commit 가상환경 관련 문구 삭제

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Build: migrate to uv' accurately summarizes the main change—migrating the build system and package management from Poetry to UV across multiple configuration files.
Description check ✅ Passed The description in Korean explains that package management was changed from Poetry to UV, which is directly related to the changeset's primary objective.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/uv

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f0350cd and a0e48cd.

📒 Files selected for processing (1)
  • .github/workflows/test.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/test.yaml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
README.md (1)

4-4: Poetry 배지가 더 이상 유효하지 않습니다.

프로젝트가 uv로 마이그레이션되었으므로, Poetry 배지를 제거하거나 uv 배지로 교체해야 합니다.

🔎 제안된 수정
-[![Poetry 1.5.1](https://img.shields.io/badge/poetry-1.5.1-yellow.svg)](https://github.com/python-poetry/poetry/releases/tag/1.5.1)
+[![uv](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/uv/main/assets/badge/v0.json)](https://github.com/astral-sh/uv)
🧹 Nitpick comments (2)
pyproject.toml (1)

25-26: 테스트 의존성이 메인 dependencies에 포함되어 있습니다.

pytest-mockmoto는 테스트용 패키지입니다. 이들이 메인 dependencies에 있으면 프로덕션 이미지에 불필요하게 포함됩니다. dev 그룹으로 이동하는 것을 권장합니다.

🔎 수정 제안
 dependencies = [
     ...
-    "pytest-mock==3.8.2",
-    "moto[all, ec2, s3]==4.2.7",
     ...
 ]

 [dependency-groups]
 dev = [
     "pytest>=7.3.1,<8",
+    "pytest-mock==3.8.2",
+    "moto[all, ec2, s3]==4.2.7",
     "pre-commit>=3.3.1,<4",
     ...
 ]
Dockerfile (1)

3-3: uv:latest 대신 특정 버전 태그 사용을 권장합니다.

:latest 태그는 빌드 재현성을 저해할 수 있습니다. 특정 버전을 고정하면 예기치 않은 breaking changes를 방지할 수 있습니다.

🔎 수정 제안
-COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/
+COPY --from=ghcr.io/astral-sh/uv:0.9.18 /uv /uvx /bin/
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cf7354a and f0350cd.

⛔ Files ignored due to path filters (2)
  • poetry.lock is excluded by !**/*.lock
  • uv.lock is excluded by !**/*.lock
📒 Files selected for processing (5)
  • .github/workflows/test.yaml
  • Dockerfile
  • README.md
  • poetry.toml
  • pyproject.toml
💤 Files with no reviewable changes (1)
  • poetry.toml
🧰 Additional context used
🪛 actionlint (1.7.9)
.github/workflows/test.yaml

33-33: step must run script with "run" section or run action with "uses" section

(syntax-check)

🔇 Additional comments (6)
README.md (1)

9-21: LGTM!

uv 설치 가이드와 uv sync 명령어가 올바르게 업데이트되었습니다.

.github/workflows/test.yaml (1)

42-66: LGTM!

uv run 명령어가 pytest, pre-commit, alembic에 올바르게 적용되었습니다. 단, 위에서 언급한 --no-dev 플래그 문제가 해결되어야 정상 동작합니다.

Dockerfile (2)

5-15: LGTM!

UV 환경 변수 설정과 uv sync 명령어가 프로덕션 Docker 빌드에 적합하게 구성되었습니다. --no-dev--no-install-project 플래그 사용이 올바릅니다.


17-40: LGTM!

런타임 스테이지가 잘 구성되었습니다. slim 이미지 사용, 환경 변수 설정, 필요한 파일 복사가 모두 적절합니다.

pyproject.toml (2)

1-7: LGTM!

프로젝트 메타데이터가 PEP 621 형식에 맞게 올바르게 정의되었습니다.


43-51: LGTM!

Hatch 빌드 타겟 설정과 hatchling 빌드 백엔드 구성이 올바릅니다.

@mjy926 mjy926 merged commit 002b813 into develop Dec 30, 2025
3 checks passed
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.

3 participants