Fix Python 3.9 compat: add __future__ annotations to rewards.py

`str | None` union syntax requires Python 3.10+. CI runs on 3.9.
Added `from __future__ import annotations` to fix.

Also added Release Checklist section to CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Alpamys 2026-03-23 16:34:11 +05:00
parent 5296b0019b
commit 26cccaf730
2 changed files with 21 additions and 0 deletions

View File

@ -102,6 +102,25 @@ soup train --config soup.yaml
- Always run `ruff check soup_cli/ tests/` before committing
- Always run `pytest tests/ -v` before committing
## Release Checklist (обязательно при каждой фазе)
При завершении каждой фазы/фичи — выполни **все** пункты по порядку:
1. **Код:** реализуй фичу, следуя конвенциям проекта
2. **Тесты:** напиши тесты, добавь файл в таблицу тестов ниже
3. **Lint:** `ruff check soup_cli/ tests/` — должен быть clean
4. **Pytest:** `pytest tests/ -v --tb=short` — все тесты должны проходить
5. **Версия:** обнови версию в `pyproject.toml` + `soup_cli/__init__.py`
6. **CLAUDE.md:** обнови Architecture, таблицу тестов, любые новые секции
7. **README.md:** добавь документацию новой фичи, обнови таблицу Features и All Commands
8. **plan.md:** отметь фазу как ✅, обнови счётчик версии/тестов
9. **Commit:** один коммит на фазу с описательным сообщением
10. **Push:** `git push origin main`
11. **Tag:** `git tag v0.X.Y && git push origin v0.X.Y`
12. **Release:** `gh release create v0.X.Y` с changelog (What's New, Install/Upgrade)
**Не пропускай пункты.** Каждая фаза = полный цикл от кода до PyPI.
## Publishing
- **PyPI:** https://pypi.org/project/soup-cli/ — `pip install soup-cli`

View File

@ -8,6 +8,8 @@ Custom reward functions can be loaded from a Python file with a
`reward_fn(completions, **kwargs)` callable.
"""
from __future__ import annotations
import importlib.util
import re
from pathlib import Path