Exemplo n.º 1
0
    def do_run(self, args):
        from api_etl import Config

        self.config = Config()

        parts = args.split('.')
        services = []
        service_entries = []

        manifest_filename = "{}.yml".format(parts[0])
        manifest = Manifest(manifest_filename)

        if len(parts) == 1:
            services = svcs.service(parts[0])
            service_entries = manifest.get_services()
        else:
            services = [svcs.named_subservice(*parts)]
            service_entries = [manifest.get_service(parts[1])]

        # The ordering of entries in the manifest and entrypoints is
        # important, they must match otherwise this zip call will
        # pair up the wrong things.
        entry = zip(services, service_entries)
        for e in entry:
            ep, sm = e
            self.run_etl(parts[0], ep, sm)
Exemplo n.º 2
0
    def do_run(self, args):
        from api_etl import Config

        self.config = Config()

        parts = args.split('.')
        services = []
        service_entries = []

        manifest_filename = "{}.yml".format(parts[0])
        manifest = Manifest(manifest_filename)

        if len(parts) == 1:
            services = svcs.service(parts[0])
            service_entries = manifest.get_services()
        else:
            services = [svcs.named_subservice(*parts)]
            service_entries = [manifest.get_service(parts[1])]

        # The ordering of entries in the manifest and entrypoints is
        # important, they must match otherwise this zip call will
        # pair up the wrong things.
        entry = zip(services, service_entries)
        for e in entry:
            ep, sm = e
            self.run_etl(parts[0], ep, sm)
Exemplo n.º 3
0
def test_get_subservice_fail_named():
    ep = svcs.named_subservice('health', 'tobermory')
Exemplo n.º 4
0
def test_get_subservice_fail_toplevel():
    ep = svcs.named_subservice('wombles', 'tobermory')
Exemplo n.º 5
0
def test_get_subservice():
    ep = svcs.named_subservice('health', 'hospitals')
    _check_hospital_entrypoints(ep)
def test_get_subservice_fail_named():
    ep = svcs.named_subservice('health', 'tobermory')
def test_get_subservice_fail_toplevel():
    ep = svcs.named_subservice('wombles', 'tobermory')
def test_get_subservice():
    ep = svcs.named_subservice('health', 'hospitals')
    _check_hospital_entrypoints(ep)