Replace include= source dumps with MFIIDD.source_for#43
Conversation
Sessions previously inlined files via {.julia include="../src/X.jl"},
which hardcodes a path relative to the qmd. source_for reads the file
from the live pkgdir(MFIIDD) instead, and also accepts a function to
print just its methods via CodeTracking.
Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: sbfnk <sebastian.funk@lshtm.ac.uk>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/MFIIDD.jl`:
- Around line 51-57: In source_for(f::Function), the result from
CodeTracking.definition(String, m) is already a String, so pushing first(d)
incorrectly stores only the first character and breaks the chunks vector. Update
the loop over methods(f) to push d directly into chunks after the nothing check,
keeping the return type consistent with Vector{String}.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1728b611-b9ca-46e8-b440-eef68ea019d9
📒 Files selected for processing (7)
Manifest.tomlProject.tomlsessions/mcmc.qmdsessions/mcmc_diagnostics.qmdsessions/particle_filters.qmdsessions/pmcmc.qmdsrc/MFIIDD.jl
Addresses seabbs's review on #39 (
sessions/pmcmc.qmd:99thread): "use codetracking rather than include".Summary
CodeTrackingas a direct dep (it was already transitive).MFIIDD.source_for(file)— readspkgdir(MFIIDD)/src/<file>so the displayed code tracks the live package rather than a path relative to the qmd.MFIIDD.source_for(f::Function)— returns the source of every method offviaCodeTracking.definition. Useful for students who want to inspect one function afterusing MFIIDD.{.julia include="../src/X.jl"}block inpmcmc.qmd,particle_filters.qmd,mcmc.qmd,mcmc_diagnostics.qmdfor a{julia}chunk that prints a markdown code fence aroundsource_for("X.jl").The Documenter half of seabbs's suggestion is split into a follow-up PR.
Summary by CodeRabbit
New Features
Bug Fixes