-
Notifications
You must be signed in to change notification settings - Fork 0
Add SRS persistence helpers #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: fix-concurrency-bug
Are you sure you want to change the base?
Add SRS persistence helpers #25
Conversation
Summary of ChangesHello @cosmopax, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces a foundational component for an 'Openings Mentor' feature by implementing a spaced repetition system (SRS) in a new Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a spaced-repetition system (SRS) for learning chess openings, complete with persistence helpers (save_items, load_items) and unit tests. The documentation in the README and a new project_directive.md file has been updated to reflect these changes. Additionally, the installation scripts have been significantly improved to support non-interactive mode and to dynamically fetch the latest Stockfish engine, which is a great enhancement. The code is well-formatted and the new feature is well-tested. I have one suggestion to improve the robustness of the item loading logic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds SRS (Spaced Repetition System) persistence helpers to support the Openings Mentor functionality. The implementation provides JSON-based storage and loading of training items using the SM-2 algorithm for spaced repetition scheduling.
Key changes:
- Implements
save_itemsandload_itemsfunctions in the newchess_app/srs.pymodule - Adds comprehensive documentation for the SRS system in README and project directive
- Updates project configuration with auto-installer improvements and code style fixes
Reviewed Changes
Copilot reviewed 26 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| chess_app/srs.py | Complete SRS module with SM-2 algorithm and persistence helpers |
| tests/test_srs.py | Unit tests for SRS functionality including persistence testing |
| project_directive.md | New project documentation outlining goals and architecture |
| README.md | Updated with SRS documentation and installer instructions |
| install_chess_app.sh | Enhanced installer with non-interactive mode and dynamic Stockfish downloads |
| Multiple test files | Code style improvements (single to double quotes, formatting) |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 26 out of 26 changed files in this pull request and generated 2 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| return [item for item in items if item.due <= today] | ||
|
|
||
|
|
||
| def save_items(items: Iterable[SRSItem], path: str | Path) -> None: |
Copilot
AI
Sep 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function should validate that the path is writable before attempting to serialize and write data. Consider adding a check to ensure the parent directory exists and is writable.
| except (KeyError, ValueError): | ||
| # Optionally, you could log a warning here about the malformed entry. | ||
| continue |
Copilot
AI
Sep 27, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Silent failure when loading malformed entries could make debugging difficult. Consider logging the warning about malformed entries or returning information about skipped entries to the caller.
Summary
save_itemsandload_itemsinsrs.pyTesting
pytest -qblack --check chess_app testsflake8(fails: command not found)https://chatgpt.com/codex/tasks/task_e_684ce44e7f78832ebfafdb3cc9a3182b