Skip to content

Commit

Permalink
CleverCSV Release v0.8.0
Browse files Browse the repository at this point in the history
* Improve median runtime by ~68% (~52% on average) by: 1) more caching, 2)
  implementing a heavy function in C.
* Redesign computation of consistency measure to a class:
  `ConsistencyDetector`.
* Fix potential memory leak in C code for base abstraction
* Fixes to escape sequences in regexes (thanks to @JakobGM!)
* Various improvements to code quality
* Switch documentation style to [furo](https://pypi.org/project/furo/).
  • Loading branch information
GjjvdBurg committed Apr 8, 2023
1 parent 2fa357e commit 25d696a
Show file tree
Hide file tree
Showing 11 changed files with 46 additions and 18 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# Changelog

## Version 0.8.0

* Improve median runtime by ~68% (~52% on average) by: 1) more caching, 2)
implementing a heavy function in C.
* Redesign computation of consistency measure to a class:
`ConsistencyDetector`.
* Fix potential memory leak in C code for base abstraction
* Fixes to escape sequences in regexes (thanks to @JakobGM!)
* Various improvements to code quality
* Switch documentation style to [furo](https://pypi.org/project/furo/).

## Version 0.7.7

* Use r-prefix for regex patterns (thanks to @JakobGM!)
Expand Down
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -226,8 +226,10 @@ with open("data.csv", "r", newline="") as fp:
rows = list(reader)
```

For **large files**, you can speed up detection by supplying a smaller sample
to the sniffer, for example:
Since CleverCSV v0.8.0, dialect detection is a lot faster than in previous
versions. However, for **large files**, you can speed up detection even more
by supplying a sample of the document to the sniffer instead of the whole
file, for example:
```python
dialect = clevercsv.Sniffer().sniff(fp.read(10000))
```
Expand Down
13 changes: 13 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,19 @@
Changelog
=========

Version 0.8.0
-------------


* Improve median runtime by ~68% (~52% on average) by: 1) more caching, 2)
implementing a heavy function in C.
* Redesign computation of consistency measure to a class:
``ConsistencyDetector``.
* Fix potential memory leak in C code for base abstraction
* Fixes to escape sequences in regexes (thanks to @JakobGM!)
* Various improvements to code quality
* Switch documentation style to `furo <https://pypi.org/project/furo/>`_.

Version 0.7.7
-------------

Expand Down
6 changes: 4 additions & 2 deletions docs/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -242,8 +242,10 @@ the Python CSV module:
reader = clevercsv.reader(fp, dialect)
rows = list(reader)
For **large files**\ , you can speed up detection by supplying a smaller sample
to the sniffer, for example:
Since CleverCSV v0.8.0, dialect detection is a lot faster than in previous
versions. However, for **large files**\ , you can speed up detection even more
by supplying a sample of the document to the sniffer instead of the whole
file, for example:

.. code-block:: python
Expand Down
4 changes: 2 additions & 2 deletions man/clevercsv-code.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: clevercsv-code
.\" Author: G.J.J. van den Burg
.\" Generator: Wilderness <https://pypi.org/project/wilderness>
.\" Date: 2023-04-07
.\" Date: 2023-04-08
.\" Manual: clevercsv Manual
.\" Source: clevercsv 0.8.0
.\" Language: English
.\"
.TH "CLEVERCSV-CODE" "1" "2023\-04\-07" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.TH "CLEVERCSV-CODE" "1" "2023\-04\-08" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions man/clevercsv-detect.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: clevercsv-detect
.\" Author: G.J.J. van den Burg
.\" Generator: Wilderness <https://pypi.org/project/wilderness>
.\" Date: 2023-04-07
.\" Date: 2023-04-08
.\" Manual: clevercsv Manual
.\" Source: clevercsv 0.8.0
.\" Language: English
.\"
.TH "CLEVERCSV-DETECT" "1" "2023\-04\-07" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.TH "CLEVERCSV-DETECT" "1" "2023\-04\-08" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions man/clevercsv-explore.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: clevercsv-explore
.\" Author: G.J.J. van den Burg
.\" Generator: Wilderness <https://pypi.org/project/wilderness>
.\" Date: 2023-04-07
.\" Date: 2023-04-08
.\" Manual: clevercsv Manual
.\" Source: clevercsv 0.8.0
.\" Language: English
.\"
.TH "CLEVERCSV-EXPLORE" "1" "2023\-04\-07" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.TH "CLEVERCSV-EXPLORE" "1" "2023\-04\-08" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions man/clevercsv-help.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: clevercsv-help
.\" Author: G.J.J. van den Burg
.\" Generator: Wilderness <https://pypi.org/project/wilderness>
.\" Date: 2023-04-07
.\" Date: 2023-04-08
.\" Manual: clevercsv Manual
.\" Source: clevercsv 0.8.0
.\" Language: English
.\"
.TH "CLEVERCSV-HELP" "1" "2023\-04\-07" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.TH "CLEVERCSV-HELP" "1" "2023\-04\-08" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions man/clevercsv-standardize.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: clevercsv-standardize
.\" Author: G.J.J. van den Burg
.\" Generator: Wilderness <https://pypi.org/project/wilderness>
.\" Date: 2023-04-07
.\" Date: 2023-04-08
.\" Manual: clevercsv Manual
.\" Source: clevercsv 0.8.0
.\" Language: English
.\"
.TH "CLEVERCSV-STANDARDIZE" "1" "2023\-04\-07" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.TH "CLEVERCSV-STANDARDIZE" "1" "2023\-04\-08" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions man/clevercsv-view.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: clevercsv-view
.\" Author: G.J.J. van den Burg
.\" Generator: Wilderness <https://pypi.org/project/wilderness>
.\" Date: 2023-04-07
.\" Date: 2023-04-08
.\" Manual: clevercsv Manual
.\" Source: clevercsv 0.8.0
.\" Language: English
.\"
.TH "CLEVERCSV-VIEW" "1" "2023\-04\-07" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.TH "CLEVERCSV-VIEW" "1" "2023\-04\-08" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions man/clevercsv.1
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
.\" Title: clevercsv
.\" Author: G.J.J. van den Burg
.\" Generator: Wilderness <https://pypi.org/project/wilderness>
.\" Date: 2023-04-07
.\" Date: 2023-04-08
.\" Manual: clevercsv Manual
.\" Source: clevercsv 0.8.0
.\" Language: English
.\"
.TH "CLEVERCSV" "1" "2023\-04\-07" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.TH "CLEVERCSV" "1" "2023\-04\-08" "Clevercsv 0\&.8\&.0" "Clevercsv Manual"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
Expand Down

0 comments on commit 25d696a

Please sign in to comment.