Skip to content

Improve JMP17 writer and reader fixture coverage - #1

Open
alexandergwosdz wants to merge 2 commits into
mainfrom
feat/jmp-writer
Open

Improve JMP17 writer and reader fixture coverage#1
alexandergwosdz wants to merge 2 commits into
mainfrom
feat/jmp-writer

Conversation

@alexandergwosdz

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI lite review requested due to automatic review settings September 1, 2026 20:45

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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 thread src/jmpio/writer.py Outdated
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";
Comment thread tests/test_writer.py


def test_write_jmp17_metadata_and_string_dtype():
"""Test that writer output has readable JMP 17 metadata and pandas string columns."""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants