예제 #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)
예제 #2
0
파일: etl.py 프로젝트: datagovuk/api_etl
    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)
예제 #3
0
def test_get_service():
    ep = svcs.service('health')[0]
    _check_hospital_entrypoints(ep)
def test_get_service():
    ep = svcs.service('health')[0]
    _check_hospital_entrypoints(ep)