From 378b104b0b97dde4a5348b08e697360ca1535d72 Mon Sep 17 00:00:00 2001 From: galipremsagar Date: Mon, 23 May 2022 07:52:29 -0700 Subject: [PATCH] rename --- python/cudf/cudf/io/avro.py | 2 +- python/cudf/cudf/io/csv.py | 4 ++-- python/cudf/cudf/io/json.py | 4 ++-- python/cudf/cudf/io/orc.py | 8 ++++---- python/cudf/cudf/io/parquet.py | 4 ++-- python/cudf/cudf/io/text.py | 2 +- python/cudf/cudf/utils/ioutils.py | 4 ++-- 7 files changed, 14 insertions(+), 14 deletions(-) diff --git a/python/cudf/cudf/io/avro.py b/python/cudf/cudf/io/avro.py index 73b32dfb5f6..66c5c1c5a56 100644 --- a/python/cudf/cudf/io/avro.py +++ b/python/cudf/cudf/io/avro.py @@ -24,7 +24,7 @@ def read_avro( "`read_avro` does not yet support reading multiple files" ) - filepath_or_buffer, compression = ioutils.get_reader_path_or_buf( + filepath_or_buffer, compression = ioutils.get_reader_filepath_or_buffer( path_or_data=filepath_or_buffer, compression=None, **kwargs ) if compression is not None: diff --git a/python/cudf/cudf/io/csv.py b/python/cudf/cudf/io/csv.py index f83c537f77e..2288f896a9d 100644 --- a/python/cudf/cudf/io/csv.py +++ b/python/cudf/cudf/io/csv.py @@ -60,7 +60,7 @@ def read_csv( "`read_csv` does not yet support reading multiple files" ) - filepath_or_buffer, compression = ioutils.get_reader_path_or_buf( + filepath_or_buffer, compression = ioutils.get_reader_filepath_or_buffer( path_or_data=filepath_or_buffer, compression=compression, iotypes=(BytesIO, StringIO, NativeFile), @@ -146,7 +146,7 @@ def to_csv( path_or_buf = StringIO() return_as_string = True - path_or_buf = ioutils.get_writer_path_or_buf( + path_or_buf = ioutils.get_writer_filepath_or_buffer( path_or_data=path_or_buf, mode="w", **kwargs ) diff --git a/python/cudf/cudf/io/json.py b/python/cudf/cudf/io/json.py index 219a4c21e47..869e055decf 100644 --- a/python/cudf/cudf/io/json.py +++ b/python/cudf/cudf/io/json.py @@ -42,7 +42,7 @@ def read_json( source = ioutils.stringify_pathlike(source) source = fs.sep.join([source, "*.json"]) - tmp_source, compression = ioutils.get_reader_path_or_buf( + tmp_source, compression = ioutils.get_reader_filepath_or_buffer( path_or_data=source, compression=compression, iotypes=(BytesIO, StringIO), @@ -74,7 +74,7 @@ def read_json( "multiple files via pandas" ) - path_or_buf, compression = ioutils.get_reader_path_or_buf( + path_or_buf, compression = ioutils.get_reader_filepath_or_buffer( path_or_data=path_or_buf, compression=compression, iotypes=(BytesIO, StringIO), diff --git a/python/cudf/cudf/io/orc.py b/python/cudf/cudf/io/orc.py index 8e6ee305bf2..7c2922f2896 100644 --- a/python/cudf/cudf/io/orc.py +++ b/python/cudf/cudf/io/orc.py @@ -171,7 +171,7 @@ def read_orc_statistics( files_statistics = [] stripes_statistics = [] for source in filepaths_or_buffers: - (filepath_or_buffer, compression,) = ioutils.get_reader_path_or_buf( + (path_or_buff, compression,) = ioutils.get_reader_filepath_or_buffer( path_or_data=source, compression=None, **kwargs ) if compression is not None: @@ -182,7 +182,7 @@ def read_orc_statistics( column_names, raw_file_statistics, raw_stripes_statistics, - ) = liborc.read_raw_orc_statistics(filepath_or_buffer) + ) = liborc.read_raw_orc_statistics(path_or_buff) # Parse column names column_names = [ @@ -323,7 +323,7 @@ def read_orc( source = stringify_path(source) source = fs.sep.join([source, "*.orc"]) - tmp_source, compression = ioutils.get_reader_path_or_buf( + tmp_source, compression = ioutils.get_reader_filepath_or_buffer( path_or_data=source, compression=None, use_python_file_object=use_python_file_object, @@ -422,7 +422,7 @@ def to_orc( "Categorical columns." ) - path_or_buf = ioutils.get_writer_path_or_buf( + path_or_buf = ioutils.get_writer_filepath_or_buffer( path_or_data=fname, mode="wb", **kwargs ) if ioutils.is_fsspec_open_file(path_or_buf): diff --git a/python/cudf/cudf/io/parquet.py b/python/cudf/cudf/io/parquet.py index 5dd23f19981..51c2ac8b828 100644 --- a/python/cudf/cudf/io/parquet.py +++ b/python/cudf/cudf/io/parquet.py @@ -71,7 +71,7 @@ def _write_parquet( ValueError("paths must be list-like when partitions_info provided") paths_or_bufs = [ - ioutils.get_writer_path_or_buf(path, mode="wb", **kwargs) + ioutils.get_writer_filepath_or_buffer(path, mode="wb", **kwargs) for path in paths ] common_args = { @@ -435,7 +435,7 @@ def read_parquet( fs=fs, ) for i, source in enumerate(filepath_or_buffer): - tmp_source, compression = ioutils.get_reader_path_or_buf( + tmp_source, compression = ioutils.get_reader_filepath_or_buffer( path_or_data=source, compression=None, fs=fs, diff --git a/python/cudf/cudf/io/text.py b/python/cudf/cudf/io/text.py index 1bc927b089d..12aa0f6ef8b 100644 --- a/python/cudf/cudf/io/text.py +++ b/python/cudf/cudf/io/text.py @@ -18,7 +18,7 @@ def read_text( ): """{docstring}""" - filepath_or_buffer, compression = ioutils.get_reader_path_or_buf( + filepath_or_buffer, compression = ioutils.get_reader_filepath_or_buffer( path_or_data=filepath_or_buffer, compression=None, iotypes=(BytesIO, StringIO), diff --git a/python/cudf/cudf/utils/ioutils.py b/python/cudf/cudf/utils/ioutils.py index 1d51cc78500..6d6bdabf70d 100644 --- a/python/cudf/cudf/utils/ioutils.py +++ b/python/cudf/cudf/utils/ioutils.py @@ -1319,7 +1319,7 @@ def _open_remote_files( ] -def get_reader_path_or_buf( +def get_reader_filepath_or_buffer( path_or_data, compression, mode="rb", @@ -1428,7 +1428,7 @@ def get_reader_path_or_buf( return path_or_data, compression -def get_writer_path_or_buf(path_or_data, mode, **kwargs): +def get_writer_filepath_or_buffer(path_or_data, mode, **kwargs): """ Return either a filepath string to data, or a open file object to the output filesystem