As a clinical trial statistician or programmer, answer two short questions in Your review: the task and the inputs and outputs. Agreeing with both approves this benchmark; disagreeing with either needs a comment. Propose a fix with the Edit button on any source file, or add it to your comments.
We suggest spending no more than 5 minutes on a review. The other tabs beside Your review are background for assessment, not under review.
Summary
README.mdPublic entries: Python and R. Passing coverage requires an installed inventory.
Goal: derive an adjusted ratio (RATIO) and its variants by calling
the project's own ratio routine, showing how the call fills in
defaults, handles missing values, and switches the result to a
percentage.
Input: spec.yaml reads a small test file (input/source.csv)
carrying a numerator (NUM), a denominator (DEN), and an optional
adjustment (ADJ), and calls the ratio routine that the function file
functions/project_ratio.yaml declares; the expected result is
expected/test.csv.
Variables:
ID: the test record identifier, carried through unchanged.RATIO: the numerator divided by the denominator, rounded to two places; empty when the numerator or the denominator is blank.RATIO_DEFAULT: the same value asRATIO: leaving the rounding places out of the call uses the project's own default of two.RATIO_PCT: the same ratio as a percentage, rounded to one place.RATIO_ADJ_MISSING:RATIOplus the adjustment; a blank adjustment counts as zero.RATIO_MISSING: empty on every record: the call passes no numerator at all, so the routine is never invoked.
Note: a blank value the routine does not accept skips the call entirely, so that record has no result; a blank value it accepts arrives as missing and counts as zero.
Inputs
Under review1 source fileinput/source.csv
Edit7 rows| ID | NUM | DEN | ADJ |
|---|---|---|---|
| R1 | 10.0 | 4.0 | — |
| R2 | 1.0 | 3.0 | 0.5 |
| R3 | 7.0 | 2.0 | 0.25 |
| R4 | 0.0 | 5.0 | — |
| R5 | 9.0 | 4.0 | -0.5 |
| R6 | — | 4.0 | — |
| R7 | 10.0 | — | — |
Expected output
Under review7 expected rowsexpected/test.csv
Edit7 rows| ID | RATIO | RATIO_DEFAULT | RATIO_PCT | RATIO_ADJ_MISSING | RATIO_MISSING |
|---|---|---|---|---|---|
| R1 | 2.5 | 2.5 | 250 | 2.5 | — |
| R2 | 0.33 | 0.33 | 33.3 | 0.8300000000000001 | — |
| R3 | 3.5 | 3.5 | 350 | 3.75 | — |
| R4 | 0 | 0 | 0 | 0 | — |
| R5 | 2.25 | 2.25 | 225 | 1.75 | — |
| R6 | — | — | — | — | — |
| R7 | — | — | — | — | — |
Human review and assessment
| Variable Name | Variable Label | Type | Length | Controlled Terms or Format | Origin | Core | Conversion Definition | Variable Type | Variable Order | Comments for Define |
|---|---|---|---|---|---|---|---|---|---|---|
| ID | Identifier | Char | Collected | Copy value from SOURCE.ID. | SDTM | 1 | ||||
| RATIO | Adjusted Ratio | Num | Derived | Call project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 2, adjust = 0.0 and as_percent = False. | SDTM | 2 | ||||
| RATIO_DEFAULT | Adjusted Ratio With Default Decimals | Num | Derived | Call project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, adjust = 0.0 and as_percent = False. | SDTM | 3 | ||||
| RATIO_PCT | Adjusted Ratio As Percentage | Num | Derived | Call project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 1, adjust = 0.0 and as_percent = True. | SDTM | 4 | ||||
| RATIO_ADJ_MISSING | Adjusted Ratio With Missing Adjustment | Num | Derived | Call project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 2, adjust = SOURCE.ADJ and as_percent = False. | SDTM | 5 | ||||
| RATIO_MISSING | Ratio With Missing Numerator | Num | Derived | Call project function project_ratio with numerator = None, denominator = SOURCE.DEN, decimals = 2, adjust = 0.0 and as_percent = False. | SDTM | 6 |
| Version | Date | Author | Description | Reviewer | Sign-off |
|---|---|---|---|---|---|
| 1.7 | 2026-10-20 | yamaa docs build | Read a specification in the 1.0 surface as its 0.5 counterpart; state that missing values stay missing where a mapping declares no missing handler, and leave out a declared missing answer that restates a handler's default | ||
| 1.6 | 2026-10-17 | yamaa docs build | Describe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight | ||
| 1.5 | 2026-10-17 | yamaa docs build | Name collected precision in words instead of letter codes; state imputation fallbacks, minimum source precision, bounds ignored outside the collected period, and invalid text with no handler as an error; describe date and datetime shifts, imputation flag codes, and partial text giving no date part | ||
| 1.4 | 2026-10-15 | yamaa docs build | State datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks | ||
| 1.3 | 2026-09-29 | yamaa docs build | Show study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata | ||
| 1.2 | 2026-09-29 | yamaa docs build | Classify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived | ||
| 1.1 | 2026-09-29 | yamaa docs build | Resolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML | ||
| 1.0 | yamaa docs build | Initial generation from spec.yaml |
yamaa