コード例 #1
0
 def __call__(self, args):
     db_engine = create_engine(self.root.db_url)
     config_store = Store.factory(args.config)
     with config_store.open() as fd:
         config = CrosstabsConfigLoader(config=yaml.full_load(fd))
     run_crosstabs(db_engine, config)
コード例 #2
0
def test_ModelEvaluator_crosstabs(model_evaluator, crosstabs_config):
    run_crosstabs(model_evaluator.engine, crosstabs_config)
    assert isinstance(model_evaluator.crosstabs, pd.DataFrame)
コード例 #3
0
def test_run_crosstabs(finished_experiment, crosstabs_config):
    run_crosstabs(finished_experiment.db_engine, crosstabs_config)
    expected_table_name = crosstabs_config.output[
        "schema"] + "." + crosstabs_config.output["table"]
    table_has_data(expected_table_name, finished_experiment.db_engine)