-
Notifications
You must be signed in to change notification settings - Fork 0
Refactor table API with simplified naming and enhanced functionality #23
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
Conversation
## Summary This commit introduces several enhancements to the project configuration and cleans up unused API files, improving overall maintainability. ## Key Changes - Added `basedpyright` configuration to `pyproject.toml` for better type checking and project structure. - Removed several unused API files related to file management and table operations, streamlining the codebase. - Updated `GraphClient` to support optional entity creation during graph initialization, enhancing flexibility for ingestion workflows. ## Testing Notes - Ensure that the project builds successfully with the new configuration. - Verify that existing functionalities remain intact after the removal of unused API files. ## Infrastructure Considerations - The removal of unused files reduces clutter and potential confusion for developers, making the codebase easier to navigate. --- 🤖 Generated with [Claude Code](https://claude.ai/code)
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.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| *, client: Union[AuthenticatedClient, Client], response: httpx.Response | ||
| ) -> Optional[Union[Any, HTTPValidationError]]: | ||
| if response.status_code == 200: | ||
| # Check if this is NDJSON - if so, skip parsing (will be handled by client) | ||
| content_type = response.headers.get("content-type", "") | ||
| stream_format = response.headers.get("x-stream-format", "") | ||
| if "application/x-ndjson" in content_type or stream_format == "ndjson": | ||
| return None # Skip parsing, client will handle NDJSON | ||
| response_200 = response.json() | ||
| return response_200 |
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.
NDJSON responses now parsed incorrectly
The _parse_response helper no longer checks for NDJSON (content-type: application/x-ndjson or x-stream-format: ndjson) before calling response.json(). For streaming Cypher queries the server returns an NDJSON stream, which previously skipped parsing so the caller could iterate the stream. With the guard removed, response.json() will attempt to read and decode the entire stream as a single JSON document and raise JSONDecodeError (or buffer the whole response) whenever NDJSON is returned. This breaks the streaming query path and can regress both functionality and memory usage.
Useful? React with 👍 / 👎.
…ement (#24) ## Summary This PR introduces significant improvements to the robosystems client with enhanced API documentation, improved security practices, streamlined file management, and better NDJSON response handling for Cypher queries. ## Key Accomplishments ### 🔧 API Enhancements - **Enhanced NDJSON Response Handling**: Improved `execute_cypher_query` to better handle NDJSON responses with more robust parsing and error handling - **Comprehensive API Documentation**: Updated documentation across all API endpoints (106 files) with improved parameter descriptions, response schemas, and usage examples - **Table API Refactoring**: Simplified naming conventions and enhanced functionality for table management operations ### 🔒 Security Improvements - **Enhanced Security Practices**: Implemented improved authentication handling and security best practices across all API endpoints - **SSO Token Generation**: Refined SSO token handling mechanisms for better security compliance ### 🧹 Code Quality & Maintenance - **Type Checking Refactor**: Improved type annotations and checking throughout the codebase for better code reliability - **Project Cleanup**: Removed outdated example files and documentation to reduce maintenance burden and confusion - **Extension Updates**: Enhanced client extensions including auth integration, query client, SSE client, and table ingest functionality ### 📁 File Management - **Streamlined Examples**: Removed legacy example files (`basic_query.py`, `e2e_workflow.py`) that were outdated - **Updated Build Configuration**: Enhanced project configuration and CI/CD pipeline improvements ## Breaking Changes - Removed example files from the `examples/` directory - users should refer to updated API documentation for usage patterns - Table API naming conventions have been simplified (see commit #23 for details) ## Testing Notes - All existing API functionality has been preserved while enhancing documentation and security - NDJSON response handling improvements should be tested with various Cypher query response formats - Updated CI/CD pipeline includes additional validation steps ## Infrastructure Considerations - Version bump to v0.2.3 includes all stability improvements - Enhanced error handling may affect downstream error processing logic - Improved type checking may surface previously hidden type-related issues during development This release significantly improves the developer experience with better documentation, enhanced security, and more reliable API interactions while maintaining backward compatibility for core functionality. --- 🤖 Generated with [Claude Code](https://claude.ai/code) **Branch Info:** - Source: `feature/improved-graph-tables` - Target: `main` - Type: feature Co-Authored-By: Claude <noreply@anthropic.com>
Summary
This PR refactors the table management API to improve usability and maintainability by replacing verbose, URL-based function names with clean, descriptive names. The changes significantly enhance the developer experience while maintaining all existing functionality.
Key Accomplishments
API Simplification
delete_file_v1_graphs_graph_id_tables_files_file_id_delete→delete_fileget_file_info_v1_graphs_graph_id_tables_files_file_id_get→get_file_infoingest_tables_v1_graphs_graph_id_tables_ingest_post→ingest_tablesEnhanced Data Models
FileInfo,FileStatusUpdate, andGetFileInfoResponseClient Extensions
Code Organization
Breaking Changes
Testing Notes
Infrastructure Considerations
🤖 Generated with Claude Code
Branch Info:
feature/improved-graph-tablesmainCo-Authored-By: Claude noreply@anthropic.com