Add closing book structures and account rollups API support#84
Merged
Add closing book structures and account rollups API support#84
Conversation
- Introduced `AccountRollupGroup`, `AccountRollupRow`, and `AccountRollupsResponse` to the models. - Enhanced `ClosingEntryResponse` with a new `reversal` field to track reversal entries. - Updated `EntryTemplateRequest` to include an `auto_reverse` option for automatic reversing entries. - Added `reversal_entry_id` and `reversal_status` fields to `PeriodCloseItemResponse` for better tracking of entry reversals. - Included `parent_document_id` in `SearchHit` to associate search results with their parent documents. These changes improve the data model's capability to handle financial entries and enhance search functionalities.
- Added methods for creating and listing schedules, retrieving schedule facts, and checking period close status in the LedgerClient. - Introduced a method for creating draft closing entries from schedule facts. - Updated imports to include new API endpoints related to schedules and closing entries. - Removed the old mapping association request model in favor of a more generic association request model. These enhancements improve the LedgerClient's capabilities for managing financial schedules and closing entries.
- Updated the condition for identifying string columns in the `parse_datetime_columns` function to use `pd.api.types.is_string_dtype` instead of checking for the "object" dtype. This change improves the accuracy of datetime column inference by leveraging pandas' type checking capabilities. These modifications enhance the robustness of the datetime parsing logic in the dataframe utilities.
- Modified the test case in `test_dataframe_utils.py` to check that the "not_a_date" column is not of datetime type, enhancing the accuracy of the test for the `parse_datetime_columns` function. This change improves the reliability of the test suite by ensuring proper validation of non-datetime columns.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Introduces new API endpoints, models, and field extensions to support closing book structures and account rollups in the robosystems client library. This feature adds the foundational client-side data layer needed for closing book workflows.
Key Accomplishments
New API Endpoints
get_account_rollups– New ledger API endpoint for retrieving account rollup data, enabling aggregated account viewsget_closing_book_structures– New ledger API endpoint for fetching closing book structure definitions (categories and items)New Models
AccountRollupGroup– Represents a logical grouping of account rollup rowsAccountRollupRow– Represents an individual row within an account rollup groupAccountRollupsResponse– Response wrapper for the account rollups endpointClosingBookCategory– Represents a category within a closing book structureClosingBookItem– Represents an individual item within a closing book categoryClosingBookStructuresResponse– Response wrapper for the closing book structures endpointModel Enhancements
ClosingEntryResponse– Extended with additional fields to support closing entry workflowsEntryTemplateRequest– Added new fields to support richer template configurationPeriodCloseItemResponse– Extended with new fields for period close trackingSearchHit– Added new fields to enrich search result dataModule Registration
models/__init__.pyBreaking Changes
None expected. All changes are additive — new endpoints, new models, and new optional fields on existing models.
Testing Notes
ClosingBookCategorycontainingClosingBookItemlists,AccountRollupGroupcontainingAccountRollupRowlists)ClosingEntryResponse,EntryTemplateRequest,PeriodCloseItemResponse,SearchHit) are backward-compatible and do not break existing consumersInfrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/closing-bookmainCo-Authored-By: Claude noreply@anthropic.com