Skip to content

Execute 2D model construction Literate tutorial with plots#41

Merged
mmikhasenko merged 4 commits into
mainfrom
fix/2d-model-construction-literate-execute
May 25, 2026
Merged

Execute 2D model construction Literate tutorial with plots#41
mmikhasenko merged 4 commits into
mainfrom
fix/2d-model-construction-literate-execute

Conversation

@mmikhasenko

@mmikhasenko mmikhasenko commented May 25, 2026

Copy link
Copy Markdown
Collaborator

Related issues

There is no related issue.

Checklist

  • I am following the contributing guidelines

  • Tests are passing

  • Lint workflow is passing

  • Docs were updated and workflow is passing

Summary

  • Enable Literate execution (execute=true, documenter=true) so the 2D Model Construction tutorial renders cell outputs instead of empty code blocks.
  • Save the Makie figure to docs/src/assets/2d-model-construction-start.png and reference it with a relative markdown image, avoiding Documenter's HTML size threshold for inline base64 plots.
  • Fix ConstructorOfFit2DExtendedKKComponents call order to match @with_parameters declaration order (yields before nested constructors), which blocked execution after Preserve declaration order in @with_parameters constructor arguments #40.
  • Fix extended_negative_log_likelihood wrapper import so the method extension is valid under Julia 1.11.
  • Update docs/Manifest.toml to a DistributionsHEP revision that exports ExtendedMixtureModel.

Test plan

  • julia --project=docs docs/generate_literate.jl completes and writes outputs + plot asset
  • julia --project=docs docs/make.jl builds documentation successfully
  • CI Docs workflow passes on this PR

Enable Literate execution so the tutorial renders cell outputs and a saved
figure asset, fix constructor argument order after #40, import extended NLL
for method extension, and pin DistributionsHEP to a revision that exports
ExtendedMixtureModel.

Co-authored-by: Cursor <cursoragent@cursor.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request updates the documentation generation configuration to execute and document the 2D model construction tutorial. It updates the tutorial script to save and display the generated plot as an asset, reorders arguments in the ConstructorOfFit2DExtendedKKComponents call, and updates the Manifest.toml dependencies. Additionally, it imports extended_negative_log_likelihood instead of using it in the 2D distribution fit example. I have no feedback to provide as there are no review comments.

@mmikhasenko mmikhasenko marked this pull request as draft May 25, 2026 19:24
mmikhasenko and others added 2 commits May 25, 2026 21:48
Replace the manual figure save/asset workaround with a plain Plots layout
picked up by Literate, and relax Documenter's HTML size threshold so the
generated tutorial page can embed the plot output.

Co-authored-by: Cursor <cursoragent@cursor.com>
Use a side-by-side model heatmap and data histogram2d with themed 1D
projection panels, without overlaying scatter on the density map.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mmikhasenko mmikhasenko marked this pull request as ready for review May 25, 2026 19:53
Explain how two_dimensional_model.jl defines the 1D shapes, extended 2D
assembly, and NLL wrapper before the tutorial builds constructor instances.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mmikhasenko mmikhasenko merged commit 6fe3c5d into main May 25, 2026
1 check passed
@mmikhasenko mmikhasenko deleted the fix/2d-model-construction-literate-execute branch May 25, 2026 19:58
@mmikhasenko mmikhasenko restored the fix/2d-model-construction-literate-execute branch May 25, 2026 20:05
@mmikhasenko mmikhasenko deleted the fix/2d-model-construction-literate-execute branch May 25, 2026 22:00
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