Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix doctest #1199

Closed
wants to merge 2 commits into from
Closed

Fix doctest #1199

wants to merge 2 commits into from

Conversation

ViralBShah
Copy link
Member

Copy link

codecov bot commented Feb 11, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 91.87%. Comparing base (ed35a37) to head (9d0a260).
Report is 23 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1199   +/-   ##
=======================================
  Coverage   91.87%   91.87%           
=======================================
  Files          34       34           
  Lines       15366    15366           
=======================================
  Hits        14118    14118           
  Misses       1248     1248           

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

@@ -65,7 +65,7 @@ julia> C.U
⋅ ⋅ 3.0

julia> C.L
3×3 LowerTriangular{Float64, Adjoint{Matrix{Float64}}}:
3×3 LowerTriangular{Float64, {Matrix{Float64}}:
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't look right, or? Maybe

Suggested change
3×3 LowerTriangular{Float64, {Matrix{Float64}}:
3×3 LowerTriangular{Float64, Matrix{Float64}}:

Copy link
Member

Choose a reason for hiding this comment

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

There must be a mismatch between used code and tests in the failing doctest. This has been changed deliberately lately IIRC.

Copy link
Member

Choose a reason for hiding this comment

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

My guess is that the docs don't run with the custom sysimage and are in fact testing the bundled LinearAlgebra. Could that be correct?

@ViralBShah
Copy link
Member Author

ViralBShah commented Feb 11, 2025

Can someone look at https://buildkite.com/julialang/julia-master/builds/44616#0194f191-ee57-4a81-ab55-0192700d1df9/823-1641?

I don't see why Adjoint is in the output for LowerTriangular in the CI, both before and after:

2025-02-10 16:13:20 EST | │   diff =
-- | --
  | 2025-02-10 16:13:20 EST | │    3×3 LowerTriangular{Float64, Adjoint{Matrix{Float64}}}:
  | 2025-02-10 16:13:20 EST | │      Adjoint{Float64, Matrix{Float64}}}:
  | 2025-02-10 16:13:20 EST | │      2.0   ⋅    ⋅
  | 2025-02-10 16:13:20 EST | │      6.0  1.0   ⋅
  | 2025-02-10 16:13:20 EST | │     -8.0  5.0  3.0

None of this got caught in the CI in this repo - and at least in my local build on master it seems to do what I expect, which is what the PR does (modulo manual editing and messing up - and wondering why CI passed):

@dkarrasch
Copy link
Member

#1186

@ViralBShah
Copy link
Member Author

I still don't understand how these tests pass here but not on julia master.

@ViralBShah
Copy link
Member Author

Ok - the issue in this repo seems to be that the CI/docs workflow only generates the docs but does not run the doctests.

@dkarrasch
Copy link
Member

I quickly ran the doctest in my REPL manually, and it does show the Adjoint, so this PR is certainly going in the wrong direction. Should we close it and open another one on fixing the whole sysimg-stdlib-doctest-whatnot issue?

@ViralBShah ViralBShah marked this pull request as draft February 19, 2025 19:38
@ViralBShah
Copy link
Member Author

This PR is certainly incorrect. We should do the whole fix the sysimg doctest thing. But there is a separate point about whether the Adjoint is a good idea.

I suppose fix the sysimg thing and this doctest so that we can bump LinearAlgebra on julia master once again. Afterwards, if we can decide if we want to revert #1186.

@dkarrasch
Copy link
Member

I'm closing this. @KristofferC spotted the typo in the doctest (which was truly failing) and fixed it.

@dkarrasch dkarrasch closed this Feb 28, 2025
@ViralBShah ViralBShah deleted the vs/cholesky-doctest branch February 28, 2025 13:07
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.

3 participants