Skip to content

Release v1.6.1: check script finishes on invalid UTF-8 - #89

Merged
larnsce merged 4 commits into
mainfrom
dev
Oct 1, 2026
Merged

larnsce merged 4 commits into
mainfrom
dev

Conversation

@larnsce

@larnsce larnsce commented Oct 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Patch release for the check script, no checklist change. A dataset, dictionary or text file with invalid UTF-8 bytes no longer stops pkgreview-check.R before the report is written. The invalid values are counted from the data as loaded and the scans read a copy with those bytes replaced.
  • New advisory line per dataset, "No invalid UTF-8 strings in text data", with the affected columns and row counts. It maps to the existing data item on UTF-8 encoding.
  • New case fixtures/cases/invalid-utf8/. The expected report for pkgreviewtest gains one PASS line, and the 19 FAIL plus 1 FLAG mapping to D1 to D17 is unchanged.
  • VERSION 1.6.1. Release afterwards with bash scripts/release.sh 1.6.1 from main.

Closes #86

Test plan

  • bash scripts/lint.sh is clean
  • bash fixtures/run_gate.sh matches both expected reports
  • bash fixtures/run_cases.sh passes all nine cases, including invalid-utf8
  • The gate, washr-drift and lint jobs are green on this PR
  • bash scripts/news_section.sh 1.6.1 prints the 1.6.1 section

larnsce and others added 4 commits September 6, 2026 14:48
…osal template; deviation comments rule

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019LJvVaoT3vhaJj7k9LBzEn
A dataset or dictionary with bytes that are not valid UTF-8 and carry
no latin1 declaration stopped the check script before the report was
written (trimws, tolower, nchar and gsub raise "input string N is
invalid"). Three packages of the September sweep hit this: gdho,
wsabrazil and washinvestments.

The script now counts such values per character column from the data
as loaded, then replaces each invalid byte with "?" in the copy the
scans read. A new advisory line per dataset names the columns and the
rows affected. The existing UTF-8 line keeps naming every non-UTF-8
column. Text files and the header of a historical data file go through
the same replacement, so a line with an invalid byte is matched
instead of skipped with a warning.

The case invalid-utf8 plants the bytes through an R script, so no file
with invalid bytes is tracked. The pkgreviewtest report gains one PASS
line. The 19 FAIL and 1 FLAG mapping to D1 to D17 is unchanged.

Assisted-by: Claude claude-fable-5-1
Patch release for the check script fix of #86. No checklist item
changed, so there is no reconciliation section.

Assisted-by: Claude claude-fable-5-1
@larnsce
larnsce merged commit 90d65e4 into main Oct 1, 2026
5 checks passed
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.

Check script crashes on data with invalid UTF-8 strings

1 participant