Skip to content

Improve documentations - #515

Merged
sunxd3 merged 3 commits into
mainfrom
sunxd/friendly-docs
Jul 7, 2026
Merged

sunxd3 merged 3 commits into
mainfrom
sunxd/friendly-docs

Conversation

@sunxd3

@sunxd3 sunxd3 commented Jul 6, 2026

Copy link
Copy Markdown
Member
  • add text from OpenBUGS for BUGS examples
  • add a more starter friendly doc

sunxd3 added 2 commits July 5, 2026 06:37
…guides

Restructure the documentation around audience tracks to serve newcomers
(applied statisticians, WinBUGS/JAGS users) rather than only ecosystem
insiders:

- Add getting_started.md: a minimal Rats tutorial (model -> sample ->
  summaries), verified end-to-end against the published posteriors.
- Add an Example Gallery: the classic Volume 1 examples as runnable,
  friendly pages, plus an overview index.
- Turn guides/differences.md into a WinBUGS/OpenBUGS/JAGS migration guide
  with a worked Seeds translation; add migration/from_turing.md.
- Restructure make.jl nav (Tutorials / Example Gallery / Coming from... /
  Modeling / Inference / Guides / API / Design & Internals); move design
  docs out of the beginner path.
- Add persona onramps to index.md and a pointer from example.md.
- Name each model definition after its model (rats = @bugs ...; rats(data))
  following the existing example.md convention, instead of 'model_def'.

Also let the callable BUGSModelDef accept initial values,
model_def(data, inits), mirroring compile(model_def, data, initial_params),
so the full construction workflow (including supplying starting values for
vague-prior models) is expressible without reaching for compile. Backward
compatible; frontend tests pass.
@codecov

codecov Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.79%. Comparing base (e1e3bd2) to head (782a8ee).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #515   +/-   ##
=======================================
  Coverage   87.79%   87.79%           
=======================================
  Files          34       34           
  Lines        3679     3679           
=======================================
  Hits         3230     3230           
  Misses        449      449           
Flag Coverage Δ
callbacks 28.01% <0.00%> (ø)
compilation_model 39.09% <0.00%> (ø)
compilation_source_gen 43.59% <0.00%> (ø)
distributed_sampling 33.15% <0.00%> (ø)
elementary 26.51% <0.00%> (ø)
frontend 36.87% <100.00%> (ø)
gibbs 32.24% <0.00%> (ø)
graphs 20.89% <0.00%> (ø)
inference_chains 33.83% <0.00%> (ø)
inference_flexichains 41.01% <0.00%> (ø)
inference_hmc 25.64% <0.00%> (ø)
inference_marginalization 29.82% <0.00%> (ø)
inference_mh 26.10% <0.00%> (ø)
inference_slice_sampling 24.96% <0.00%> (ø)
log_density 54.34% <0.00%> (ø)
model_operations 43.04% <0.00%> (ø)
parallel_sampling 21.98% <0.00%> (ø)
serialization 31.17% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

JuliaBUGS.jl documentation for PR #515 is available at:
https://TuringLang.github.io/JuliaBUGS.jl/previews/PR515/

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Benchmark Results

Julia 1.11.9 on AMD EPYC 7763 64-Core Processor (Linux)

Ratio = JuliaBUGS/Stan (lower is better for JuliaBUGS)

Model Stan Params JBUGS Params LD Ratio Grad Ratio
rats 65 65 0.37x 2.25x
pumps 12 12 0.66x 2.25x
bones 13 13 0.66x 4.94x
oxford 244 244 1.67x 4.89x
epil 303 303 0.48x 1.91x
lsat 1006 1006 0.66x 2.43x
schools 133 133 0.23x 1.56x
beetles 2 2 1.35x 4.53x
air 5 5 0.58x 1.51x

Note: Stan benchmarks use hand-optimized Stan models, not direct BUGS translations. Comparison is illustrative only.

@sunxd3
sunxd3 requested a review from shravanngoswamii July 6, 2026 09:46

@shravanngoswamii shravanngoswamii left a comment •

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me as is, great improvements - Thank you, I will improve further as part of #453 and #513

@sunxd3
sunxd3 merged commit 5fe3cb3 into main Jul 7, 2026
41 checks passed
@sunxd3
sunxd3 deleted the sunxd/friendly-docs branch July 7, 2026 07:59
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.

2 participants