Skip to content

feat(ddi): columns the model doesn't lift ride along (#160) - #164

Merged
jstet merged 1 commit into
mainfrom
feat/ddi-columns
Sep 27, 2026
Merged

jstet merged 1 commit into
mainfrom
feat/ddi-columns

Conversation

@jstet

@jstet jstet commented Sep 27, 2026

Copy link
Copy Markdown
Member

The last of the #160 losses, apart from unregistered types (calculate), which stay out by design.

Every column the model doesn't read into its own fields now lives in columns on an item or choice. Only the XLSForm parser fills it; the lifted columns are listed in convention:ddiFields liftedColumns. Examples: media per language, choice_filter, read_only, Kobo's $kuid. The codebook carries them as follows:

where note subject
a question's var / varGrp, a group's varGrp cdl:column the column, e.g. media::image::Deutsch (de)
the first question using the list cdl:choice_column <code> <column>
stdyDscr, for note rows and rows without data cdl:row_column <row> <column>

ddi2xlsform writes them back. LimeSurvey is unchanged.

Schematron: the "one note per type and language" rule on var / varGrp now counts per subject, so several cdl:column notes are allowed.

Left, per ddi2xlsform/README.md:

  • unregistered rows and empty groups
  • settings that are neither a string nor a number
  • columns of end_group rows
  • appearance case
  • whitespace in the type cell

Tests

  • New unit tests cover the note shapes and the way back.
  • The generated forms now add media (per language), read_only, choice_filter and a choices filter column. All 5 properties pass at 2000 runs locally.
  • vitest: 1469 passed
  • pytest validation + codegen: 150 passed, 4 xfailed
  • worker gradle test, npm run validate and the drift check pass

🤖 Generated with Claude Code

Every survey and choices column the model doesn't read into its own
fields (convention:ddiFields liftedColumns) is an item's or choice's
`columns` now, parsed from XLSForm only. The codebook carries them:

- cdl:column (subject: the column) on the var / varGrp of a question or
  group, e.g. media::image::Deutsch (de), choice_filter, read_only
- cdl:choice_column (subject: `<code> <column>`) on the first question
  that uses the list
- cdl:row_column (subject: `<row> <column>`) on stdyDscr for note rows
  and rows without data

ddi2xlsform writes them back. LimeSurvey is unchanged: its parser has no
such columns. The Schematron uniqueness rule counts per subject on var and
varGrp too. The generated forms add media (per language), read_only,
choice_filter and a choice filter column.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@jstet
jstet merged commit 0041dcc into main Sep 27, 2026
4 checks passed
@jstet
jstet deleted the feat/ddi-columns branch September 27, 2026 18:41
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