Example #1
0
def sample_pattern_datasource_with_cache(data_filenames):
    metadata = {
        'cache': [{
            'argkey': 'urlpath',
            'regex': make_path_posix(os.path.dirname(__file__)),
            'type': 'file'
        }]
    }
    return csv.CSVSource(data_filenames['sample_pattern'], metadata=metadata)
Example #2
0
def test_open(data_filenames):
    d = csv.CSVSource(data_filenames['sample1'])
    assert d.container == 'dataframe'
    assert d.description is None
    verify_datasource_interface(d)
Example #3
0
def sample_list_datasource_with_path_as_pattern_str(data_filenames):
    return csv.CSVSource(
        [data_filenames['sample2_1'], data_filenames['sample2_2']],
        path_as_pattern='sample{num:d}_{dup:d}.csv')
Example #4
0
def sample_list_datasource(data_filenames):
    return csv.CSVSource(
        [data_filenames['sample2_1'], data_filenames['sample2_2']])
Example #5
0
def sample_pattern_datasource(data_filenames):
    return csv.CSVSource(data_filenames['sample_pattern'])
Example #6
0
def sample2_datasource(data_filenames):
    return csv.CSVSource(data_filenames['sample2_all'])