Skip to content

Feat: Delete endpoints for prod#438

Open
ta4tsering wants to merge 6 commits into
mainfrom
delete-for-prod
Open

Feat: Delete endpoints for prod#438
ta4tsering wants to merge 6 commits into
mainfrom
delete-for-prod

Conversation

@ta4tsering
Copy link
Copy Markdown
Contributor

  • Delete Expression and its related resources or nodes
  • Delete Manifestation and its related resources or nodes

ta4tsering added 5 commits May 6, 2026 22:23
- 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.
@ta4tsering ta4tsering requested a review from lobsam May 12, 2026 06:45
…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.
@ta4tsering ta4tsering changed the title Delete for prod Feat: Delete endpoints for prod May 12, 2026
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