Skip to content

Pre-registration polish: Date values, API docs, struct-layout and coverage tests - #29

Merged
davidanthoff merged 1 commit into
mainfrom
pre-registration-polish
Aug 29, 2026
Merged

Pre-registration polish: Date values, API docs, struct-layout and coverage tests#29
davidanthoff merged 1 commit into
mainfrom
pre-registration-polish

Conversation

@davidanthoff

Copy link
Copy Markdown
Member

Final polish before tagging/registering v1.0.0.

Date values for date-only cells

Cells whose number format has no time component now come back as Date instead of DateTime (matching XLSX.jl's behavior); time-only formats keep returning Time for values below one day, and everything else stays DateTime. Format classification distinguishes date, time and datetime formats for both builtin format ids and custom format strings (with correct handling of m as month vs minute and of AM/PM markers). This adopts the one part of the old draft PR #17 that the rewrite did not already cover.

Downstream is unaffected: ExcelReaders normalizes Date to DateTime in its own value vocabulary, and both the ExcelReaders test suite (including the xls/xlsx cross-backend parity test) and the ExcelFiles test suite pass unchanged against this branch.

Struct-layout tripwire (from PR #15)

A new test item asserts sizeof for every mirrored libxls struct on 64-bit platforms — the exact failure mode that makes c.jl fragile across libxls versions — and checks that the loaded C library is the 1.6.x series. This adopts the idea of the old CI-debug PR #15.

Documentation

The README now documents the full API: workbook and worksheet functions, the cell-value mapping table, the date-format rules and both date systems, the CellError code table, and a Limitations section. All public functions have docstrings, and NEWS.md has v1.0.0 release notes.

Coverage

Local line coverage after this PR is ~89% reported, with new tests for the C error reporting path (expect/xls_getError), corrupt-file opening (valid OLE2 header, unparseable content), serial rounding carry, format-sniffer edge cases, show methods, isopen, and closed-handle errors. The remaining uncovered lines are (a) function-definition-line artifacts of Julia's coverage counter, and (b) branches that cannot be exercised without authoring xls fixtures containing literal BOOLERR error cells or cached formula results, which requires Excel (plus defensive NULL-checks). Codecov note: the repository's last upload is from 2020 — the CODECOV_TOKEN secret may be missing or empty, worth checking.

After merging

Tag as v1.0.0 (drop -DEV) and register; then re-run CI on queryverse/ExcelReaders.jl#115. The two old draft PRs #15 and #17 are both superseded by this branch and can be closed.

🤖 Generated with Claude Code

…ests

- Cells with a date-only number format now come back as Date rather than
  DateTime (matching XLSX.jl); time-only formats keep returning Time for
  values below one day. Format classification distinguishes date, time and
  datetime formats for builtin ids and custom format strings.
- Add a C struct layout test item asserting the size of every mirrored
  libxls struct on 64-bit platforms, plus a check that the loaded C library
  is the 1.6.x series (idea from PR #15).
- Document the full API in the README (workbook/worksheet functions, cell
  value mapping, date systems, error codes, limitations) and add docstrings
  to all public functions; write v1.0.0 release notes.
- Add tests for the C error reporting path, corrupt-file handling, serial
  rounding carry and other previously uncovered branches.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@davidanthoff
davidanthoff merged commit de14101 into main Aug 29, 2026
17 checks passed
@davidanthoff
davidanthoff deleted the pre-registration-polish branch August 29, 2026 02:49
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.

1 participant