Skip to content
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

python: create new BankFormatter subclass, restructure view-bank to use new class #525

Merged
merged 8 commits into from
Dec 30, 2024
Prev Previous commit
Next Next commit
t: remove single bank info from "view-bank --tree"
Problem: The --tree option for the view-bank command still lists the
default information for the bank being viewed *before* printing the
bank hierarchy, which is not necessary when the user passes the --tree
option. Now that the view_bank() function has been reworked to use the
new BankFormatter subclass, these options are more distinct from one
another, and the --tree option no longer includes this info for the
single bank at the top of the output when the --tree option is passed.

Adjust the expected output in the sharness tests to account for the
removal of the default info for the passed-in bank when calling
view-bank with the --tree option.
cmoussa1 committed Dec 30, 2024
commit c7983247b99a94fa93877dd6429c427ea5762c27
3 changes: 0 additions & 3 deletions t/expected/flux_account/D_bank.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
5 D 1 root 1 0.0

Bank Username RawShares RawUsage Fairshare
D 1 0.0
E 1 0.0
3 changes: 0 additions & 3 deletions t/expected/flux_account/E_bank.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
6 E 1 D 1 0.0

Bank Username RawShares RawUsage Fairshare
E 1 0.0
E user5030 1 0.0 0.5
3 changes: 0 additions & 3 deletions t/expected/flux_account/F_bank_tree.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
7 F 1 D 1 0.0

Bank Username RawShares RawUsage Fairshare
F 1 0.0

3 changes: 0 additions & 3 deletions t/expected/flux_account/full_hierarchy.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1 0.0

Bank Username RawShares RawUsage Fairshare
root 1 0.0
A 1 0.0
3 changes: 0 additions & 3 deletions t/expected/pop_db/db_hierarchy_base.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1 0.0

Bank Username RawShares RawUsage Fairshare
root 1 0.0
A 1 0.0
3 changes: 0 additions & 3 deletions t/expected/pop_db/db_hierarchy_new_users.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1 0.0

Bank Username RawShares RawUsage Fairshare
root 1 0.0
A 1 0.0
3 changes: 0 additions & 3 deletions t/expected/print_hierarchy/small_no_tie.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1000 133.0

Bank Username RawShares RawUsage Fairshare
root 1000 133.0
account1 1000 121.0
3 changes: 0 additions & 3 deletions t/expected/print_hierarchy/small_tie.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1000 133.0

Bank Username RawShares RawUsage Fairshare
root 1000 133.0
account1 1000 120.0
3 changes: 0 additions & 3 deletions t/expected/print_hierarchy/small_tie_all.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1000 1332.0

Bank Username RawShares RawUsage Fairshare
root 1000 1332.0
account1 1000 120.0
3 changes: 0 additions & 3 deletions t/expected/update_fshare/post_fshare_update.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1000 180.0

Bank Username RawShares RawUsage Fairshare
root 1000 180.0
account1 1000 121.0
3 changes: 0 additions & 3 deletions t/expected/update_fshare/pre_fshare_update.expected
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
bank_id bank active parent_bank shares job_usage
1 root 1 1000 133.0

Bank Username RawShares RawUsage Fairshare
root 1000 133.0
account1 1000 121.0