From 7bba1bdc544301c3b1a73ebddf8d4f1685a08747 Mon Sep 17 00:00:00 2001 From: James McKinney <26463+jpmckinney@users.noreply.github.com> Date: Tue, 6 Feb 2024 19:29:55 -0500 Subject: [PATCH] fix: csvlook only reads up to --max-rows rows instead of the entire file --- CHANGELOG.rst | 2 ++ csvkit/utilities/csvlook.py | 1 + setup.py | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 613fcc708..d9c18b164 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -2,7 +2,9 @@ Unreleased ---------- * feat: :doc:`/scripts/in2csv` adds a :code:`--reset-dimensions` option to `recalculate `_ the dimensions of an XLSX file, instead of trusting the file's metadata. csvkit's dependency `agate-excel `_ 0.4.0 automatically recalculates the dimensions if the file's metadata expresses dimensions of "A1:A1" (a single cell). +* fix: :doc:`/scripts/csvlook` only reads up to :code:`--max-rows` rows instead of the entire file. * fix: :doc:`/scripts/in2csv`: :code:`--write-sheets` no longer errors when standard input is an XLS or XLSX file. +* Update minimum agate version to 1.6.3. 1.3.0 - October 18, 2023 ------------------------ diff --git a/csvkit/utilities/csvlook.py b/csvkit/utilities/csvlook.py index b12ef34c7..53444143a 100644 --- a/csvkit/utilities/csvlook.py +++ b/csvkit/utilities/csvlook.py @@ -50,6 +50,7 @@ def main(self): self.input_file, skip_lines=self.args.skip_lines, sniff_limit=sniff_limit, + row_limit=self.args.max_rows, column_types=self.get_column_types(), line_numbers=self.args.line_numbers, **self.reader_kwargs, diff --git a/setup.py b/setup.py index 1d79d8640..edebf8422 100644 --- a/setup.py +++ b/setup.py @@ -57,7 +57,7 @@ ], }, install_requires=[ - 'agate>=1.6.1', + 'agate>=1.6.3', 'agate-excel>=0.2.2', 'agate-dbf>=0.2.2', 'agate-sql>=0.5.3',