From fccbdfef16dfa5de7373550105550e2c867e82f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Boschi?= Date: Wed, 28 Jan 2026 17:25:17 +0100 Subject: [PATCH] fix: include correct __version__ in python packages (#218) Updates: - hindsight-api/hindsight_api/__init__.py: bump __version__ to 0.4.0 - scripts/release.sh: add logic to update __version__ in Python __init__.py files during release --- hindsight-api/hindsight_api/__init__.py | 2 +- scripts/release.sh | 16 ++++++++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/hindsight-api/hindsight_api/__init__.py b/hindsight-api/hindsight_api/__init__.py index 6440e593..1bc4a7e5 100644 --- a/hindsight-api/hindsight_api/__init__.py +++ b/hindsight-api/hindsight_api/__init__.py @@ -46,4 +46,4 @@ __all__ = [ "RemoteTEICrossEncoder", "LLMConfig", ] -__version__ = "0.1.0" +__version__ = "0.4.0" diff --git a/scripts/release.sh b/scripts/release.sh index 5d74f181..ad9faa17 100755 --- a/scripts/release.sh +++ b/scripts/release.sh @@ -77,6 +77,22 @@ for package in "${PYTHON_PACKAGES[@]}"; do fi done +# Update __version__ in Python __init__.py files +PYTHON_INIT_FILES=( + "hindsight-api/hindsight_api/__init__.py" + "hindsight-embed/hindsight_embed/__init__.py" + "hindsight-clients/python/hindsight_client_api/__init__.py" +) +for init_file in "${PYTHON_INIT_FILES[@]}"; do + if [ -f "$init_file" ]; then + print_info "Updating __version__ in $init_file" + sed -i.bak "s/^__version__ = \".*\"/__version__ = \"$VERSION\"/" "$init_file" + rm "${init_file}.bak" + else + print_warn "File $init_file not found, skipping" + fi +done + # Update Rust CLI CARGO_FILE="hindsight-cli/Cargo.toml" if [ -f "$CARGO_FILE" ]; then