mirror of
https://github.com/codeflash-ai/codeflash.git
synced 2026-05-04 18:25:17 +00:00
chore: bump codeflash-benchmark version to 0.3.0
This commit is contained in:
parent
20c956c0e9
commit
a76f28f196
4 changed files with 23 additions and 19 deletions
17
.github/workflows/publish.yml
vendored
17
.github/workflows/publish.yml
vendored
|
|
@ -6,7 +6,7 @@ on:
|
|||
- main
|
||||
paths:
|
||||
- 'codeflash/version.py'
|
||||
- 'codeflash-benchmark/codeflash_benchmark/__init__.py'
|
||||
- 'codeflash-benchmark/codeflash_benchmark/version.py'
|
||||
|
||||
jobs:
|
||||
detect-changes:
|
||||
|
|
@ -28,7 +28,7 @@ jobs:
|
|||
else
|
||||
echo "codeflash=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
if git diff --name-only HEAD~1 HEAD | grep -q '^codeflash-benchmark/codeflash_benchmark/__init__.py$'; then
|
||||
if git diff --name-only HEAD~1 HEAD | grep -q '^codeflash-benchmark/codeflash_benchmark/version.py$'; then
|
||||
echo "benchmark=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "benchmark=false" >> $GITHUB_OUTPUT
|
||||
|
|
@ -121,23 +121,14 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Extract version from __init__.py
|
||||
- name: Extract version from version.py
|
||||
id: extract_version
|
||||
run: |
|
||||
VERSION=$(grep -oP '__version__ = "\K[^"]+' codeflash-benchmark/codeflash_benchmark/__init__.py)
|
||||
VERSION=$(grep -oP '__version__ = "\K[^"]+' codeflash-benchmark/codeflash_benchmark/version.py)
|
||||
echo "version=$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "tag=benchmark-v$VERSION" >> $GITHUB_OUTPUT
|
||||
echo "Extracted version: $VERSION"
|
||||
|
||||
- name: Verify version matches pyproject.toml
|
||||
run: |
|
||||
INIT_VERSION=${{ steps.extract_version.outputs.version }}
|
||||
TOML_VERSION=$(grep -oP '^version = "\K[^"]+' codeflash-benchmark/pyproject.toml)
|
||||
if [ "$INIT_VERSION" != "$TOML_VERSION" ]; then
|
||||
echo "::error::Version mismatch: __init__.py=$INIT_VERSION, pyproject.toml=$TOML_VERSION"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check if tag already exists
|
||||
id: check_tag
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -1,3 +1,3 @@
|
|||
"""CodeFlash Benchmark - Pytest benchmarking plugin for codeflash.ai."""
|
||||
|
||||
__version__ = "0.2.0"
|
||||
from codeflash_benchmark.version import __version__
|
||||
|
|
|
|||
2
codeflash-benchmark/codeflash_benchmark/version.py
Normal file
2
codeflash-benchmark/codeflash_benchmark/version.py
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
# These version placeholders will be replaced by uv-dynamic-versioning during build.
|
||||
__version__ = "0.3.0"
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[project]
|
||||
name = "codeflash-benchmark"
|
||||
version = "0.2.0"
|
||||
dynamic = ["version"]
|
||||
description = "Pytest benchmarking plugin for codeflash.ai - automatic code performance optimization"
|
||||
authors = [{ name = "CodeFlash Inc.", email = "contact@codeflash.ai" }]
|
||||
requires-python = ">=3.9"
|
||||
|
|
@ -25,8 +25,19 @@ Repository = "https://github.com/codeflash-ai/codeflash-benchmark"
|
|||
codeflash-benchmark = "codeflash_benchmark.plugin"
|
||||
|
||||
[build-system]
|
||||
requires = ["setuptools>=45", "wheel"]
|
||||
build-backend = "setuptools.build_meta"
|
||||
requires = ["hatchling", "uv-dynamic-versioning"]
|
||||
build-backend = "hatchling.build"
|
||||
|
||||
[tool.setuptools]
|
||||
packages = ["codeflash_benchmark"]
|
||||
[tool.hatch.version]
|
||||
source = "uv-dynamic-versioning"
|
||||
|
||||
[tool.uv-dynamic-versioning]
|
||||
enable = true
|
||||
style = "pep440"
|
||||
vcs = "git"
|
||||
|
||||
[tool.hatch.build.hooks.version]
|
||||
path = "codeflash_benchmark/version.py"
|
||||
template = """# These version placeholders will be replaced by uv-dynamic-versioning during build.
|
||||
__version__ = "{version}"
|
||||
"""
|
||||
|
|
|
|||
Loading…
Reference in a new issue