Skip to content

fix: correct getindex(vi, ::Colon) docstring (#854)#1382

Open
ArpanC6 wants to merge 1 commit intoTuringLang:mainfrom
ArpanC6:fix/getindex-docstring
Open

fix: correct getindex(vi, ::Colon) docstring (#854)#1382
ArpanC6 wants to merge 1 commit intoTuringLang:mainfrom
ArpanC6:fix/getindex-docstring

Conversation

@ArpanC6
Copy link
Copy Markdown
Contributor

@ArpanC6 ArpanC6 commented May 2, 2026

Closes #854

What was the problem?

The docstring for getindex(vi::AbstractVarInfo, ::Colon) incorrectly
stated that it returns values "in the support of its distribution(s)".
This is wrong - vi[:] actually returns the internally stored values,
which may be in transformed (linked) space if vi has been linked.

What did I fix?

Updated the docstring to correctly state that:

  • vi[:] returns internal values which may be transformed
  • For untransformed values use getindex_internal after calling invlink

@codecov
Copy link
Copy Markdown

codecov Bot commented May 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.35%. Comparing base (10a3651) to head (d3f7436).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1382   +/-   ##
=======================================
  Coverage   82.35%   82.35%           
=======================================
  Files          50       50           
  Lines        3531     3531           
=======================================
  Hits         2908     2908           
  Misses        623      623           

☔ View full report in Codecov by Sentry.
📢 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.

@ArpanC6
Copy link
Copy Markdown
Contributor Author

ArpanC6 commented May 2, 2026

Hlw @yebai I've been contributing to DynamicPPL.jl and really enjoying it. With @penelopeysm moving on could you point me to someone who could review PRs going forward? I'd love to keep contributing.

Note: This PR addresses the docstring fix as mentioned in the issue. The larger fix of changing the behaviour of vi[:] to return untransformed values is a separate more involved task that is left for a future PR.

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.

getindex(vi::AbstractVarInfo, ::Colon) docstring is wrong

1 participant