From 26cccaf730474e1b166c0cb5c00adb22d6f41e1f Mon Sep 17 00:00:00 2001 From: Alpamys Date: Mon, 23 Mar 2026 16:34:11 +0500 Subject: [PATCH] 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) --- CLAUDE.md | 19 +++++++++++++++++++ soup_cli/trainer/rewards.py | 2 ++ 2 files changed, 21 insertions(+) diff --git a/CLAUDE.md b/CLAUDE.md index 7341565..884abca 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -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` diff --git a/soup_cli/trainer/rewards.py b/soup_cli/trainer/rewards.py index d42c0e4..b924876 100644 --- a/soup_cli/trainer/rewards.py +++ b/soup_cli/trainer/rewards.py @@ -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