Skip to content

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

Closed
ArpanC6 wants to merge 1 commit into
TuringLang:mainfrom
ArpanC6:fix/getindex-docstring
Closed

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

Conversation

@ArpanC6

@ArpanC6 ArpanC6 commented May 2, 2026

Copy link
Copy Markdown

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

codecov Bot commented May 2, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.56%. Comparing base (8f52e83) to head (164ae02).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1382   +/-   ##
=======================================
  Coverage   78.56%   78.56%           
=======================================
  Files          50       50           
  Lines        3522     3522           
=======================================
  Hits         2767     2767           
  Misses        755      755           

☔ 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

ArpanC6 commented May 2, 2026

Copy link
Copy Markdown
Author

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.

@ArpanC6

ArpanC6 commented May 9, 2026

Copy link
Copy Markdown
Author

The Group2 test failures were already present on main (see CI run #4478 on commit e2d4b5d) and are not caused by this change.

@yebai
yebai requested a review from shravanngoswamii June 5, 2026 07:21
@yebai yebai closed this Jun 22, 2026
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

2 participants