Skip to content

Jenner compatibility tests for 7 scripts#1

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

Jenner compatibility tests for 7 scripts#1
lwsinclair wants to merge 1 commit into
Lefteris-Souflas: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. I cloned this repository, ran seven of the scripts through Jenner without rewriting any of the SAS, and committed the results as a separate jenner-check/ directory so you can re-run them whenever you want a second opinion on the analysis.

This PR adds:

jenner-check/
├── README.md           Quick orientation
├── run_jenner.sh       Mac/Linux wrapper (bash + curl)
├── run_jenner.bat      Windows equivalent
├── run_jenner.sas      Pure-SAS version (PROC HTTP, no curl needed)
├── t001_data_import_csv/         Customers import + Age + Age_Range + PROC FREQ
├── t002_merge_sort_invoices/     Basket/Invoice merge + PROC SQL count
├── t003_customer_format_sql/     Custom $age_group format + stores_visits SQL
├── t004_sales_returns_split/     Single DATA step splitting Invoice by Operation
├── t005_proc_means_basket_value/ Invoice_Total_Value via PROC MEANS (CLASS/VAR/OUT)
├── t006_supplier_freq_weight/    Supplier_id from SKU + PROC FREQ WEIGHT Quantity
└── t007_rfm_proc_sql/            RFM recency/frequency/monetary table

Each tNNN_*/ directory carries the script that ran, a tiny CSV sample carved out of the matching file in Data/, the captured log and listing from a passing run, and a meta.json recording exactly what was adapted from Code/*.sas. The adaptations are limited to the FILENAME / LIBNAME plumbing (/home/u62678062/sasuser.v94/SAS_Project/... becomes a relative input/Customers.csv) — the analytic logic, PROC options, and output semantics match the source files.

How to re-run

cd jenner-check
./run_jenner.sh --all            # run all seven, summary at end
./run_jenner.sh t005_proc_means_basket_value  # run one

There is also run_jenner.sas if you'd rather run from inside SAS Studio (PROC HTTP, no curl needed), and you can paste any of the scripts straight into the hosted workspace at jenneranalytics.com.

What I noticed reading your code

You took the time to build a real custom character format ($age_group) so the age-range groups sort in the order that makes sense for the analysis rather than alphabetically — that kind of detail makes the downstream reports much easier to read, and it shows up consistently across the three views in 2_Customer_Profiling.sas. The Invoice_Total_Value pipeline in 1_Data_Pre-Processing.sas is also nicely structured: sort, merge, compute the discounted line value in one expression, then collapse to per-invoice totals with a single PROC MEANS — that's how it should be done. And tying the whole project together with the RFM table in script 6 leading into the cluster-conditioned market-basket analysis in script 8 is a clean arc for a milestone.

What to do with this PR

Merging is welcome but not expected. Closing it without comment is just as fine — the bundles live in the fork either way and there's no follow-up on my side. No response needed.

If you'd rather not see anything like this again, put no-more-prs in any comment on this PR, or open an issue titled jenner-check: opt out, and that's it.

Each tNNN_* directory under jenner-check/ submits a SAS program to the
public Jenner API and verifies the response matches a captured snapshot.

Bundles:
  t001_data_import_csv         PROC IMPORT + DATA step age categorization
  t002_merge_sort_invoices     PROC SORT + DATA MERGE + PROC SQL counts
  t003_customer_format_sql     PROC FORMAT + INPUT/PUT + PROC SQL aggregation
  t004_sales_returns_split     DATA step with two named OUTPUT destinations
  t005_proc_means_basket_value PROC MEANS CLASS/VAR/OUTPUT with discount math
  t006_supplier_freq_weight    SUBSTR + two-stage merge + PROC FREQ WEIGHT
  t007_rfm_proc_sql            INNER JOIN + COUNT/SUM + INTCK recency

Each bundle pairs ~30-200 rows of sample data (carved from this repo's
Data/ files) with a script lightly adapted from the corresponding file
under Code/. Adaptations are limited to replacing the SAS Viya
/home/u62678062/sasuser.v94 FILENAME paths with relative paths to
files in the bundle's input/ subdirectory; logic, PROC options, and
output semantics match the upstream.

The runner (run_jenner.sh / run_jenner.bat / run_jenner.sas) concatenates
autoexec.sas + script.sas, uploads any input/ files, POSTs to
https://api.jenneranalytics.com/v1/run, and prints the result.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.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