Skip to content

Commit c2b752e

Browse files
authored
feat: add release email generation tooling (#743)
* feat: add release email generation tooling * fix: handle binding no votes in result email * fix: make adaptive crag example python 3.10 compatible
1 parent a3f0563 commit c2b752e

10 files changed

Lines changed: 771 additions & 46 deletions

File tree

.github/workflows/release-validation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ jobs:
100100
run: sudo apt-get install -y --no-install-recommends graphviz
101101

102102
- name: Install Python build deps
103-
run: pip install flit twine
103+
run: pip install flit twine jinja2
104104

105105
- name: Cache Apache RAT
106106
id: cache-rat

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ ipython_config.py
129129
# in version control.
130130
# https://pdm.fming.dev/#use-with-ide
131131
.pdm.toml
132+
uv.lock
132133

133134
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
134135
__pypackages__/

examples/adaptive-crag/application.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ def router(state: State, query: str, attempts: int = ATTEMPTS) -> tuple[dict[str
282282
table_names = db.table_names()
283283
chat_history = state["chat_history"]
284284
# using this as a `response_model` to ensure the route is valid
285-
routes = Literal[*table_names, "web_search", "assistant"] # type: ignore
285+
routes = Literal.__getitem__((*table_names, "web_search", "assistant")) # type: ignore
286286
try:
287287
route = ask_gemini.create(
288288
messages=[

pyproject.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@ redis = [
8181
"redis"
8282
]
8383

84+
release = [
85+
"jinja2",
86+
]
87+
8488
tests = [
8589
"pytest",
8690
"pytest-asyncio",

scripts/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,11 @@ python scripts/apache_release.py verify 0.41.0 0
101101

102102
# Skip upload step in 'all' command
103103
python scripts/apache_release.py all 0.41.0 0 your_apache_id --no-upload
104+
105+
# Generate release emails from templates
106+
python scripts/apache_release.py vote-email --version 0.41.0 --rc 0
107+
python scripts/apache_release.py result-email --version 0.41.0 --rc 0 --binding-yes 3 --non-binding-yes 2 --binding-no 0 --non-binding-no 1
108+
python scripts/apache_release.py announce-email --version 0.41.0
104109
```
105110

106111
Output: `dist/` directory with tar.gz (archive + sdist), whl, plus .asc and .sha512 files. The wheel is validated with `twine check` to ensure metadata correctness before signing. Install from the whl file to test it out after running the `wheel` subcommand.

0 commit comments

Comments
 (0)