Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Wandb Weave Bump Version Release

From Leeroopedia
Knowledge Sources
Domains Release_Engineering, Versioning
Last Updated 2026-02-14 00:00 GMT

Overview

External tool documentation for the version bump release script provided by the Wandb Weave repository.

Description

The bump_python_sdk_version.py script (step 1) runs bump-my-version bump pre_l ./weave/version.py --tag --commit to drop the pre-release tag from the version string. This transforms X.Y.Z-dev0 to X.Y.Z, creates a git commit, and adds a vX.Y.Z tag.

The pyproject.toml [tool.bumpversion] section defines the version parse regex and the pre_l part with values ["dev", "final"] where optional_value = "final".

Usage

Run with uv run scripts/bump_python_sdk_version.py to perform the release bump. Use --dry-run to preview changes.

Code Reference

Source Location

  • Repository: wandb/weave
  • File: scripts/bump_python_sdk_version.py
  • Lines: L38-64
  • File: weave/version.py
  • Lines: L47 (VERSION string)

Signature

def main() -> None:
    """Bump version: dev -> release, then release -> next dev.
    Step 1: bump-my-version bump pre_l ./weave/version.py --tag --commit
    """

def run_command(cmd: list[str], dry_run: bool = False) -> None:
    """Run a command, printing it first."""

CLI Usage

uv run scripts/bump_python_sdk_version.py [--dry-run]

I/O Contract

Inputs

Name Type Required Description
--dry-run flag No Show what would happen without making changes

Outputs

Name Type Description
weave/version.py file Updated VERSION from "X.Y.Z-dev0" to "X.Y.Z"
git commit side_effect Commit with message "Release version: X.Y.Z-dev0 → X.Y.Z"
git tag side_effect Tag vX.Y.Z

Usage Examples

Release Bump

# Preview
uv run scripts/bump_python_sdk_version.py --dry-run

# Execute
uv run scripts/bump_python_sdk_version.py
# Bumps 0.52.29-dev0 → 0.52.29, creates tag v0.52.29

Related Pages

Implements Principle

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment