@@ 45-54 (lines=10) @@ | ||
42 | print 'model {}: {}'.format(model, ' '.join(sorted(models[model]))) |
|
43 | ||
44 | ||
45 | @parsable.command |
|
46 | def models_by_flavor(): |
|
47 | ''' |
|
48 | List models implemented of each flavor. |
|
49 | ''' |
|
50 | flavors = defaultdict(lambda: []) |
|
51 | for spec in list_models(): |
|
52 | flavors[spec['flavor']].append(spec['name']) |
|
53 | for flavor in sorted(flavors): |
|
54 | print 'flavor {}: {}'.format(flavor, ' '.join(sorted(flavors[flavor]))) |
|
55 | ||
56 | ||
57 | @parsable.command |
|
@@ 33-42 (lines=10) @@ | ||
30 | from distributions.tests.util import list_models, import_model |
|
31 | ||
32 | ||
33 | @parsable.command |
|
34 | def flavors_by_model(): |
|
35 | ''' |
|
36 | List flavors implemented of each model. |
|
37 | ''' |
|
38 | models = defaultdict(lambda: []) |
|
39 | for spec in list_models(): |
|
40 | models[spec['name']].append(spec['flavor']) |
|
41 | for model in sorted(models): |
|
42 | print 'model {}: {}'.format(model, ' '.join(sorted(models[model]))) |
|
43 | ||
44 | ||
45 | @parsable.command |