def main():
    fout = open('cli_usage.inc', 'w')
    pcs.setup_script_registry()

    first = []
    second = []
    for key, registration in sorted(pcs.SCRIPT_REGISTRY.items()):
        if not registration.hidden:
            first.append((key, registration))
        else:
            second.append((key, registration))

    for key, registration in first:
        render_script(fout, key, registration)

    fout.close()

    fout = open('cli_advanced.inc', 'w')

    for key, registration in second:
        render_script(fout, key, registration)
Esempio n. 2
0
def main():
    pcs.setup_script_registry()

    first = []
    second = []
    for key, registration in sorted(pcs.SCRIPT_REGISTRY.items()):
        if not registration.hidden:
            first.append((key, registration))
        else:
            second.append((key, registration))

    with open("cli_usage.inc", "w") as fout:
        for i, (key, registration) in enumerate(first):
            if i != 0:
                fout.write("\n----------\n")
            render_script(fout, key, registration)

    with open("cli_advanced.inc", "w") as fout:
        for i, (key, registration) in enumerate(second):
            if i != 0:
                fout.write("\n----------\n")
            render_script(fout, key, registration)
Esempio n. 3
0
 def test_setup_script(self):
     script.setup_script_registry()
     assert 'train_model' in script.SCRIPT_REGISTRY