name: notebook-sync description: Check SI notebooks in notebooks/manuscripts/ for deprecated API usage, hardcoded paths, stale parameter names, and compatibility with the current TEXAS package. Use after refactors or before paper submission. allowed-tools: Read Glob Grep
Audit all finalized SI notebooks in notebooks/manuscripts/. Check each one against every rule below and report PASS / FAIL / WARN per notebook per category.
Target notebooks (read each):
SI_code1_PreProcessing_finalized.ipynbSI_code2_TEXAS_analysis.ipynbSI_code3_paleo_showcases.ipynb(if present)
1. Deprecated API usage
FAIL if any cell contains:
predict_T_from_RI(— deprecated alias; usepredict_T_from_proxyObs()predict_temperature_from_RI(— internal function, should not appear in SI notebooksscaledRI_crtp,scaledRI_cul,scaledRI_mesoas Stan data dict keys — old naming; current keys areproxyObs_crtp,proxyObs_cul,proxyObs_mesofrom TEXAS.stan.runner import—runner.pywas deletedfrom TEXAS.utils.cache_search import— removed from__all__from TEXAS.stan.auto import— deprecated modulefrom TEXAS.utils.hw import— deprecated module
WARN if any cell contains:
import TEXAS.stan.invTdirectly (power-user internal; consider usingpredict_T_from_proxyObsinstead)
2. Hardcoded paths
FAIL if any cell contains hardcoded absolute paths for CmdStan, e.g.:
/opt/cmdstan/cmdstan-2.36.0~/.cmdstan/cmdstan-2.36.0C:\Users\...- Any string matching
cmdstanthat is NOTfrom TEXAS.utils.paths import CMDSTAN_DIR
Correct pattern:
from TEXAS.utils.paths import CMDSTAN_DIR
WARN if any other absolute path appears that is not a relative data path or a Zenodo URL.
3. Parameter naming
FAIL if any cell references old coefficient names:
beta0_gdgt23ratio_crtporbeta0_gdgt23ratio_culmeso— renamed tobeta_G23_crtp/beta_G23_culmesobeta0_no3_crtp— renamed tobeta_NO3_crtp
FAIL if any cell references Q parameter:
Q_crtp,Q_culmeso— Q was removed from all models (2026-03-24); regenerate posteriors if these appear in posterior access code
4. Stan model names
WARN if any cell references a Stan model name that no longer exists as an active .stan file in src/TEXAS/stan_models/. Check against the list of files in that directory.
Active forward models (verify these exist):
gen_logi_fixed_culmeso, gen_logi_fixed_culmesocore, gen_logi_fixed_hier_crtp_multiv,
gen_logi_fixed_hier_crtp_multiv_priorApprox, gen_logi_fixed_hier_crtp_multiv_priorApprox_werr,
gen_logi_fixed_hier_crtp_multiv_priorApprox_werr_ver2, gen_logi_fixed_hier_crtp_multiv_odr,
gen_logi_fixed_hier_crtp_univ_priorApprox.
5. Posterior file references
WARN if any cell hardcodes a posterior filename that includes old parameter names (Q, beta0_) in the filename string.
6. Imports and package structure
Check that all imports resolve against the current package layout:
from TEXAS import build_fwd_data, get_posterior, save_posterior, load_posterior— validfrom TEXAS import predict_RI_from_T, predict_T_from_proxyObs— valid (added 2026-02-22)from TEXAS.stan.invT import predict_temperature_from_RI— valid (internal, still present)from TEXAS.ensemble.generator import generate_ensemble_auto— validfrom TEXAS.utils.paths import CMDSTAN_DIR, POSTERIOR_CACHE_DIR— valid
7. Proplot guard (SI_code2 only)
In SI_code2_TEXAS_analysis.ipynb, confirm that proplot import is wrapped in a try/except:
try:
import proplot as pplt
except ImportError:
pplt = None
FAIL if import proplot appears without a guard.
Output format
For each notebook, print a table:
| Category | Status | Details |
|---|---|---|
| Deprecated API | PASS / FAIL | list of cells with issues |
| Hardcoded paths | PASS / WARN | list of occurrences |
| Parameter naming | PASS / FAIL | list of old names found |
| Stan model names | PASS / WARN | list of unresolved names |
| Imports | PASS / FAIL | list of broken imports |
| Proplot guard | PASS / FAIL / N/A |
Finish with a one-line verdict per notebook: Ready / Needs fixes / Not found.