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

Redundant dimension wastes space and allows disagreement #178

Merged
merged 8 commits into from
Oct 4, 2023

Conversation

chriselrod
Copy link
Contributor

@chriselrod chriselrod commented Sep 20, 2023

Tests also fail on Julia 1.9 on the master branch.
I fixed one of the failures, but the BandedMatrices failure is obviously unrelated so I figured someone else could handle it in a separate PR.

This PR should be non-breaking. I left the old constructors, and added getproperty and propertynames methods so that the old behaviors are preserved.

Thus, I think bumping the patch version to 0.11.18 should be fine, but I could make it 0.12.0 instead.

@codecov-commenter
Copy link

codecov-commenter commented Sep 20, 2023

Codecov Report

Patch coverage is 86.36% of modified lines.

Files Changed Coverage
src/pdiagmat.jl 80.00%
src/pdsparsemat.jl 87.50%
src/pdmat.jl 88.88%

📢 Thoughts on this report? Let us know!.

src/pdiagmat.jl Outdated Show resolved Hide resolved
src/pdiagmat.jl Outdated Show resolved Hide resolved
src/pdmat.jl Outdated Show resolved Hide resolved
src/pdmat.jl Outdated Show resolved Hide resolved
src/pdiagmat.jl Show resolved Hide resolved
src/pdmat.jl Outdated Show resolved Hide resolved
src/pdsparsemat.jl Outdated Show resolved Hide resolved
src/pdsparsemat.jl Outdated Show resolved Hide resolved
src/pdsparsemat.jl Outdated Show resolved Hide resolved
src/scalmat.jl Outdated Show resolved Hide resolved
@devmotion
Copy link
Member

devmotion commented Sep 20, 2023

Tests also fail on Julia 1.9 on the master branch.

Interesting, tests passed in #175 end of July, apart from a bug in ArrayLayouts that I fixed upstream. Seems I had also fixed the BandedMatrices tests in that PR.

Edit: Seems tests in that PR still pass on all Julia versions apart from the nightlies.

@chriselrod
Copy link
Contributor Author

Good to merge?

@devmotion
Copy link
Member

Looks good but I would like the test errors and inconsistencies on the master branch to be fixed first since tests on Julia 1.9 (and the nightlies) in this PR are aborted due to these problems. I opened #180.

@devmotion
Copy link
Member

Looks good, and tests pass as well with the recent changes on the master branch 🙂 Speaking about tests, I guess the only thing we should check before merging the PR: Are there existing tests of the getproperty implementations and internal constructors? And do we use the deprecated constructors anywhere in our codebase (maybe in convert)?

@chriselrod
Copy link
Contributor Author

Re pre-existing getproperty tests, only for .diag:

> rg "\.d"
pdmtypes.jl
52:        @test convert(PDiagMat{Float64}, PDiagMat(m)).diag == PDiagMat(convert(Array{Float64}, m)).diag
53:        @test convert(AbstractArray{Float64}, PDiagMat(m)).diag == PDiagMat(convert(Array{Float64}, m)).diag
84:        @test d.diag === v

While Base.size's implementation uses getproperty(a, :dim), so that branch should be taken here.

Re deprecated constructors: tests still pass if we delete them, so they aren't used anywhere that is tested.

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

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

Thank you @chriselrod! I added a missing deprecation and tests (of the deprecations, properties, and dimension checks).

@devmotion devmotion merged commit 57cdd4d into JuliaStats:master Oct 4, 2023
11 checks passed
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