Beispiel #1
0
def main():
    print(f"KFP-Tekton Compiler {__version__}")
    args = parse_arguments()
    if ((args.py is None and args.package is None) or
        (args.py is not None and args.package is not None)):
        raise ValueError('Either --py or --package is needed but not both.')
    if args.py:
        compile_pyfile(args.py, args.function, args.output, not args.disable_type_check,
                       not args.disable_artifacts)
    else:
        if args.namespace is None:
            raise ValueError('--namespace is required for compiling packages.')
        # TODO: deprecated, but without the monkey-patch this will produce Argo YAML
        kfp_compiler_main.compile_package(args.package, args.namespace, args.function, args.output, not args.disable_type_check)
Beispiel #2
0
def main():
    print(f"KFP-Tekton Compiler {__version__}")
    args = parse_arguments()
    if ((args.py is None and args.package is None)
            or (args.py is not None and args.package is not None)):
        raise ValueError('Either --py or --package is needed but not both.')
    if args.py:
        compile_pyfile(args.py, args.function, args.output,
                       not args.disable_type_check, args.generate_pipelinerun)
    else:
        if args.namespace is None:
            raise ValueError('--namespace is required for compiling packages.')
            kfp_compiler_main.compile_package(args.package, args.namespace,
                                              args.function, args.output,
                                              not args.disable_type_check)