Skip to content

Reconcile three divergent version strings #83

Description

@tschm

Subcategory: public API / semver discipline
Score: 3 → 10

Problem

Three different versions ship in the same artifact:

Location Value
pyproject.toml:3 version = "0.2.16"
src/pycharting/__init__.py:46 __version__ = "0.2.14"
src/pycharting/core/server.py:121 FastAPI(..., version="0.1.0")

A user introspecting pycharting.__version__ gets an answer two patch releases
stale, and /api/docs plus the generated OpenAPI schema advertise 0.1.0 — a
version this package has not been at for sixteen releases.

Nothing catches this today: no gate compares the three, and make bump updates
only the manifest.

Files to change

  • src/pycharting/__init__.py:46
  • src/pycharting/core/server.py:121
  • pyproject.toml:3 (source of truth)

done when

All three values derive from a single source — e.g.
__version__ = importlib.metadata.version("pycharting") in __init__.py, with
create_app() passing that same value to FastAPI(version=...) — and a test
asserts pycharting.__version__ == create_app().version and matches the
installed distribution metadata.

Evidence

pyproject.toml:3:version = "0.2.16"
src/pycharting/__init__.py:46:__version__ = "0.2.14"
src/pycharting/core/server.py:121:        version="0.1.0",

Found by /rhiza:quality (full mode, rhiza v0.18.8). All 9 gates passed; this
is invisible to every one of them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions