Skip to content

feat(ps): expose per-storage-element common paths in --json output - #176

Open
djgormley wants to merge 2 commits into
CHIMEFRB:mainfrom
WVURAIL:feat/ps-common-path
Open

feat(ps): expose per-storage-element common paths in --json output#176
djgormley wants to merge 2 commits into
CHIMEFRB:mainfrom
WVURAIL:feat/ps-common-path

Conversation

@djgormley

Copy link
Copy Markdown
Contributor

Composing download paths from ps --json requires re-deriving the common directory split that the files table computes internally (ps, pull, and create_files_table each inline it today). This adds a common_paths field to the --json payload: per storage element, the deepest common directory and the file names relative to it.

The derivation lives in utilities.common_paths(), and create_files_table now renders from the same helper -- which also fixes the single-file case, where the table previously showed the file itself as the common path with - . as the entry. An element with no usable split reports common_path: "" with the original paths, so nothing is hidden. Unit tests cover the split and no-split cases; the live ps --json test now asserts the field.

@djgormley
djgormley marked this pull request as draft August 24, 2026 23:52
@djgormley
djgormley requested a review from tjzegmott August 25, 2026 17:14
@djgormley
djgormley marked this pull request as ready for review August 25, 2026 17:14
@djgormley djgormley self-assigned this Aug 25, 2026
@djgormley djgormley added the FEATURE New Feature Request label Aug 25, 2026
@djgormley
djgormley marked this pull request as draft August 25, 2026 21:21
@djgormley
djgormley force-pushed the feat/ps-common-path branch from b26d11c to a189b14 Compare August 25, 2026 21:37
@CHIMEFRB CHIMEFRB deleted a comment from codecov-commenter Aug 25, 2026
@djgormley
djgormley marked this pull request as ready for review August 25, 2026 21:46
@djgormley
djgormley enabled auto-merge August 25, 2026 21:46
@djgormley
djgormley disabled auto-merge August 26, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEATURE New Feature Request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant