Skip to content

Adopt the qwacback equivalence test #14

Description

@jstet

Step 5 of 6 for the survey2ddi retirement. Plan: HANDOVER.md in the survey2ddi repo. Independent of the CLI/adapter issues — can run in parallel. Blocks the survey2ddi archive (CorrelAid/survey2ddi#5): until this lands, survey2ddi holds the only copy of the qwacback comparison. The temporary Python↔TS parity script lives in CorrelAid/survey2ddi#3.

Coverage that must not die with survey2ddi's emitter

1. The qwacback equivalence test (permanent)

tests/integration/test_conversion_equivalence.py in CorrelAid/survey2ddi posts the same XLSForm through survey2ddi and qwacback and compares the DDI shape, for every answer type qwacback supports (qwacback/internal/examples/examples.go). It is marked integration (docker + the schematron-worker image, opt-in via -m integration).

qwacback is a listed consumer of this library (see the README's ecosystem table and HANDOVER_QWAC.md), so this comparison is worth more here than it ever was in survey2ddi. Port it to compare buildDdiXml against qwacback, reusing this repo's existing pytest validation setup (tests/validation/, which already runs XSD and Schematron checks) or the TS contract project — whichever fits the docker orchestration better. Note the shape normalization it needs: qwacback returns a bare <var> / <varGrp> when there is only one, so the test synthesizes a <dataDscr> container.

Acceptance criteria

  • qwacback equivalence test runs against buildDdiXml in this repo, same type coverage, still opt-in

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions