File: test-recipe.py

package info (click to toggle)
cpl-plugin-vimos 3.1.7%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 21,044 kB
  • sloc: ansic: 160,597; cpp: 13,619; sh: 4,323; python: 1,425; makefile: 793; perl: 10
file content (26 lines) | stat: -rwxr-xr-x 703 bytes parent folder | download | duplicates (11)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env python

#
# Simple pipeline test by loading all recipes and printing some
# basic information from them.
#

import cpl
recipes = cpl.Recipe.list()
if len(recipes) == 0:
    print("No pipeline recipes found")
    exit(1)

r = list()
for rname, versions in recipes:
    print("Recipe {0}:".format(rname))
    for v in versions:
        print("    version {0}".format(v))
    recipe = cpl.Recipe(rname)
    print("  Parameters: {0}".format(str(recipe.param)))
    print("  Docstring: {0}".format(recipe.__doc__.strip()))
    print("  Author: {0} <{1}>".format(recipe.__author__.strip(),
                                       recipe.__email__.strip()))
    print("\n")
    r.append(recipe)