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.
This pull request addresses the issue raised by @namitha-sh in #48, where exporting datasets includes full recording paths. This behavior hinders dataset sharing, as paths often need modification for re-import into Whombat. Furthermore, full paths can contain sensitive information that should not be shared.
This PR implements the following changes to export recordings with paths relative to the dataset's
audio_dir
:Unit Test: Added a unit test to verify that dataset import and export correctly handle relative paths. The test imports and exports the test dataset, then checks if the exported recording paths are relative to the
audio_dir
.Dataset API Enhancements: Created
import_dataset
andexport_dataset
methods within thewhombat.api.datasets
module. These methods encapsulate the logic for dataset import and export operations. Currently, AOEF format is supported, with plans to add support for other formats in the future.REST API Integration: Updated the import and export REST API routes to utilize the new dataset API methods.
Path Modification: Modified the export functions to remove the
audio_dir
prefix from recording paths, ensuring they are relative.All tests are currently passing.