Skip to content

Patch for batching of zero padded ids pulls #521 - #522

Merged
spgarbet merged 5 commits into
mainfrom
zero-padded-521
Oct 15, 2026
Merged

spgarbet merged 5 commits into
mainfrom
zero-padded-521

Conversation

@spgarbet

Copy link
Copy Markdown
Member

No description provided.

@spgarbet

Copy link
Copy Markdown
Member Author

Add R-CMD-check automations they said. It'll be easier they said. Now it croaks on LaTeX install.

@spgarbet

Copy link
Copy Markdown
Member Author

Main tests pass.

── Skipped tests (14) ──────────────────────────────────────────
• empty test (1):
• No Data Quality Project provided. Tests Skipped (1):
  test-904-exportDataQuality.R:4:3
• No value provided for EXPORT_REPORTS_ID. Tests Skipped (3):
  test-240-exportTypedReports-Functionality.R:6:5,
  test-240-exportTypedReports-Functionality.R:52:5,
  test-240-exportTypedReports-Functionality.R:70:5
• Tests to be developed for 3.0.0 release (9):
  test-151-exportRecords-ArgumentValidation.R:4:5,
  test-151-exportRecords-Functionality.R:4:5,
  test-152-exportRecordsWithDags.R:4:5,
  test-153-exportRecordsWithEvents.R:4:5,
  test-155-exportRecordsWithRepeatingInstruments.R:4:5,
  test-180-exportRecordsOffline-ArgumentValidation.R:4:5,
  test-180-exportRecordsOffline-Functionality.R:4:5,
  test-190-exportReports-ArgumentValidation.R:4:5,
  test-190-exportReports-Functionality.R:4:5

[ FAIL 0 | WARN 0 | SKIP 14 | PASS 2073 ]

@spgarbet

Copy link
Copy Markdown
Member Author

══ Results ════════════════════════════════════════════════════════════════════════
Duration: 733.1 s

── Skipped tests (14) ─────────────────────────────────────────────────────────────
• empty test (1):
• No Data Quality Project provided. Tests Skipped (1):
test-904-exportDataQuality.R:4:3
• No value provided for EXPORT_REPORTS_ID. Tests Skipped (3):
test-240-exportTypedReports-Functionality.R:6:5,
test-240-exportTypedReports-Functionality.R:52:5,
test-240-exportTypedReports-Functionality.R:70:5
• Tests to be developed for 3.0.0 release (9):
test-151-exportRecords-ArgumentValidation.R:4:5,
test-151-exportRecords-Functionality.R:4:5,
test-152-exportRecordsWithDags.R:4:5, test-153-exportRecordsWithEvents.R:4:5,
test-155-exportRecordsWithRepeatingInstruments.R:4:5,
test-180-exportRecordsOffline-ArgumentValidation.R:4:5,
test-180-exportRecordsOffline-Functionality.R:4:5,
test-190-exportReports-ArgumentValidation.R:4:5,
test-190-exportReports-Functionality.R:4:5

[ FAIL 0 | WARN 0 | SKIP 14 | PASS 2073 ]

@spgarbet

spgarbet commented Oct 15, 2026 •

Copy link
Copy Markdown
Member Author

I wrote a test that fails on the main branch (not this pull request).

══ Results ════════════════════════════════════════════════════════════════════════
Duration: 13.9 s

── Failed tests ───────────────────────────────────────────────────────────────────
Failure (test-259-zeroPaddedId.R:47:3): cast preserves zeropadded id
Expected `ImportData$zero_padded_id` to equal `castImport$zero_padded_id`.
Differences:
20/20 mismatches
x[1]: "000001"
y[1]: "1"

x[2]: "000002"
y[2]: "2"

x[3]: "000003"
y[3]: "3"

x[4]: "000004"
y[4]: "4"

x[5]: "000005"
y[5]: "5"

Error (test-259-zeroPaddedId.R:53:3): zeropadded id makes a round trip
Error in `eval(code, test_env)`: object 'castImport' not found
Backtrace:
    ▆
 1. └─testthat::expect_equal(ImportData$zero_padded_id, castImport$zero_padded_id) at test-259-zeroPaddedId.R:53:3
 2.   └─testthat::quasi_label(enquo(expected), expected.label)
 3.     └─rlang::eval_bare(expr, quo_get_env(quo))

[ FAIL 2 | WARN 0 | SKIP 0 | PASS 0 ]

Test complete

@spgarbet

Copy link
Copy Markdown
Member Author

On this branch it does the following:

ℹ Testing redcapAPI
A future release of redcapAPI 3.0.0 will introduce several breaking changes 
* The `exportRecords` function interface is deprecated. Please switch your processes to `exportRecordsTyped`
* The `exportReports` function interface is deprecated. Please switch your processes to `exportReportsTyped`
* The `importRecords` function interface will be changed to utilize `castForImport` to prepare data for import.

✔ | F W  S  OK | Context
✔ |          2 | 259-zeroPaddedId [19.3s]                                          

══ Results ════════════════════════════════════════════════════════════════════════
Duration: 19.3 s

[ FAIL 0 | WARN 0 | SKIP 0 | PASS 2 ]

Test complete

@couthcommander couthcommander left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

needs a more long term solution - this keeps record_id as text without validation

@spgarbet
spgarbet merged commit cc0382b into main Oct 15, 2026
7 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.

3 participants