vibesketch.codenames

Release codename catalogue.

vibe-qc, vibe-view and vibe-queue give every minor release a “Person’s Animal” codename, each product from its own pool of people so no name is claimed twice. The maintainer approved the structural-chemistry pool and reserved Couper’s Coati for the first minor release (docs/codenames.md). Until the release version is selected, every surface prints the bare version.

This module is the single source of truth. Three surfaces read it:

  • vibe-sketch --version (vibesketch.cli)

  • the server’s /api/version resource, which the browser’s About box and the Electron desktop shell display

  • the documentation site’s {{codename}} substitution (docs/conf.py loads this file standalone, so it must keep importing nothing beyond the standard library)

tests/test_codenames.py checks that every surface agrees with the catalogue.

Programmatic API

codename_for_version(version)

Resolve a version string to its codename, or None.

codename_for_current()

Convenience: the codename of the running vibesketch.__version__.

version_label()

The "0.1.0 — Person's Animal" string the user-facing surfaces print, or the bare version while no codename is registered.

Functions

codename_for_current()

Return the codename of the running vibe-sketch, or None.

codename_for_version(version)

Return the codename for a vibe-sketch release version, or None.

version_label([version])

Format the version string the user-facing surfaces print.

vibesketch.codenames.codename_for_current()

Return the codename of the running vibe-sketch, or None.

Imported lazily so this module stays importable with nothing but the standard library: docs/conf.py loads it by path, outside the package.

Return type:

str | None

vibesketch.codenames.codename_for_version(version)

Return the codename for a vibe-sketch release version, or None.

Resolution order:

  1. Strip any PEP-440 .devN / aN / bN / rcN suffix and local version label, so a dev build inherits the codename of the release it leads up to.

  2. Direct lookup of the resulting X.Y.Z in RELEASE_CODENAMES.

  3. Fall back to the parent minor, f"{X}.{Y}.0", so patch releases inherit without needing an entry of their own.

  4. None when no codename is registered for that minor.

Parameters:

version (str)

Return type:

str | None

vibesketch.codenames.version_label(version=None)

Format the version string the user-facing surfaces print.

"0.1.0 — Person's Animal" when a codename is registered, and the bare version when one is not, so an unnamed line never prints a dangling dash.

Parameters:

version (str | None)

Return type:

str