def run_command(bts_files: List[str]) -> int: arguments = { 'transform': False, 'validate': True, 'package-spark': False, '<BTS>': ['tests/cli/bts/' + bts_file for bts_file in bts_files] } return cli(arguments)
def run_command(example: str, target: str) -> int: arguments = { 'transform': False, 'validate': False, 'package-spark': True, '--source-dir': 'tests/cli/package_spark_examples/' + example, '--target': target } return cli(arguments)
def test_example_dtc_output(input_files, output_file, capsys): stream_dtc_file, window_dtc_file, raw_json_file = input_files assert cli({ 'transform': True, 'validate': False, '--streaming-dtc': stream_dtc_file, '--window-dtc': window_dtc_file, '--source': raw_json_file, '--runner': 'local', '--data-processor': None, '<raw-json-files>': None, }) == 0 out, err = capsys.readouterr() assert out.splitlines() == get_file_text(output_file).splitlines()
def run_command(stream_dtc_file: Optional[str], window_dtc_file: Optional[str], source: Optional[str], raw_json_files: Optional[str], runner: Optional[str] = None, data_processor: Optional[str] = None) -> int: return cli({ 'transform': True, 'validate': False, '--runner': runner, '--streaming-dtc': stream_dtc_file, '--window-dtc': window_dtc_file, '--data-processor': data_processor, '--source': source, '<raw-json-files>': raw_json_files, })
def main(): arguments = docopt(__doc__, version=read_version(VERSION_PATH)) setup_logs(arguments['--debug']) result = cli(arguments) sys.exit(result)
def run_command(dtc_files: List[str]) -> int: arguments = { 'validate': True, '<DTC>': ['tests/core/syntax/dtcs/' + dtc_file for dtc_file in dtc_files] } return cli(arguments)