Feat: Delete endpoints for prod#438
Open
ta4tsering wants to merge 6 commits into
Open
Conversation
Contributor
ta4tsering
commented
May 12, 2026
- Delete Expression and its related resources or nodes
- Delete Manifestation and its related resources or nodes
- Introduced OpenAPI specifications for deleting manifestations and expressions, including cascading delete functionality for related entities. - Implemented detailed response schemas for successful deletions and error handling. - Added a Swagger UI viewer for easy access to the new delete endpoints documentation.
- Renamed and restructured delete endpoints to better reflect their functionality, changing 'manifestations' to 'texts' and 'expressions' to 'instances'. - Enhanced cascading delete descriptions to clarify relationships and entities affected during deletion. - Updated response schemas and examples to align with the new endpoint definitions. - Modified Swagger UI title for improved clarity on the documentation context.
- Added a new DELETE endpoint to remove a manifestation and all associated nodes, including annotations and segments. - Introduced a helper function to build a summary of annotations for the response. - Updated Neo4J queries to support the deletion process and return relevant information. - Enhanced unit tests to cover successful deletion, error handling for non-existent manifestations, and cleanup of related segments.
- Implemented a new DELETE endpoint for cascading deletion of texts, including all associated manifestations, annotations, segments, and contributions. - Updated the delete logic to ensure proper handling of alignment annotations and related entities. - Enhanced response structure to include detailed summaries of deleted instances and their annotations. - Added comprehensive unit tests to cover various scenarios, including successful deletions, error handling, and storage cleanup. - Updated OpenAPI specifications to reflect the new endpoint and response formats.
- Improved the `_build_annotation_summary` function to ensure fully sorted output for deterministic responses, addressing Neo4j's lack of guaranteed element order. - Refactored internal data structures for better clarity and efficiency in handling alignment annotations. - Updated Neo4j queries to streamline the retrieval of manifestation IDs and ensure proper error handling for non-existent expressions. - Enhanced logging in the delete instance and delete text functions to capture detailed exception information while maintaining best-effort cleanup. - Adjusted unit tests to reflect changes in the deletion logic and ensure comprehensive coverage of new scenarios.
…handling - Introduced a new static method to format the deletion result of manifestations, enhancing clarity and response structure. - Refactored the deletion logic to utilize a dedicated transaction function, ensuring all operations related to manifestation deletion are encapsulated within a single transaction. - Updated the `delete_manifestation` method to call the new transaction function, streamlining the deletion process and improving error handling. - Enhanced unit tests to validate the new deletion logic and ensure proper handling of non-existent manifestations.
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.