@@ -43,28 +43,29 @@ def run(filename, example):
4343 click .echo ('ERROR:' + str (e ))
4444 sys .exit (1 )
4545
46+
4647@cli .command ()
4748@click .argument ('filename' )
4849@click .option ('--pdf' , default = "" , help = 'save output to pdf' )
4950def plot (filename , pdf ):
5051 """Plot a solution file."""
5152 try :
52- plotFromFile (filename , outfile = pdf )
53+ plotFromFile (filename , outfile = pdf )
5354 except IOError as e :
5455 click .echo ('ERROR:' + str (e ))
5556 sys .exit (1 )
5657
5758
5859@cli .command ()
59- @click .option ('-d' , '--which-directory' ,default = None ,
60+ @click .option ('-d' , '--which-directory' , default = None ,
6061 help = 'choose folder to analyze' )
61- @click .option ('-one' , '--all-weights-plus-minus-one' , is_flag = True ,
62+ @click .option ('-one' , '--all-weights-plus-minus-one' , is_flag = True ,
6263 show_default = True ,
6364 help = 'map all weights to plus minus one' )
6465@click .option ('-pm' , '--create-perfect-machting-pdf' , is_flag = True ,
6566 show_default = True ,
6667 help = 'bool if create pdf with all pms' )
67- @click .option ('-i' , '--which-infos' , default = ['norm' , 'ent' , 'k' ],
68+ @click .option ('-i' , '--which-infos' , default = ['norm' , 'ent' , 'k' ],
6869 multiple = True ,
6970 show_default = True ,
7071 help = 'list of which infos appear in info plot' )
@@ -75,7 +76,7 @@ def analyze(which_directory, all_weights_plus_minus_one,
7576 get_analyse (which_directory ,
7677 all_weights_plus_minus_one = all_weights_plus_minus_one ,
7778 create_perfect_machting_pdf = create_perfect_machting_pdf ,
78- which_infos = which_infos )
79+ which_infos = which_infos )
7980 except IOError as e :
8081 click .echo ('ERROR:' + str (e ))
8182 sys .exit (1 )
@@ -86,5 +87,10 @@ def list():
8687 """List all included examples."""
8788 configs_dir = pkg_resources .resource_filename (pytheus .__name__ , 'graphs' )
8889 files = sorted (os .listdir (configs_dir ))
89- for file in files :
90- click .echo (file .replace ('.json' , '' ))
90+
91+ walk = os .walk (configs_dir )
92+ for root , dirs , files in walk :
93+ for file in files :
94+ if file .startswith ('config' ):
95+ click .echo (
96+ print (root .split ('/' )[- 1 ]))
0 commit comments