def test_http_filesystem_no_versioning(self, tensorflow_model_dataset): pattern = r"HTTP\(s\) DataSet doesn't support versioning\." with pytest.raises(DataSetError, match=pattern): tensorflow_model_dataset(filepath="https://example.com/file.tf", version=Version(None, None))
def versioned_json_data_set(filepath_json, load_version, save_version): return JSONDataSet( filepath=filepath_json, version=Version(load_version, save_version) )
def versioned_csv_data_set(filepath_csv, load_version, save_version): return CSVDataSet(filepath=filepath_csv, version=Version(load_version, save_version))
def versioned_parquet_data_set(data_path, load_version, save_version): return ParquetLocalDataSet(filepath=data_path, version=Version(load_version, save_version))
def versioned_networkx_data_set(filepath_json, load_version, save_version): return NetworkXLocalDataSet(filepath=filepath_json, version=Version(load_version, save_version))
def test_http_filesystem_no_versioning(self): pattern = r"HTTP\(s\) DataSet doesn't support versioning\." with pytest.raises(DataSetError, match=pattern): GeoJSONDataSet(filepath="https://example/file.geojson", version=Version(None, None))
def versioned_pickle_data_set(filepath_pkl, load_version, save_version): return PickleLocalDataSet(filepath=filepath_pkl, version=Version(load_version, save_version))
def versioned_feather_data_set(filepath, load_version, save_version): return FeatherLocalDataSet( filepath=filepath, version=Version(load_version, save_version) )
def versioned_image_dataset(filepath_png, load_version, save_version): return ImageDataSet(filepath=filepath_png, version=Version(load_version, save_version))
def versioned_csv_data_set(filepath, load_version, save_version): return CSVLocalDataSet( filepath=filepath, save_args={"sep": ","}, version=Version(load_version, save_version), )
def test_http_filesystem_no_versioning(self): pattern = r"HTTP\(s\) DataSet doesn't support versioning\." with pytest.raises(DataSetError, match=pattern): ParquetDataSet(filepath="https://example.com/test.parquet", version=Version(None, None))
def versioned_hdf_data_set(filepath_hdf, load_version, save_version): return HDFDataSet( filepath=filepath_hdf, key=HDF_KEY, version=Version(load_version, save_version) )
def versioned_message_data_set(filepath_message, load_version, save_version): return EmailMessageDataSet( filepath=filepath_message, version=Version(load_version, save_version) )
def versioned_yaml_data_set(filepath_yaml, load_version, save_version): return YAMLDataSet(filepath=filepath_yaml, version=Version(load_version, save_version))
def versioned_tf_model_dataset(filepath, load_version, save_version, tensorflow_model_dataset): return tensorflow_model_dataset(filepath=filepath, version=Version(load_version, save_version))
def versioned_excel_data_set(filepath_excel, load_version, save_version): return ExcelDataSet(filepath=filepath_excel, version=Version(load_version, save_version))
def versioned_parquet_data_set(filepath_parquet, load_version, save_version): return ParquetDataSet( filepath=filepath_parquet, version=Version(load_version, save_version) )
def versioned_txt_data_set(filepath_txt, load_version, save_version): return TextLocalDataSet( filepath=filepath_txt, version=Version(load_version, save_version) )
def versioned_geojson_data_set(filepath, load_version, save_version): return GeoJSONDataSet(filepath=filepath, version=Version(load_version, save_version))
def versioned_xls_data_set(filepath_xls, load_version, save_version): return ExcelLocalDataSet(filepath=filepath_xls, version=Version(load_version, save_version))
def versioned_hdf_data_set(filepath_hdf, load_version, save_version): return HDFLocalDataSet( filepath=filepath_hdf, key="test_hdf", version=Version(load_version, save_version), )
def versioned_tf_model_dataset(filepath, load_version, save_version): return TensorFlowModelDataset( filepath=filepath, version=Version(load_version, save_version) )