Skip to content

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

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

djgormley wants to merge 4 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

@tjzegmott tjzegmott left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look good. Run pre-commit to pass CI.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 93.75000% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.16%. Comparing base (a0646d7) to head (5ac42ce).
⚠️ Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
dtcli/ps.py 50.00% 2 Missing ⚠️
tests/test_cli.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main     #176       +/-   ##
===========================================
- Coverage   67.01%   51.16%   -15.85%     
===========================================
  Files          15       17        +2     
  Lines        1640     1718       +78     
===========================================
- Hits         1099      879      -220     
- Misses        541      839      +298     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@coveralls

Copy link
Copy Markdown

Coverage Status

coverage: 51.164% (-15.8%) from 67.012% — WVURAIL:feat/ps-common-path into CHIMEFRB:main

@djgormley
djgormley requested a review from tjzegmott September 12, 2026 17:58
@djgormley

Copy link
Copy Markdown
Contributor Author

@tjzegmott -- Git is killing me. CI passes now after running precommit. Please re-approve.

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.

4 participants