chore(deps): add root requirements-dev.txt for test/lint tooling - #223
Merged
Merged
Conversation
Splits development tooling out of the production requirements.txt so pytest/pytest-cov/lint deps no longer ship in runtime images or get dragged into the production-deps dependabot group. - -r requirements.txt (production runtime, single source of truth) - pytest>=8.3, pytest-asyncio>=0.24 (pytest.ini sets asyncio_mode = auto), pytest-cov>=6.0, httpx>=0.28.1 - ruff/black/isort/mypy — matching the toolchain already used in ci.yml Follows the existing repo convention (deliverables/pure-agent-dev/requirements-dev.txt).
zyntromedia
approved these changes
Sep 12, 2026
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.
สรุป
เพิ่ม
requirements-dev.txtที่ root เพื่อแยก dev/test tooling ออกจากrequirements.txtที่เป็น production runtime (fastapi, uvicorn, tiktoken, pydantic, openai, langgraph)ทำไม
ตอนนี้ repo ไม่มีที่สำหรับ dev dependency เลย ผลคือ:
ci.ymljobtestรันpytest tests/ --cov=appแต่ติดตั้งแค่pip install -r requirements.txtซึ่งไม่มี pytest → job นี้แดงถาวรtest-suite.ymlก็ติดตั้งแค่requirements.txtแล้วรันpytesttest-and-coverage.yamlต้อง hard-codepip install pytest pytest-covเองproduction-depsลากไป bump ใน productionสิ่งที่เพิ่ม
ทำตาม convention ที่ repo ใช้อยู่แล้ว —
deliverables/pure-agent-dev/requirements-dev.txtก็ขึ้นต้นด้วย-r requirements.txtเหมือนกัน และใช้ ruff/black/isort ซึ่งตรงกับ toolchain ในci.yml(ไม่ใช่ flake8 ที่ไม่มี workflow ไหนเรียกใช้)ตรวจสอบแล้ว
pip install -r requirements-dev.txtใน venv สะอาด — ติดตั้งผ่านครบimport pytest, pytest_asyncio, httpx, fastapi, appผ่านpytest tests/ --collect-onlyเริ่มเก็บ test ได้ (collection ไปหยุดที่บั๊กอื่นของ repo ไม่ใช่ dependency)`ยังไม่รวมใน PR นี้ (แจ้งเพื่อทราบ)
ตรวจแล้วพบว่า
requirements.txtขาด dependency ที่โค้ดapp/import จริง 3 ตัว — ไม่เกี่ยวกับ PR นี้ แต่ต้องแก้ก่อน CI จะเขียว:pydantic-settings—app/core/config.py,app/config.pypython-jose—app/core/security.pyalembic—app/env.pyprometheus-fastapi-instrumentator—app/monitoring/prometheus.pyและ
app/services/__init__.pyimportUserServiceจากapp.services.usersที่ยังไม่มีในไฟล์นั้น (บั๊กโค้ด ไม่ใช่ dependency)หมายเหตุ CI
checks ของ PR นี้จะแดงจากปัญหาที่มีอยู่ก่อนแล้วบน
main(actions/checkout@v4ผิดนโยบาย SHA-pinning, SHA ปลอมในscan, CodeQL go job ที่ไม่มีโค้ด Go) ไม่ได้มาจากไฟล์นี้