コード例 #1
0
ファイル: test.py プロジェクト: RealSelf/dbt-source
    def run(self):
        runner = RunManager(
            self.project, self.project['target-path'], self.args)

        include = self.args.models
        exclude = self.args.exclude

        query = {
            "include": self.args.models,
            "exclude": self.args.exclude,
            "resource_types": NodeType.Test
        }

        test_types = [self.args.data, self.args.schema]

        if all(test_types) or not any(test_types):
            tags = set()
        elif self.args.data:
            tags = {'data'}
        elif self.args.schema:
            tags = {'schema'}
        else:
            raise RuntimeError("unexpected")

        query['tags'] = tags
        results = runner.run_flat(query, TestRunner)

        dbt.ui.printer.print_run_end_messages(results)

        return results
コード例 #2
0
    def run(self):
        runner = RunManager(self.config)
        query = {
            "include": ["*"],
            "exclude": [],
            "resource_types": [NodeType.Seed],
        }
        results = runner.run_flat(query, SeedRunner)

        if self.args.show:
            self.show_tables(results)

        dbt.ui.printer.print_run_end_messages(results)
        return results
コード例 #3
0
    def run(self):
        runner = RunManager(self.config)

        query = {
            'include': ['*'],
            'exclude': [],
            'resource_types': [NodeType.Archive]
        }

        results = runner.run_flat(query, ArchiveRunner)

        dbt.ui.printer.print_run_end_messages(results)

        return results