Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
  • Loading branch information
zhuwenxing committed Dec 5, 2024
1 parent d0ae184 commit 512199f
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 56 deletions.
71 changes: 28 additions & 43 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,52 +1,37 @@
name: Create Release
name: Release

on:
push:
tags:
- 'v*' # Trigger on version tags
- 'v*'

jobs:
test:
uses: ./.github/workflows/test.yml

release:
needs: test
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Update version in pyproject.toml
run: |
# Extract version from tag (remove 'v' prefix)
VERSION=${GITHUB_REF#refs/tags/v}
# Update version in pyproject.toml
sed -i "s/version = \".*\"/version = \"$VERSION\"/" pyproject.toml
- name: Commit version update
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -am "Bump version to ${GITHUB_REF#refs/tags/}"
git push
- name: Get tag message
id: tag
run: |
git fetch --tags
echo "message=$(git tag -l --format='%(contents)' ${{ github.ref_name }})" >> $GITHUB_OUTPUT
echo "version=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
- name: Create Release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ steps.tag.outputs.version }}
body: ${{ steps.tag.outputs.message }}
draft: false
prerelease: false
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
cache: 'pip'

- name: Install dependencies
run: |
curl -sSL https://pdm-project.org/install-pdm.py | python3 -
pdm install
- name: Build package
run: pdm build

- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: dist/*
generate_release_notes: true
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ cd milvus-beir

# Install dependencies using PDM
pdm install
pre-commit install
```

### Running Tests
Expand Down
21 changes: 8 additions & 13 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,25 +1,19 @@
[project]
name = "milvus_beir"
version = "0.1.0"
description = "Default template for PDM package"
dynamic = ["version"]
description = "A Python library that integrates Milvus vector database with BEIR (Benchmarking IR) for efficient information retrieval and evaluation."
readme = "README.md"
requires-python = ">=3.8"
dependencies = [
"pymilvus>=2.5.0",
"milvus-model>=0.2.10",
"beir>=2.0.0",
"torch<=2.2.2",
"ranx>=0.3.20",
"onnxruntime<=1.19.0",
'numpy>=1.26.4; python_version >= "3.12"',
'numpy>=1.23.2,<1.27.0; python_version >= "3.9" and python_version < "3.12"',
'numpy>=1.19.5,<1.25.0; python_version >= "3.8" and python_version < "3.9"',
]
dependencies = ["pymilvus>=2.5.0", "milvus-model>=0.2.10", "beir>=2.0.0", "torch<=2.2.2", "ranx>=0.3.20", "onnxruntime<=1.19.0"]
authors = [
{name = "zhuwenxing", email = "wenxing.zhu@zilliz.com"},
]
license = {text = "MIT"}

[build-system]
requires = ["pdm-backend"]
build-backend = "pdm.backend"

[dependency-groups]
test = [
"pytest>=8.3.4",
Expand Down Expand Up @@ -54,4 +48,5 @@ known-first-party = ["milvus_beir"]

[tool.pdm]
distribution = true
version = {source = "file", path = "src/milvus_beir/__init__.py"}

1 change: 1 addition & 0 deletions src/milvus_beir/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.0.1"

0 comments on commit 512199f

Please sign in to comment.