diff --git a/src/hipscat_import/__init__.py b/src/hipscat_import/__init__.py index 442354d7..ccdbd851 100644 --- a/src/hipscat_import/__init__.py +++ b/src/hipscat_import/__init__.py @@ -1,3 +1,4 @@ """All modules for hipscat-import package""" + from ._version import __version__ from .runtime_arguments import RuntimeArguments diff --git a/tests/hipscat_import/catalog/test_file_readers.py b/tests/hipscat_import/catalog/test_file_readers.py index 8ceedb3f..3bab85df 100644 --- a/tests/hipscat_import/catalog/test_file_readers.py +++ b/tests/hipscat_import/catalog/test_file_readers.py @@ -57,6 +57,23 @@ def test_csv_reader(small_sky_single_file): assert total_chunks == 1 +def test_csv_gzip_reader(formats_dir): + """Verify we can read the csv file into a single data frame.""" + total_chunks = 0 + for frame in CsvReader(compression="zip").read(formats_dir / "catalog.zip"): + total_chunks += 1 + assert len(frame) == 131 + + assert total_chunks == 1 + + total_chunks = 0 + for frame in CsvReader(compression="gzip").read(formats_dir / "catalog.csv.gz"): + total_chunks += 1 + assert len(frame) == 131 + + assert total_chunks == 1 + + def test_csv_reader_chunks(small_sky_single_file): """Verify we can read the csv file into multiple data frames.""" total_chunks = 0 diff --git a/tests/hipscat_import/data/test_formats/catalog.csv.gz b/tests/hipscat_import/data/test_formats/catalog.csv.gz new file mode 100644 index 00000000..ba5061cf Binary files /dev/null and b/tests/hipscat_import/data/test_formats/catalog.csv.gz differ diff --git a/tests/hipscat_import/data/test_formats/catalog.zip b/tests/hipscat_import/data/test_formats/catalog.zip new file mode 100644 index 00000000..b0188e9e Binary files /dev/null and b/tests/hipscat_import/data/test_formats/catalog.zip differ