Skip to content

Commit ed99a49

Browse files
authored
Add release workflow make dtype part of grid_study (#23)
1 parent 97dc4b7 commit ed99a49

File tree

12 files changed

+19322
-1276
lines changed

12 files changed

+19322
-1276
lines changed

.github/release-drafter-config.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name-template: '$NEXT_MINOR_VERSION'
2+
tag-template: 'v$NEXT_MINOR_VERSION'
3+
autolabeler:
4+
- label: 'maintenance'
5+
files:
6+
- '*.md'
7+
- '.github/*'
8+
- label: 'bug'
9+
branch:
10+
- '/bug-.+'
11+
- label: 'maintenance'
12+
branch:
13+
- '/maintenance-.+'
14+
- label: 'feature'
15+
branch:
16+
- '/feature-.+'
17+
categories:
18+
- title: 'Breaking Changes'
19+
labels:
20+
- 'breakingchange'
21+
- title: '🧪 Experimental Features'
22+
labels:
23+
- 'experimental'
24+
- title: '🚀 New Features'
25+
labels:
26+
- 'feature'
27+
- 'enhancement'
28+
- title: '🐛 Bug Fixes'
29+
labels:
30+
- 'fix'
31+
- 'bugfix'
32+
- 'bug'
33+
- 'BUG'
34+
- title: '🧰 Maintenance'
35+
label: 'maintenance'
36+
change-template: '- $TITLE (#$NUMBER)'
37+
exclude-labels:
38+
- 'skip-changelog'
39+
template: |
40+
# Changes
41+
42+
$CHANGES
43+
44+
## Contributors
45+
We'd like to thank all the contributors who worked on this release!
46+
47+
$CONTRIBUTORS
48+

.github/workflows/release-drafter.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Release Drafter - Redis Retrieval Optimizer
2+
3+
on:
4+
push:
5+
# branches to consider in the event; optional, defaults to all
6+
branches:
7+
- main
8+
9+
permissions: {}
10+
jobs:
11+
update_release_draft:
12+
permissions:
13+
pull-requests: write # to add label to PR (release-drafter/release-drafter)
14+
contents: write # to create a github release (release-drafter/release-drafter)
15+
16+
runs-on: ubuntu-latest
17+
steps:
18+
# Drafts your next Release notes as Pull Requests are merged into "main"
19+
- uses: release-drafter/release-drafter@v5
20+
with:
21+
# (Optional) specify config name to use, relative to .github/. Default: release-drafter.yml
22+
config-name: release-drafter-config.yml
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: Publish Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
env:
8+
PYTHON_VERSION: "3.11"
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Check out repository
16+
uses: actions/checkout@v4
17+
18+
- name: Install Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: ${{ env.PYTHON_VERSION }}
22+
23+
- name: Install Poetry
24+
uses: snok/install-poetry@v1
25+
with:
26+
version: latest
27+
virtualenvs-create: true
28+
virtualenvs-in-project: true
29+
30+
- name: Load cached venv
31+
id: cached-poetry-dependencies
32+
uses: actions/cache@v3
33+
with:
34+
path: .venv
35+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
36+
37+
- name: Install dependencies
38+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
39+
run: poetry install --only=main
40+
41+
- name: Build package
42+
run: poetry build
43+
44+
- name: Upload build
45+
uses: actions/upload-artifact@v4
46+
with:
47+
name: dist
48+
path: dist/
49+
50+
publish:
51+
needs: build
52+
runs-on: ubuntu-latest
53+
54+
steps:
55+
- name: Check out repository
56+
uses: actions/checkout@v4
57+
58+
- name: Install Python
59+
uses: actions/setup-python@v5
60+
with:
61+
python-version: ${{ env.PYTHON_VERSION }}
62+
63+
- name: Install Poetry
64+
uses: snok/install-poetry@v1
65+
with:
66+
version: latest
67+
virtualenvs-create: true
68+
virtualenvs-in-project: true
69+
70+
- name: Load cached venv
71+
id: cached-poetry-dependencies
72+
uses: actions/cache@v3
73+
with:
74+
path: .venv
75+
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
76+
77+
- name: Install dependencies
78+
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
79+
run: poetry install --only=main
80+
81+
- name: Download build artifacts
82+
uses: actions/download-artifact@v4
83+
with:
84+
name: dist
85+
path: dist/
86+
87+
- name: Publish to PyPI
88+
env:
89+
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI }}
90+
run: poetry publish

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ embedding_models: # embedding cache would be awesome here.
114114
embedding_cache_name: "vec-cache" # avoid names with including 'ret-opt' as this can cause collisions
115115

116116
search_methods: ["bm25", "vector", "hybrid", "rerank", "weighted_rrf"] # must match what is passed in search_method_map
117+
118+
# data types to be included in the study (optional, defaults to ["float32"])
119+
vector_data_types: ["float16", "float32"]
117120
```
118121
119122
#### Code

0 commit comments

Comments
 (0)