Consolidate graph operations into unified module and migrate report handling#91
Merged
Consolidate graph operations into unified module and migrate report handling#91
Conversation
This commit removes the existing `create_backup.py` and `restore_backup.py` files and introduces new modules under `graph_operations` for handling backup and restore operations. The new structure enhances organization and aligns with the overall architecture of the API. Key Changes: - Deleted `create_backup.py` and `restore_backup.py`. - Added `op_create_backup.py` and `op_restore_backup.py` to `graph_operations` for improved modularity. - Updated response handling and request structures to support new operation envelopes and error models. This refactor aims to streamline the backup and restore processes, making them more consistent with other graph operations.
…rClient This commit removes the `ReportClient` from the `__init__.py` and `facade.py` files, consolidating report-related functionality within the `LedgerClient`. The `LedgerClient` now includes methods for creating, listing, retrieving, regenerating, deleting, and sharing reports, enhancing its capabilities and maintaining backward compatibility through an alias for report handling. Key Changes: - Removed `ReportClient` imports and references. - Added report handling methods to `LedgerClient`, including `create_report`, `list_reports`, `get_report`, `regenerate_report`, `delete_report`, and `share_report`. - Updated internal documentation to reflect the new report handling structure. These changes streamline the client architecture and improve the organization of report-related operations.
…onality into LedgerClient This commit deletes the `ReportClient` and its corresponding unit tests, transferring all report-related operations to the `LedgerClient`. The changes streamline the client architecture by centralizing report handling, which includes creating, listing, retrieving, regenerating, deleting, and sharing reports. Key Changes: - Removed `report_client.py` and `test_report_client.py`. - Integrated report handling methods into `LedgerClient`. - Updated documentation to reflect the new structure. These modifications enhance maintainability and reduce redundancy in the codebase.
…andling This commit modifies the documentation in `ledger_client.py` to clarify that reports, statements, and publish lists are now included within the `LedgerClient`. This change aligns with the recent consolidation of report functionality from the `ReportClient`, enhancing clarity regarding the client’s capabilities and its backend operations.
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
Refactors the client SDK by consolidating scattered API operations (backup, restore, materialize, subgraph management, tier upgrades) into a unified
graph_operationsmodule, and migrates report handling from a standaloneReportClientintoLedgerClient.Key Changes
Unified Graph Operations Module
api/backup/,api/materialize/, andapi/subgraphs/directories with a singleapi/graph_operations/module containing:op_create_backup— backup creationop_restore_backup— backup restorationop_materialize— graph materializationop_create_subgraph— subgraph creationop_delete_subgraph— subgraph deletionop_upgrade_tier— tier upgrade operationsop_*naming convention, improving discoverability and maintainability.Client Consolidation
MaterializationClient: Its responsibilities have been absorbed intoGraphClient, which now serves as the single entry point for all graph-related operations.LedgerClient: RemovedReportClientreferences and implemented report functionality directly inLedgerClient.facade.pyandclients/__init__.pyto reflect the simplified client hierarchy.Model Simplification
delete_subgraph_request.py→delete_subgraph_op.pybackup_restore_request.py→restore_backup_op.pymaterialize_response_limit_check_type_0.py→upgrade_tier_op.pydelete_subgraph_response,materialize_request,materialize_response,materialize_status_response).operation_envelope.pyto accommodate the new operation types.Breaking Changes
MaterializationClienthas been removed — callers must useGraphClientinstead.ReportClientreferences removed — useLedgerClientfor report operations.api.backup.*,api.materialize.*,api.subgraphs.create_subgraph,api.subgraphs.delete_subgraphare all removed).Testing Notes
test_materialization_client.pyhas been updated to reflect the new client structure and operation patterns.test_extensions.pyupdated for model/import changes.LedgerClientreport handling works as expected in place of the formerReportClient.Infrastructure Considerations
graph_operationsmodule and consolidated client interfaces.🤖 Generated with Claude Code
Branch Info:
feature/graph-opsmainCo-Authored-By: Claude noreply@anthropic.com