requirements.txt를 setup.py에서 읽어서 사용#111
Merged
ParkGyeongTae merged 1 commit intomasterfrom May 20, 2025
Merged
Conversation
ehddnr301
approved these changes
May 20, 2025
Collaborator
ehddnr301
left a comment
There was a problem hiding this comment.
👍 잘 동작합니다! 하나의 소스 오브 트루스(Source of Truth) 가 중요하다는것은 회사 업무를 하면서도 느끼고 있는데 다시한번 깨닫는 기회가 되네요
💬 테스트 하다보니 cli.__init__.py 의 version과 setup.py의 version도 환경변수를 바라보게 한다던지 해서 관리를 통일해도 괜찮겠네요! 감사합니다.
Contributor
Author
|
@ehddnr301 |
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
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.
#️⃣ Issue Number
📝 요약(Summary)
작업 내용
현재는 파이썬 라이브러리를 requirements.txt, setup.py 두 곳에서 관리함.
requirements.txt만 관리하고, setup.py는 requirements.txt를 읽어서 사용하도록 수정
장점
의존성 정의의 중복 방지
setup.py와 requirements.txt에 각각 같은 패키지를 따로 관리하면, 버전 충돌, 누락 또는 중복, 설치 실패 등의 문제가 발생할 수 있음.
하나의 소스 오브 트루스(Source of Truth) 유지
패키지를 설치할 때는 requirements.txt를, 배포할 때는 setup.py를 참조하게 되면 관리 포인트가 2배가 됨.
한 곳만 수정하고 나머지는 깜빡하면 버그로 이어질 수 있음.
CI/CD 자동화에 유리
자동 테스트, 릴리스, Docker 이미지 빌드 등에서 일관된 의존성 관리가 필요함
pip install .과 pip install -r requirements.txt가 동일한 환경을 보장해야 예측 가능한 배포가 가능해짐.
💬 To Reviewers (선택)
PR Checklist
pip install .reference) How to Code Review