Improve JMP17 writer and reader fixture coverage - #1
Open
alexandergwosdz wants to merge 2 commits into
Open
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
The new JSL example hard-codes a local absolute path (non-portable), and the new test’s docstring claims dtype behavior that the assertions don’t actually verify.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
This PR updates the JMP writer to emit a JMP 17-style header/offset-table layout and expands reader + test coverage for additional fixture edge cases (compact pooled strings, extra metadata markers, and fixed-width string null padding).
Changes:
- Switch writer defaults/metadata to JMP 17.2.0 conventions and write the column-offset table after column data is written.
- Extend reader support for additional column-info markers, pooled variable-width string index widths, and updated row-state byte layout.
- Add/expand tests for JMP17 metadata round-trips and new fixture files (compact_UInt8/16/32, minusfour marker, bugMWE4).
File summaries
| File | Description |
|---|---|
| tests/test_writer.py | Loosens dtype equality checks and adds a JMP17 metadata/string-dtype regression test. |
| tests/test_reader.py | Adds fixture-based regression tests for compact pooled strings, 0xfc marker, and fixed-string null padding. |
| src/jmpio/writer.py | Emits JMP17-style header + delayed offset-table patch-up; improves handling of pandas StringDtype. |
| src/jmpio/metadata.py | Accepts an additional 0xfc 0xff marker when scanning column-info sections. |
| src/jmpio/column.py | Fixes rowstate byte interpretation; improves fixed/variable string parsing and pooled index width handling. |
| examples/create_bogus_data.jsl | Adds a JMP JSL script for generating a JMP17-native sample file. |
Review details
- Files reviewed: 6/13 changed files
- Comments generated: 3
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
36
to
37
| version : str, default="17.2.0" | ||
| JMP version to use in the file header |
| @@ -0,0 +1,43 @@ | |||
| Names Default To Here( 1 ); | |||
|
|
|||
| out = "C:/GitHub/jmpio-python/examples/bogus_data_jmp17_native.jmp"; | |||
|
|
||
|
|
||
| def test_write_jmp17_metadata_and_string_dtype(): | ||
| """Test that writer output has readable JMP 17 metadata and pandas string columns.""" |
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.
No description provided.