Skip to content
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

Export Functionality #1740

Merged
merged 21 commits into from
Dec 31, 2024
Merged

Export Functionality #1740

merged 21 commits into from
Dec 31, 2024

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Dec 29, 2024

Important

Added export functionality for collections, documents, conversations, users, and more to CSV files, with superuser restrictions and comprehensive tests.

  • Export Functionality:
    • Added export functionality for collections, documents, conversations, users, and more to CSV files.
    • Implemented in collections_router.py, conversations_router.py, documents_router.py, users_router.py, and graphs_router.py.
    • Added corresponding methods in SDKs: ConversationsSDK, DocumentsSDK, UsersSDK.
    • Ensured only superusers can perform export operations.
  • Database Handlers:
    • Added export methods to database handlers for collections, documents, conversations, users, and graphs.
    • Implemented CSV export logic with filtering and column selection.
  • Tests:
    • Added unit tests in test_collections.py and test_graphs.py to verify export functionality.
  • Miscellaneous:
    • Updated .pre-commit-config.yaml to simplify isort command.
    • Minor refactoring and error handling improvements in database handlers.

This description was created by Ellipsis for b1af2de. It will automatically update as commits are pushed.

@NolanTrem NolanTrem marked this pull request as ready for review December 31, 2024 21:49
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to b1af2de in 1 minute and 15 seconds

More details
  • Looked at 5167 lines of code in 35 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. py/sdk/v3/conversations.py:201
  • Draft comment:
    The export and export_messages methods have similar logic. Consider refactoring to use a helper function to reduce redundancy.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code in the export and export_messages methods in py/sdk/v3/conversations.py and py/sdk/v3/documents.py is almost identical. This redundancy can be reduced by creating a helper function to handle the common logic, which will improve maintainability and reduce the risk of errors.
2. py/sdk/v3/documents.py:196
  • Draft comment:
    The export and export_entities methods have similar logic. Consider refactoring to use a helper function to reduce redundancy.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code in the export and export_entities methods in py/sdk/v3/documents.py is almost identical. This redundancy can be reduced by creating a helper function to handle the common logic, which will improve maintainability and reduce the risk of errors.
3. py/sdk/v3/documents.py:293
  • Draft comment:
    The export and export_relationships methods have similar logic. Consider refactoring to use a helper function to reduce redundancy.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The code in the export and export_relationships methods in py/sdk/v3/documents.py is almost identical. This redundancy can be reduced by creating a helper function to handle the common logic, which will improve maintainability and reduce the risk of errors.

Workflow ID: wflow_CXlcL1xY7mRc6uno


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@NolanTrem NolanTrem merged commit 0f5c592 into main Dec 31, 2024
14 of 15 checks passed
@NolanTrem NolanTrem deleted the Nolan/ExportTables branch December 31, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant