Skip to content

fix(datashare-python): properly support document with absolute path#29

Merged
ClemDoum merged 1 commit into
mainfrom
fix(datashare-python)/doc-absolute-path-support
Apr 21, 2026
Merged

fix(datashare-python): properly support document with absolute path#29
ClemDoum merged 1 commit into
mainfrom
fix(datashare-python)/doc-absolute-path-support

Conversation

@ClemDoum
Copy link
Copy Markdown
Contributor

@ClemDoum ClemDoum commented Apr 21, 2026

Bug description

When a DS Document has an absolute path /some/path, when a FilesystemDocument is created from it using to_filesystem and when we then do locate with this filesystem document using a original_root this results in only the doc absolute path without the original_root base.

This is because Path("/base") / Path("/absolute") == Path("/absolute").

See unitest of this PR to understand the failure.

Changes

datashare-python

Fixed

  • made FilesystemDocument support only relative paths as they are meant to hold path relatively to their location
  • fixed Document.to_filesystem to make sure the FilesystemDocument is created with a relative path

@ClemDoum ClemDoum force-pushed the fix(datashare-python)/doc-absolute-path-support branch from 1a57fd0 to c3d7c2c Compare April 21, 2026 14:11
@ClemDoum ClemDoum marked this pull request as ready for review April 21, 2026 14:12
@ClemDoum ClemDoum force-pushed the fix(datashare-python)/doc-absolute-path-support branch from c3d7c2c to 9a4a6e1 Compare April 21, 2026 14:14
@ClemDoum ClemDoum force-pushed the fix(datashare-python)/doc-absolute-path-support branch from 9a4a6e1 to bdb27d3 Compare April 21, 2026 14:17
@ClemDoum ClemDoum merged commit 9a652cb into main Apr 21, 2026
8 checks passed
@ClemDoum ClemDoum deleted the fix(datashare-python)/doc-absolute-path-support branch April 23, 2026 07:55
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