tilo/smarter_csv
65.5
Adequate · 6 November 2026
3.4k
lines of production code
Ruby
with C, JavaScript
4
measurements over time
What this system is
Features
Added automated UPGRADING.md generation script
A new Ruby script, \bin/generate-upgrading-md\, has been added to automatically generate the \UPGRADING.md\ documentation. This tool parses \CHANGELOG.md\ for version history and cautions, and combines it with migration actions defined in \docs/upgrade\_path.json\ to produce a structured upgrade guide, ensuring the documentation stays synchronized with code changes and release notes.
bin · high confidence
Removals
Removal of Hash.zip extension method
The custom \Hash.zip\ class method, which previously allowed creating a hash from parallel arrays of keys and values, has been removed from the \lib/extensions/hash.rb\ file. Users relying on this extension for this specific utility will no longer have access to it via the \Hash\ class.
lib/extensions · high confidence
Behavioural changes
Major rewrite of the C extension for significantly faster CSV parsing
The C extension has been completely rewritten to deliver significantly faster CSV parsing. The new implementation introduces a \ParseContext\ structure to pre-compute parse options once per file, eliminating repeated Ruby hash lookups in the hot path. It also vendors the Eisel-Lemire algorithm from \fast\_float\ for correctly-rounded, high-performance decimal-to-double conversion. To ensure compatibility across different build environments, the build system now probes the compiler for supported optimization flags (such as \-march=native\ or \-mtune=native\) rather than relying on platform heuristics, allowing users to tune performance via the \SMARTER\_CSV\_PERFORMANCE\ environment variable.
ext · high confidence
Project configuration and documentation overhaul
The repository now includes a \.rspec\ file to standardize test execution (requiring \spec\_helper\, enabling color, and using documentation format), a \.rubocop.yml\ file to configure the RuboCop linter (targeting Ruby 2.5 and disabling numerous style/metrics rules), and a \.travis.yml\ file to define the CI build matrix across multiple Ruby and JRuby versions. Additionally, the project documentation has been significantly expanded with a new \CHANGELOG.md\, an \UPGRADING.md\ guide, a \CONTRIBUTORS.md\ file, and a rewritten \README.md\ that highlights performance improvements and new features. The license file has been updated to \LICENSE.txt\ (MIT), and the \Rakefile\ has been enhanced to support RSpec, RuboCop, and C-extension compilation tasks.
(repo-wide) · high confidence
Refactored CSV parsing engine with modular components and improved auto-detection
The library's internal architecture has been restructured into distinct modules (AutoDetection, FileIO, Parser, Reader, etc.) to improve maintainability and performance. This change introduces a new PeekableIO wrapper that enables robust auto-detection of row and column separators on non-seekable streams (like pipes or STDIN) by buffering input, and enhances the auto-detection logic for line endings to handle quoted fields and partial reads more accurately. Additionally, header and hash transformation logic has been extracted into separate modules, allowing for more precise control over header disambiguation, key mapping, and value conversion (including numeric and zero-value removal).
_lib/smarter\csv · high confidence
Refactored library into modular components with new Reader class and thread-safe error tracking
The library has been restructured from a single-file implementation into a modular architecture with separate files for file I/O, auto-detection, parsing, and writing. A new SmarterCSV::Reader class is now the primary interface for processing, allowing access to internal state and original headers. Class-level methods like process, parse, each, and each\_chunk now delegate to this Reader and expose thread-safe error and warning tracking via SmarterCSV.errors and SmarterCSV.warnings, which are cleared at the start of each call and stored per-thread for safety in multi-threaded environments.
lib · high confidence
Test coverage
Added comprehensive test coverage for quoted field parsing edge cases; Added comprehensive test coverage for the CSV parsing engine; Added feature tests for C-accelerated CSV parsing and hash transformations; Added feature tests for CSV formatting edge cases; Added feature tests for CSV parsing behavior; Added feature tests for chunked reading and header handling; Added feature tests for special CSV parsing edge cases; Added test suite for backslash and quote escaping edge cases; Added tests for numeric conversion validation and value converter support; Expanded test coverage for SmarterCSV core features and edge cases; Expanded test fixtures for CSV parsing edge cases.
Dependencies
SmarterCSV gemspec modernization and dependency updates
The smarter\_csv gemspec has been updated to require Ruby 2.6.0 or higher and now explicitly declares a dependency on the bigdecimal gem to ensure compatibility with Ruby 3.4+. The gem's metadata has been expanded with links for documentation, changelogs, and an upgrade wizard, and the license is now explicitly set to MIT. Additionally, the Gemfile has been restructured to include development dependencies such as rake, rubocop, and pry, as well as test dependencies like rspec and simplecov.
(dependencies) · high confidence
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
How this codebase got here
Score
- CAI 64 → 65 (+1.3)
- Rubric changed (rubric-2026.10.5 → rubric-2026.11.2) — scores are not directly comparable.
Lenses
- Code Health 54 → 54 (+0.0)
- Architecture 100 → 100 (+0.0)
- Maturity 55 → 60 (+5.0)
- Readiness 91 → 91 (+0.0)
- Security 88 → 88 (+0.0)
Resolved (3)
- Duplicate intent: Both methods perform the core CSV processing operation. The top-level SmarterCSV.process is a convenience wrapper that likely instantiates a Reader and calls its process method. Exposing both creates confusion about whether the user should use the module-level method or instantiate the Reader class directly.
- Duplicate intent: Similar to process, SmarterCSV.each is a convenience wrapper for Reader.each. This redundancy exists for both the main processing method and the iteration method, leading to inconsistent API surface where users have multiple ways to achieve the same result.
- Duplicate intent: SmarterCSV.each_chunk duplicates the functionality of Reader.each_chunk. This pattern of having both a module-level convenience method and a class-level method for chunking creates inconsistency in how users interact with the library.
New (1)
- Off-boarding risk: anonymized user #1
Changes since last survey
- 1 commits — 1 feature/other, 0 fixes
By area
- .github/workflows — 1 commit
Notable commits
- change: Bump github/codeql-action from 4.38.3 to 4.39.0 (#356)
Written by cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.
Survey your own repository
tilo/smarter_csv was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.
About this page
- The score is its most recent published measurement, taken on 6 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
- Measured at commit b9c93d60244711552ccc5a1721fef54d665b1344 — the exact code this score is about.
- Scored under rubric-2026.11.2 — the same rubric and the same method as every other entry in this index.
- Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.2+preprod-5c4e66d9318b.