Review ask

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

Lifecycle: draftEditUnder review
What this benchmark means
README.md

Public 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 as RATIO: 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: RATIO plus 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 review
1 source file

input/source.csv

Edit
7 rows
input/source.csv
IDNUMDENADJ
R110.04.0—
R21.03.00.5
R37.02.00.25
R40.05.0—
R59.04.0-0.5
R6—4.0—
R710.0——

Expected output

Under review
7 expected rows

expected/test.csv

Edit
7 rows
expected/test.csv
IDRATIORATIO_DEFAULTRATIO_PCTRATIO_ADJ_MISSINGRATIO_MISSING
R12.52.52502.5—
R20.330.3333.30.8300000000000001—
R33.53.53503.75—
R40000—
R52.252.252251.75—
R6—————
R7—————
Shaded columns are derived— = missing value

Human review and assessment

Your review

2 questions and your comments · View benchmark discussions

Mapping spec

Generated from the benchmark YAML; do not edit by hand

Variable NameVariable LabelTypeLengthControlled Terms or FormatOriginCoreConversion DefinitionVariable TypeVariable OrderComments for Define
IDIdentifierCharCollectedCopy value from SOURCE.ID.SDTM1
RATIOAdjusted RatioNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 2, adjust = 0.0 and as_percent = False.SDTM2
RATIO_DEFAULTAdjusted Ratio With Default DecimalsNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, adjust = 0.0 and as_percent = False.SDTM3
RATIO_PCTAdjusted Ratio As PercentageNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 1, adjust = 0.0 and as_percent = True.SDTM4
RATIO_ADJ_MISSINGAdjusted Ratio With Missing AdjustmentNumDerivedCall project function project_ratio with numerator = SOURCE.NUM, denominator = SOURCE.DEN, decimals = 2, adjust = SOURCE.ADJ and as_percent = False.SDTM5
RATIO_MISSINGRatio With Missing NumeratorNumDerivedCall project function project_ratio with numerator = None, denominator = SOURCE.DEN, decimals = 2, adjust = 0.0 and as_percent = False.SDTM6
VersionDateAuthorDescriptionReviewerSign-off
1.72026-10-20yamaa docs buildRead 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.62026-10-17yamaa docs buildDescribe collected date parts written as ISO 8601 date text and times of day counted in seconds since midnight
1.52026-10-17yamaa docs buildName 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.42026-10-15yamaa docs buildState datetime precision codes through the hour and minute, and complete only the time parts a collected datetime lacks
1.32026-09-29yamaa docs buildShow study codelist names, external dictionaries, and ISO 8601 formats in variable rows; list the document's codelist values and metadata
1.22026-09-29yamaa docs buildClassify ADaM copies from a declared input as Predecessor and recodes as Derived, and SDTM recodes of locally derived columns as Derived
1.12026-09-29yamaa docs buildResolve lookups into the donor record they select, and give every derivation shape a plain-language rule instead of its raw YAML
1.0yamaa docs buildInitial generation from spec.yaml

yamaa code

Public calls generated from benchmark.yaml; results must match the expected output

R

Edit
3 lines
library(yamaa)yamaa_project("project.yaml")$spec("TEST")$run()$output

Python

Edit
3 lines
import yamaayamaa.project("project.yaml").spec("TEST").run().output