vibesketch.codenames

Release codename catalogue.

vibe-sketch names releases after an organic chemist with a named reaction and a piece of laboratory equipment. The maintainer selected Dötz’s Flask for 0.1.2 and later 0.1.x patches (docs/codenames.md). An explicit patch entry starts a new name within its minor line without renaming older versions. Registration accompanies the release version commit.

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.2 — Dötz’s Flask" 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()[source]

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)[source]

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. Use the most recent named version no later than X.Y.Z in the same minor line, so subsequent patches inherit a patch-level change.

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

Parameters:

version (str)

Return type:

str | None

vibesketch.codenames.version_label(version=None)[source]

Format the version string the user-facing surfaces print.

"0.1.2 — Dötz’s Flask" 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