Skip to content

Jenner compatibility tests for 7 example data-prep scripts - #2

Open
lwsinclair wants to merge 1 commit into
Superman-jp:mainfrom
lwsinclair:jenner-check/initial-bundles
Open

Jenner compatibility tests for 7 example data-prep scripts#2
lwsinclair wants to merge 1 commit into
Superman-jp:mainfrom
lwsinclair:jenner-check/initial-bundles

Conversation

@lwsinclair

Copy link
Copy Markdown

Your SAS code also runs unmodified in the Jenner Analytics system. Jenner is a complete SAS-compatible system and collaborative workspace at jenneranalytics.com, and the data-preparation half of every script under example/ lifts cleanly into it — exactly as you wrote it, including your formats, datalines, and reshape patterns.

This PR adds seven small test bundles under jenner-check/, one per example script, each carrying the data-prep portion of the example plus a couple of inspection PROCs that exercise the resulting dataset:

jenner-check/
├── t001_ridgeline_temp_reshape/       # Tokyo / Naha daily max temp + region pivot
├── t002_sankey_drug_flow/             # drug-at-visit wide layout
├── t003_multihist_grid_merge/         # region × eye × hair counts + dummy-grid merge
├── t004_raincloudpaired_simulation/   # seeded lognormal crossover
├── t005_mirrorhist_covid19_age/       # COVID Tokyo age × sex with select/when
├── t006_drugswitch_freq_crosstab/     # drug-switch with lost-to-follow + crosstab
├── t007_raincloudtest2_retain_normal/ # seeded normal FAS × type × trt
└── run_jenner.{sh,bat,sas}            # runners

Each bundle has a script.sas, an autoexec.sas with options obs=100;, an expected.json pinning the stable log lines from a passing run, and an expected/ snapshot of the captured log, listing output, and dataset URLs.

Running them. Three equivalent ways:

%let bundle = jenner-check/t001_ridgeline_temp_reshape;
%include "jenner-check/run_jenner.sas";
cd jenner-check && ./run_jenner.sh --all

Or paste any script.sas into the workspace at jenneranalytics.com — same engine.

On what I liked about the repo. Two things stood out. First, the consistency of the data prep across all seven examples — every macro is fed by a proc format value block + a data step that produces exactly the shape the plot needs, no surprise wrangling. That made the bundles trivially extractable. Second, the choice of plot styles is genuinely modern; raincloud + ridgeline + 2D-KDE + mirrored histogram + Sankey is a useful set for clinical and epidemiological work, and the focus parameter examples in sankey_example.sas are nice touches. The age-pyramid select(agec); when("<10") ... pattern in mirrored_histogram_example.sas is also a clean way to keep the visual order independent of the numeric coding.

Expectations: none. Merge, close, or ignore — whichever you prefer. The bundles live entirely under jenner-check/, don't touch anything else, and won't affect the SASPAC packaging.

To opt out of any future PRs like this, comment no-more-prs here or open an issue titled jenner-check: opt out and I'll skip the repo from then on.


日本語版

皆さんの SAS コードは、Jenner Analytics システムでも修正なしに実行できます。Jenner は SAS と完全互換のシステムと共同作業環境です — jenneranalytics.comexample/ 配下の各スクリプトのデータ準備部分は、そのままの形で動作します(フォーマット定義、datalines、reshape パターンを含む)。

この PR は jenner-check/ に 7 つの小さなテストバンドルを追加します。各バンドルは対応する例題スクリプトのデータ準備部分と、結果のデータセットを確認する PROC ステップを含んでいます。

各バンドルには以下が含まれます:

  • script.sas (実行可能スクリプト)
  • autoexec.sas (options obs=100;)
  • expected.json (安定したログ行のチェックポイント)
  • expected/ (キャプチャしたログ・出力・ファイル URL のスナップショット)
  • meta.json (元のスクリプトへのプロベナンス情報)

実行方法は ./run_jenner.sh --all または jenneranalytics.com のワークスペースに script.sas を貼り付けるだけです。

特に印象的だったのは、7 つの例題すべてで一貫したデータ準備パターン (proc format の value ブロック + data ステップ) が使われていることです。raincloud / ridgeline / 2D-KDE / mirrored histogram / Sankey という現代的なプロット選択も、臨床・疫学分野の実務に有用な構成だと思いました。

マージ・クローズ・無視のどれでも結構です。今後この種の PR を希望されない場合は、コメントで no-more-prs と書くか、jenner-check: opt out というタイトルの issue を立ててください。

The bundles cover the data-prep portion of each example/*.sas:

  t001_ridgeline_temp_reshape       Tokyo/Naha daily max temp + region pivot
  t002_sankey_drug_flow             drug-at-visit wide layout + freq tables
  t003_multihist_grid_merge         region x eye x hair counts + dummy-grid merge
  t004_raincloudpaired_simulation   seeded lognormal trt x repno crossover
  t005_mirrorhist_covid19_age       COVID Tokyo age x sex with select/when
  t006_drugswitch_freq_crosstab     drug-switch with lost-to-follow + Day0xDay90
  t007_raincloudtest2_retain_normal seeded normal FAS x type x trt design

Each bundle ships script.sas, autoexec.sas, expected.json, expected/
(captured log/output/files snapshot from a successful run), and
meta.json with provenance back to the upstream source file and blob SHA.

run_jenner.sh / .sas / .bat replay the bundles against the public
Jenner API at api.jenneranalytics.com.
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