Merged
Conversation
…ngRow exclusive end
…ch the end of the file
…ead of removing 2 bytes
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the papaparse CSV parsing library with csv-range, a custom library created by the author that provides byte-level control over remote CSV file fetching. The change enables more efficient parsing by controlling exactly which bytes are fetched from remote CSV files.
Key Changes
- Complete rewrite of CSV parsing logic: Replaced papaparse with csv-range library, introducing new cache management (
CSVCache,CSVRange) and dataframe implementation - Added comprehensive test suite: New test files for both dataframe and cache functionality using vitest
- Code style modernization: Switched from double quotes to single quotes, removed semicolons, updated ESLint configuration with additional plugins (jsdoc, simple-import-sort, stylistic)
Reviewed Changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/cache.ts | New file implementing CSVCache and CSVRange classes for efficient byte-range based CSV data caching |
| src/dataframe.ts | New file implementing csvDataFrame function using csv-range library instead of papaparse |
| src/helpers.ts | Removed formatBytes function, added checkNonNegativeInteger utility, updated JSDoc formatting |
| src/csv.ts | Deleted - old papaparse-based implementation completely removed |
| src/App.tsx | Removed AbortController usage, updated imports and code style |
| src/Page.tsx | Updated DataFrame type import, changed metadata field from isPartial to isNumRowsEstimated |
| src/Welcome.tsx | Added JSDoc comment, updated code style |
| src/Loading.tsx | Updated JSDoc formatting, code style changes |
| src/Layout.tsx | Updated JSDoc formatting, removed error parameter comment |
| src/Dropzone.tsx | Updated JSDoc formatting, added inline function documentation |
| src/main.tsx | Reorganized imports, code style changes |
| src/styles/hightable.css | Adjusted rowheader font size and padding |
| vite.config.ts | Reorganized imports, removed semicolons |
| eslint.config.js | Complete rewrite with additional plugins and modern flat config format |
| package.json | Replaced @severo_tests/papaparse with csv-range, added vitest and testing dependencies, updated hightable version |
| test/dataframe.test.ts | New comprehensive test file for dataframe functionality |
| test/cache.test.ts | New comprehensive test file for cache functionality |
| tsconfig.test.json | New TypeScript configuration for test files |
| tsconfig.json | Added reference to tsconfig.test.json |
| .gitignore | Added coverage directory |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Papaparse is replaced by csv-range, a library I created for parsing remote CSV files. It allows byte-level control of the data we fetch (strings are complex, a character can have more than one byte, we take care of it).
Still some details to fix on this PR, and we should be good