Changelog - sheets¶
All notable changes to sheets are documented in this file.
[2.0.0] - 2024-07-02¶
Added¶
New Utility Functions¶
csv.filter(rows, predicate)- Filter rows based on predicate functioncsv.map(rows, transformer)- Transform rows using transformer functioncsv.merge(rows1, rows2)- Merge two CSV row setscsv.unique(rows, key_func)- Remove duplicate rowscsv.sort(rows, comparator)- Sort rows using comparator functioncsv.transpose(rows)- Transpose CSV matrix (rows become columns)csv.group_by(rows, key_func)- Group rows by key functioncsv.column(rows, column_index)- Extract single column from rows
Enhanced Reader Class¶
Reader:readall()- Get all remaining rows as arrayReader:get(index)- Get specific row by 1-based indexReader:slice(start, finish)- Get slice of rowsReader:column(col_index)- Extract single columnReader:filter(predicate)- Filter rowsReader:map(transformer)- Transform rows
Enhanced DictReader Class¶
DictReader:readall()- Get all remaining records as arrayDictReader:count()- Get record countDictReader:filter(predicate)- Filter records by predicateDictReader:map(transformer)- Map records with transformer- BUG FIX: Fixed
reset()method by properly tracking_consumed_headerflag
Enhanced DictWriter Class¶
DictWriter:writerows(dicts)- Write multiple records at once
Documentation¶
- Professional README_COMPLETE.md with full API reference
- CONTRIBUTING.md for developers
- Enhanced inline code comments
- Comprehensive test suite (test_csv_enhanced.lua)
Testing¶
- 25 comprehensive test cases in test_csv_enhanced.lua
- Tests for all new functions
- Edge case coverage
- Validation of bug fixes
Changed¶
- Version bumped from 0.1.0 to 2.0.0
- Enhanced error handling and validation throughout
- Improved DictReader implementation with proper state tracking
- Better documentation and examples
Fixed¶
- DictReader.reset() bug: The
_consumed_headerflag was not being set, causing reset to fail - Improved null/empty field handling in DictReader
- Enhanced error messages for invalid parameters
Deprecated¶
- None
Removed¶
- None
Security¶
- None
[0.1.0] - 2024-06-01 (Initial Release)¶
Added¶
- Core CSV reader with row-based iteration
- Core CSV writer with row-based output
- DictReader class for dictionary-based reading
- DictWriter class for dictionary-based writing
- Dialect system with built-in presets (excel, excel_tab, unix)
- Support for custom dialects
- CSV format sniffer for auto-detection
- Test suite with basic coverage
- Basic examples
Version Guide¶
- v2.0.0 (2024-07-02): Major release with new features and bug fixes - Production ready
- v0.1.0 (2024-06-01): Initial release - Foundation version
Upgrade Notes¶
From 0.1.0 to 2.0.0¶
No breaking changes! Your existing code will continue to work.
New Capabilities¶
- Use new utility functions for data transformation
- Use new Reader methods for advanced queries
- Use new DictReader methods for filtering/mapping
- Benefit from bug fixes in reset() functionality
Recommended Updates¶
- Update to v2.0.0 for bug fixes
- Adopt new utility functions where applicable
- Use new Reader/DictReader methods for cleaner code
Example of migration to new style:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Future Roadmap¶
Planned for v2.1.0¶
- Streaming support for large files
- More statistical functions
- Excel-specific features
Planned for v3.0.0¶
- Lua coroutine-based streaming
- Async I/O support
- Performance optimizations
Support¶
- For bug reports: Open an issue on GitHub
- For feature requests: Discuss in GitHub issues
- For help: Check README_COMPLETE.md and examples
License¶
MIT License - See LICENSE file for details