Skip to content

Conversation

@lm3388
Copy link
Collaborator

@lm3388 lm3388 commented Dec 9, 2025

Modified existing data/adexsum.R to append EXDURGR data with PARAMCD = "TRTDURD" and re-generated the metalite_ae_adexsum.rda that can be used by another package such as "exposure-duration-histogram.Rmd" in metalite.sl

@lm3388 lm3388 requested a review from wangben718 December 10, 2025 14:17
Wang and others added 7 commits December 15, 2025 20:05
The metadata now includes 2 additional analysis parameter types
(dtc0rel and updated parameter list), increasing the plan count
from 18 to 20. Updated the snapshot to match the new expected output.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The snapshot was missing the subset definition for dtc0rel parameter
(AESDTH == 'Y' & AEREL == 'Y') and had incorrect whitespace. Updated
to match current code output.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Updated RTF snapshot files to match current system charset encoding.
These files contain platform-specific font charset values that differ
between local and CI environments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
Changed from binary RTF file snapshots to text-based snapshots with
normalized font charset values. This resolves CI failures caused by
platform-specific font charset differences (fcharset0/1/2/161).

Changes:
- Added normalize_rtf_charset() helper to convert all fcharset values to 0
- Added expect_snapshot_rtf() wrapper for RTF snapshot testing
- Converted binary RTF snapshots to text-based .md snapshots
- Updated tests to use new snapshot method

This ensures consistent test results across macOS, Windows, and Linux CI environments.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
The previous approach using text-based markdown snapshots didn't work
correctly with testthat. Reverted to binary RTF file snapshots but with
charset normalization applied first.

Changes:
- Updated expect_snapshot_rtf() to write normalized content to temp file
  and use expect_snapshot_file() with the temp file
- Removed markdown-based snapshots
- Regenerated binary RTF snapshots with normalized charset (fcharset0)

This approach combines the benefits of binary file snapshots (proper test
structure) with charset normalization (cross-platform compatibility).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
- Modified expect_snapshot_rtf() to normalize RTF files in place
- This ensures charset values are normalized to fcharset0 before testthat comparison
- All platforms (macOS, Windows, Linux) will now generate matching snapshots
- Resolves CI snapshot mismatch issues

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
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