chore: バージョンを 2.7.0 に揃え、API が名乗る版と一致させる - #47
Merged
Merged
Conversation
pyproject.toml の version が 0.1.0 のまま放置され、リリースタグ(v2.6.1 まで) とも、FastAPI の既定値 0.1.0 で配信していた OpenAPI の version とも無関係に なっていた。CASE の discovery で OpenAPI を配る以上、そこに出る版番号が リリースと食い違うのは対外的な情報として誤りである。 src/__init__.py の __version__ を単一の出どころとし、FastAPI に渡す。 pyproject 側は宣言が二重になるため、両者の一致を tests/unit/test_version.py で固定した。片方だけ上げたリリースはテストで落ちる。 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Summary
pyproject.tomlのversionを0.1.0→2.7.0に。リリースタグ(v2.7.0)と一致させるsrc/__init__.pyに__version__を置いて単一の出どころとし、FastAPI(version=...)に渡す。これまで OpenAPI は FastAPI の既定値0.1.0を名乗っていたtests/unit/test_version.pyで固定した。片方だけ上げたリリースはテストで落ちる背景: CASE の service discovery で OpenAPI 定義を配信している以上、そこに出る版番号がリリースと食い違うのは対外的な情報として誤り。
Test plan
uv run pytest— 909 passeduv run ruff check/ruff format --check— 通過GET /openapi.jsonのinfo.versionが2.7.0になることを確認