Commit 89c435ad authored by Jameson Rollins's avatar Jameson Rollins
Browse files

cli: option to recursively list all elements of the budget

parent 1fec6185
......@@ -102,6 +102,9 @@ group.add_argument(
'--diff', '-d', metavar='IFO',
help="show difference table between IFO and another IFO description (name or path) and exit (budget not calculated)")
'--list', '-l', action='store_true',
help="list all elements of Budget (budget not calculated)")
'--no-plot', '-np', action='store_false', dest='plot',
help="suppress plotting")
......@@ -181,6 +184,12 @@ def main():
ov = repr(p[2])
print(fmt.format(k, v, ov))
if args.list:
for i in budget.walk():
name = '.'.join([n.__class__.__name__ for n in i])
type = i[-1].__class__.__bases__[0].__name__
print(f'{name} ({type})')
out_data_files = set()
out_plot_files = set()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment