-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add new inspect
sub-command
#76
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #76 +/- ##
==========================================
+ Coverage 80.56% 80.84% +0.28%
==========================================
Files 3 4 +1
Lines 463 496 +33
==========================================
+ Hits 373 401 +28
- Misses 66 70 +4
- Partials 24 25 +1
☔ View full report in Codecov by Sentry. |
Test Results33 tests +7 33 ✔️ +7 1s ⏱️ -1s Results for commit 4c9386e. ± Comparison against base commit ba8d41b. This pull request removes 9 and adds 16 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
2ae44f9
to
7fbdf36
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to always use --all
and --full-paths
with --format tree
/ --format json
?
It makes sense, given that the tree format with "--all" and "--full-path" won't cause the terminal screen to be overcrowded in general. |
Given that tree view is the default, and JSON is better than the table view, do we even want to retain it? It might make sense to just get rid of it if we don't plan on using it going forward. |
While I don't have a strong opinion on this, it's an interesting question. |
It would make sense to keep the table as default because it shows a brief summary of the content of a checkpoint Example:
In comparison, when displaying tree and json format with Example:
@adrianreber What do you think? |
05e8058
to
316d496
Compare
628fe0f
to
0812b22
Compare
@rst0git and I talked about this a bit. Our idea was to keep the current table as is if using the the In addition to Maybe we should include a hint in the description of The introduction of the new sub-command is motivated that the output of |
inspect
sub-command
Regarding serialising to JSON, we have two ways to do it:
I can hack the library together in a couple of days, but I would like to know if you guys think this approach is any more useful that the first one. |
I like this option as well. Because it will provide some consistency with the table and tree format. |
c87413c
to
82d2814
Compare
74d8397
to
8371eef
Compare
This commit introduces a new sub-command `inspect`. This new sub-command provides more detailed information about checkpoints using a default tree output format. The `inspect` sub-command inherits all the flags previously used for the show sub-command, with the exception of --full-paths which has been removed. This change was made because the tree and json formats now provide more compact representations, allowing us to display the full paths by default. Signed-off-by: Kouame Behouba Manasse <[email protected]>
This commit adds tests for the default output format (tree) of the `inspect` sub-command. Signed-off-by: Kouame Behouba Manasse <[email protected]>
This commit reduces code duplication between the table and the tree rendering logics. The duplicated logic for retrieving checkpoint information has been extracted into a reusable function: `getCheckpointInfo`. Signed-off-by: Kouame Behouba Manasse <[email protected]>
inspect
sub-commandinspect
sub-command
This PR adds a new
inspect
sub-command with a default tree output format, supplementing the existingshow
sub-command. Theshow
sub-command no longer supports flags and is now used for getting a quick checkpoint overview in a table format. On the other hand, the newinspect
sub-command offers a detailed view of the checkpoint, using all the flags previously used with show.Fixes: #75