Skip to content

Feat/incremental update dat 643 - #52

Merged
Lucashsmello merged 5 commits into
mainfrom
feat/incremental-update-DAT-643
Aug 1, 2025
Merged

Feat/incremental update dat 643#52
Lucashsmello merged 5 commits into
mainfrom
feat/incremental-update-DAT-643

Conversation

@Lucashsmello

Copy link
Copy Markdown
Collaborator

This pull request introduces significant enhancements and new features to the datamint API handlers and dataset modules. Key changes include the addition of new methods for downloading and managing resources and annotations, the introduction of an Annotation class for structured annotation handling, and various improvements to asynchronous operations and code readability.

New Features and Enhancements

Annotation Management:

  • Introduced a download_segmentation_file method to download segmentation files with optional file path saving (datamint/apihandler/annotation_api_handler.py).
  • Added download_multiple_segmentations batch downloading of segmentation files with asynchronous support (datamint/apihandler/annotation_api_handler.py).

Resource Management:

  • Added download_multiple_resources methods for downloading multiple resources asynchronously (datamint/apihandler/root_api_handler.py).

Annotation Class:

  • Added a new Annotation class to represent and manage annotations, including methods for serialization, validation, and utility functions (datamint/dataset/annotation.py). We will probably change the location of this file.

Improvements to Asynchronous Operations

…date

- Introduced a new `Annotation` class to encapsulate annotation data and provide methods for serialization and deserialization.
- Updated `DatamintBaseDataset` to utilize the new `Annotation` class, converting annotations from dictionaries to `Annotation` objects.
- Refactored methods to handle annotations, including filtering and loading segmentations, to work with the new class structure.
- Enhanced dataset metadata handling to support incremental updates for new and deleted resources and annotations.
- Improved error handling and logging for better traceability during dataset operations.
…otationAPIHandler and update DatamintBaseDataset to utilize this feature. Bump version to 1.7.0.
@Lucashsmello
Lucashsmello requested a review from Copilot August 1, 2025 21:30

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request introduces incremental dataset updates and new annotation management features to the datamint library, along with version bump to 1.7.0. The changes enable efficient dataset synchronization through batch downloading operations and structured annotation handling.

  • Added incremental update functionality for datasets to sync changes without full re-download
  • Introduced structured Annotation class to replace dictionary-based annotation handling
  • Added asynchronous batch downloading methods for resources and segmentation files

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
pyproject.toml Version bump from 1.6.3-post1 to 1.7.0
datamint/dataset/annotation.py New Annotation dataclass with serialization and validation methods
datamint/dataset/base_dataset.py Major refactoring for incremental updates and Annotation class integration
datamint/dataset/dataset.py Updated to use Annotation objects instead of dictionaries
datamint/apihandler/root_api_handler.py Added batch resource downloading and project resource retrieval methods
datamint/apihandler/base_api_handler.py Enhanced async request handling with content download support
datamint/apihandler/annotation_api_handler.py Added batch segmentation downloading and individual annotation retrieval

Comment thread datamint/dataset/annotation.py Outdated
Comment thread datamint/dataset/base_dataset.py
Comment thread datamint/apihandler/base_api_handler.py
Comment thread datamint/apihandler/annotation_api_handler.py
Comment thread datamint/dataset/base_dataset.py Outdated
@Lucashsmello
Lucashsmello merged commit ba38212 into main Aug 1, 2025
2 checks passed
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.

2 participants