Enable manifest portability via implicit relative path resolution#256
Open
google-labs-jules[bot] wants to merge 1 commit into
Conversation
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.
Summary
This PR introduces implicit relative path resolution for manifest files, replacing machine-specific absolute paths with relative paths based on the manifest's location. This ensures that audit trails and integrity checks remain valid when projects are moved between different researchers, environments, or operating systems.
Rationale
Previously, manifests recorded absolute filesystem paths (e.g.,
/home/user/project/data.set). If a collaborator downloaded that project toC:\Users\Collaborator\Downloads\project, verification would fail because the recorded paths no longer existed.By using the manifest file's parent directory as an implicit root, we achieve:
.fdtfiles). By expanding paths back to absolute strings during theread_manifestphase, we maintain compatibility while keeping the stored representation portable.Key Changes
_make_manifest_relativeineegprep/cli/core.py. This calculates the delta between the artifact and the manifest location usingpathlib..as_posix()for serialized paths to ensure that manifests generated on Windows (using backslashes) are compatible with Linux/macOS and vice versa.read_manifest) to recursively resolve relative paths back into absolute paths upon ingestion.write_manifestandwrite_manifest_fileto ensure all output artifacts are processed before being written to disk.Constraints & Considerations
Acceptance Criteria Progress