def test_linearinterpolation_filter(one_month_dataset):

    config = ConfigParser()

    config.add_section("global_settings")
    config.set("global_settings", 'dataset_id', str(one_month_dataset.id))
    filter_config = '[["lbnl/bldg90/OutdoorAirTemperature", "LinearInterpolation", {"period_seconds": 300, "drop_extra": false}]]'
    config.set("global_settings", 'config', str(filter_config))

    expected = os.path.join(outputdir, "linear_interpolation_dataset_tz.csv")
    run_data_manipulation(config, expected)
def test_roundoff_filter(one_month_dataset):

    config = ConfigParser()

    config.add_section("global_settings")
    config.set("global_settings", 'dataset_id', str(one_month_dataset.id))
    filter_config = '[["lbnl/bldg90/OutdoorAirTemperature", "RoundOff", {"places": 2}]]'
    config.set("global_settings", 'config', str(filter_config))

    expected = os.path.join(outputdir, "roundoff_dataset_2digits_tz.csv")
    run_data_manipulation(config, expected)
def test_linearinterpolation_filter(one_month_dataset):
    
    config = ConfigParser()
    
    config.add_section("global_settings")
    config.set("global_settings", 'dataset_id', str(one_month_dataset.id))
    filter_config = '[["lbnl/bldg90/OutdoorAirTemperature", "LinearInterpolation", {"period_seconds": 300, "drop_extra": false}]]'
    config.set("global_settings", 'config', str(filter_config))
    
    
    expected = os.path.join(outputdir, "linear_interpolation_dataset_tz.csv")
    run_data_manipulation(config, expected)
def test_roundoff_filter(one_month_dataset):
    
    config = ConfigParser()
    
    config.add_section("global_settings")
    config.set("global_settings", 'dataset_id', str(one_month_dataset.id))
    filter_config = '[["lbnl/bldg90/OutdoorAirTemperature", "RoundOff", {"places": 2}]]'
    config.set("global_settings", 'config', str(filter_config))
    
    
    expected = os.path.join(outputdir, "roundoff_dataset_2digits_tz.csv")
    run_data_manipulation(config, expected)
def test_all_filter(one_month_dataset):
    
    config = ConfigParser()
    
    config.add_section("global_settings")
    config.set("global_settings", 'dataset_id', str(one_month_dataset.id))
    filter_config = '[["lbnl/bldg90/OutdoorAirTemperature", "LinearInterpolation", {"period_seconds": 300, "drop_extra": false}],\
             ["lbnl/bldg90/WholeBuildingPower", "LinearInterpolation", {"period_seconds": 300, "drop_extra": false}],\
             ["lbnl/bldg90/OutdoorAirTemperature", "RoundOff", {"places": 2}],\
             ["lbnl/bldg90/WholeBuildingPower", "RoundOff", {"places": 3}],\
             ["lbnl/bldg90/WholeBuildingGas", "Fill", {"period_seconds": 300, "drop_extra": false}]]'
    config.set("global_settings", 'config', str(filter_config))
    expected = os.path.join(outputdir, "all_filter_dataset_tz.csv")
    run_data_manipulation(config, expected)
def test_all_filter(one_month_dataset):

    config = ConfigParser()

    config.add_section("global_settings")
    config.set("global_settings", 'dataset_id', str(one_month_dataset.id))
    filter_config = '[["lbnl/bldg90/OutdoorAirTemperature", "LinearInterpolation", {"period_seconds": 300, "drop_extra": false}],\
             ["lbnl/bldg90/WholeBuildingPower", "LinearInterpolation", {"period_seconds": 300, "drop_extra": false}],\
             ["lbnl/bldg90/OutdoorAirTemperature", "RoundOff", {"places": 2}],\
             ["lbnl/bldg90/WholeBuildingPower", "RoundOff", {"places": 3}],\
             ["lbnl/bldg90/WholeBuildingGas", "Fill", {"period_seconds": 300, "drop_extra": false}]]'

    config.set("global_settings", 'config', str(filter_config))
    expected = os.path.join(outputdir, "all_filter_dataset_tz.csv")
    run_data_manipulation(config, expected)