- 
                Notifications
    
You must be signed in to change notification settings  - Fork 0
 
Add Session Management and Basic Querying #28
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: develop
Are you sure you want to change the base?
Conversation
The MutableDirective doesn’t notify session; instead, changes are staged and the session queries them when needed.
Bonus: This should also fix the previous failing test.
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 introduces session management functionality along with basic querying scaffolding and updates various ledger operations to support the new session-based workflow. Key changes include:
- Addition of session methods (add, delete, commit, rollback, query, dirty, has_entry) and corresponding tests.
 - Refactoring of ledger delete/remove and dirty checks to use updated methods.
 - Enhancements to mutable directive conversion and new constant METADATA_BBID.
 
Reviewed Changes
Copilot reviewed 9 out of 11 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description | 
|---|---|
| src/beanbot/utils/id_generator.py | Added an exists() method for checking ID presence in the generator. | 
| src/beanbot/session/session.py | Introduced session management methods and integrated them with ledger operations. | 
| src/beanbot/session/session_test.py | Added tests for session add, delete, commit, and dirty state functionality. | 
| src/beanbot/ledger/ledger.py | Updated delete and dirty methods to use METADATA_BBID; replaced remove() with delete(). | 
| src/beanbot/ledger/ledger_test.py | Updated tests to reflect changes in ledger method naming and dirty() usage. | 
| src/beanbot/data/directive.py | Refactored mutable directive conversion and added a reset() method. | 
| src/beanbot/data/constants.py | Added METADATA_BBID constant. | 
| pyproject.toml | Included recordclass and pytest-cov as new dependencies. | 
Comments suppressed due to low confidence (1)
src/beanbot/data/directive.py:190
- The reset() method references self._changes, but this attribute is never initialized. Consider initializing self._changes (or revising the reset logic) to properly revert changes made to the mutable directive.
 
        self._changes.clear()
          Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️  | 
    
4a2a759    to
    155a695      
    Compare
  
    
No description provided.