def main_app2(): args = get_gen_proc_arg_parser().parse_args() try: uri = _get_uri(args) # blueprints = _build_blueprints(uri) # gen_proc(args, blueprints) obs = stuff(args) mc.write_obs_to_file(obs, './stuff.xml') except Exception as e: logging.error('Failed {} execution for {} with {}.'.format( APPLICATION, args, e)) tb = traceback.format_exc() logging.error(tb) sys.exit(-1) logging.debug('Done {} processing.'.format(APPLICATION)) # bash-5.0# /usr/local/hdf5/bin/h5dump 20190805T024026_f060_s00001.h5 | grep DATASET # DATASET "catalog" { # DATASET "header" { # DATASET "image" { # DATASET "imager" { # DATASET "moment" { # DATASET "a" { # DATASET "ap" { # DATASET "b" { # DATASET "bp" { # DATASET "cdmatrix" { # DATASET "order" { # DATASET "window" { # bash-5.0# ls^C
def _write_obs_mock(): args = get_gen_proc_arg_parser().parse_args() obs = SimpleObservation( collection=args.observation[0], observation_id=args.observation[1], algorithm=Algorithm(name='exposure'), ) mc.write_obs_to_file(obs, args.out_obs_xml)
def to_caom2(): """This function is called by pipeline execution. It must have this name. """ args = get_gen_proc_arg_parser().parse_args() uris = _get_uris(args) blueprints = _build_blueprints(uris) result = gen_proc(args, blueprints) logging.debug(f'Done {APPLICATION} processing.') return result
def blank_main_app(): args = get_gen_proc_arg_parser().parse_args() try: result = to_caom2() sys.exit(result) except Exception as e: logging.error(f'Failed {APPLICATION} execution for {args}.') tb = traceback.format_exc() logging.debug(tb) sys.exit(-1)
def neossat_main_app(): args = get_gen_proc_arg_parser().parse_args() try: result = to_caom2() sys.exit(result) except Exception as e: logging.error('Failed {} execution for {}.'.format(APPLICATION, args)) tb = traceback.format_exc() logging.debug(tb) sys.exit(-1)
def to_caom2(): """This function is called by pipeline execution. It must have this name. """ args = get_gen_proc_arg_parser().parse_args() # uris = _get_uris(args) # blueprints = _build_blueprints(uris) # result = gen_proc(args, blueprints) obs = build_from_hdf5(args) mc.write_obs_to_file(obs, f'./{obs.observation_id}.actual.xml') logging.debug(f'Done {APPLICATION} processing.') return 1
def vlite_main_app(): args = get_gen_proc_arg_parser().parse_args() try: uris = _get_uris(args) blueprints = _build_blueprints(uris) gen_proc(args, blueprints) except Exception as e: logging.error('Failed {} execution for {}.'.format(APPLICATION, args)) tb = traceback.format_exc() logging.debug(tb) sys.exit(-1) logging.debug('Done {} processing.'.format(APPLICATION))
def test_visit_generic_parser(): try: sys.argv = [ 'fits2caom2', '--local', 'fname', '--observation', 'test_collection_id', 'test_observation_id' ] test_parser = GenericParser() test_plugin = __name__ test_args = get_gen_proc_arg_parser().parse_args() kwargs = {} _visit(test_plugin, test_args, test_parser, **kwargs) except BaseException as e: assert False, 'should not get here {}'.format(e)
def main_app(): args = get_gen_proc_arg_parser().parse_args() try: vlass = VlassCardinality() blueprints = vlass.build_blueprints(args) gen_proc(args, blueprints) except Exception as e: logging.error('Failed {} execution.'.format(APPLICATION)) logging.error(e) tb = traceback.format_exc() logging.error(tb) sys.exit(-1) logging.debug('Done {} processing.'.format(APPLICATION))
def to_caom2(): parser = get_gen_proc_arg_parser() args = parser.parse_args() # set the arguments for those files that, despite being fits files, # are processed with a generic parser - do this because fits2caom2 # manages parser creation based on file names, mostly # uris, generic_uris = _filter_args(args) blueprints = _build_blueprints(uris) if len(generic_uris) > 0: sys.argv.append('--use_generic_parser') for ii in generic_uris: sys.argv.append(ii) args = parser.parse_args() result = gen_proc(args, blueprints) logging.debug(f'Done {APPLICATION} processing.') return result
def to_caom2(): args = get_gen_proc_arg_parser().parse_args() vlass = VlassCardinality() blueprints = vlass.build_blueprints(args) return gen_proc(args, blueprints)
def to_caom2(): args = get_gen_proc_arg_parser().parse_args() uris = _get_uris(args) blueprints = _build_blueprints(uris) return gen_proc(args, blueprints)
def to_caom2(): args = get_gen_proc_arg_parser().parse_args() result = _build_observation(args) logging.debug(f'Done {APPLICATION} processing.') return result