Repository navigation
Detached mode - #510
Open
Gautzilla wants to merge 20 commits into
Open
Detached mode#510Gautzilla wants to merge 20 commits into
Gautzilla wants to merge 20 commits into
Conversation
Collaborator
This branch has not been deployed
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.
🪽 Local project, distant audio files!
This PR resolves #492 by allowing the
originalAudioDatasetto be located outside the project folder: possibly on another disk or partition.Basic PublicAPI usage
It adds a
Project.build_from_audio_dataset_json()method in the PublicAPI to ease the build of a project in such detached mode:How does it work? (CoreAPI implementation)
The main issue with implementing this was the serialization of paths, which was exclusively done with relative string paths before and needed more flexibility here.
Basically, I've reworked the serialization of paths and added the
osekit.core.json_serializer.anchor_pathcontext manager that works like this:anchor_pathcontext is not used, the serialization is as before (paths are serialized as relative to the folder in which the json file is written. If this is not possible (e.g. if the serialized path is on another partition), it is written as absolute.anchor_pathcontext, paths that are relative to the anchor path are serialized as relative, and paths that aren't relative to the anchor path are written as absolute paths.Example