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

Tables support for IndexedVarArray #30

Merged
merged 5 commits into from
Oct 24, 2022
Merged

Tables support for IndexedVarArray #30

merged 5 commits into from
Oct 24, 2022

Conversation

trulsf
Copy link
Member

@trulsf trulsf commented Oct 3, 2022

There will probably some alignment with JuMP if Tables support is added to JuMP (ref. jump-dev/JuMP.jl#3096)

@trulsf
Copy link
Member Author

trulsf commented Oct 19, 2022

The latest changes depend on the availability of Tables support in JuMP (see jump-dev/JuMP.jl#3104) and should await merging until the PR is merged.

@hellemo hellemo mentioned this pull request Oct 19, 2022
8 tasks
Copy link
Member

@hellemo hellemo left a comment

Choose a reason for hiding this comment

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

Looks good!

end
if length(v) > 0 && !has_values(first(v).model)
error("No solution values available for variable")
function _rows(x::Union{SparseArray,SparseVarArray,IndexedVarArray})
Copy link
Member

Choose a reason for hiding this comment

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

Could this be AbstractSparseArray? I guess we are about to delete SparseVarArray in another PR soon.

Copy link
Member Author

Choose a reason for hiding this comment

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

The implementation of _rows assumes a data property exists which is not available in general for AbstractSparseArray. Agree that SparseVarArray just can be removed here.

@hellemo
Copy link
Member

hellemo commented Oct 21, 2022

The latest changes depend on the availability of Tables support in JuMP (see jump-dev/JuMP.jl#3104) and should await merging until the PR is merged.

How about just adding rowtable without extending JuMP function while we wait to get all the other changes in and merged and have tests in place, and rework to extend JuMP methods after jump-dev/JuMP.jl#3104 is merged, would that work?

hellemo added a commit that referenced this pull request Oct 22, 2022
Remove tables awaiting #30
@codecov-commenter
Copy link

codecov-commenter commented Oct 23, 2022

Codecov Report

Base: 84.26% // Head: 83.95% // Decreases project coverage by -0.31% ⚠️

Coverage data is based on head (52efb69) compared to base (65473ed).
Patch coverage: 63.15% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
- Coverage   84.26%   83.95%   -0.32%     
==========================================
  Files           8        6       -2     
  Lines         445      405      -40     
==========================================
- Hits          375      340      -35     
+ Misses         70       65       -5     
Impacted Files Coverage Δ
src/tables.jl 63.15% <63.15%> (-19.87%) ⬇️
src/SparseVariables.jl
src/indexedarray.jl 91.15% <0.00%> (+0.07%) ⬆️
src/sparsearray.jl 54.16% <0.00%> (+2.08%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@trulsf
Copy link
Member Author

trulsf commented Oct 23, 2022

I have moved rowtable out of JuMP.Containers and fixed tests to run with latest JuMP release. Maybe include this as part of 0.7 release and move back and fix tests when new JuMP version is available?

@hellemo
Copy link
Member

hellemo commented Oct 24, 2022

I have moved rowtable out of JuMP.Containers and fixed tests to run with latest JuMP release. Maybe include this as part of 0.7 release and move back and fix tests when new JuMP version is available?

Thanks! Good idea, I originally planned to wait for the JuMP release, but I think as long as we don't export rowtables and make it clear that we don't support tables, we should be good. If we want to make it super clear we could rename it to_rowtables, but I don't think that's necessary.

@hellemo hellemo merged commit 1072681 into main Oct 24, 2022
hellemo added a commit that referenced this pull request Oct 24, 2022
* Removing SparseVarArray

* Remove kwargs for inservar!

* Delete most commented-out removals

* update JuliaFormatter for CI

* In progress: updating tests

* formatting fixes

* x86 fix

* Update tests
Remove tables awaiting #30

* Test starting from 1.7 for destructuring

* Test coverage

* formatting fixes

* Delete unused for coverage

* SparseArray coverage

* Formatting fixes

* x86 fixes (Int)

* Formatting fix

* Update readme and prep for v0.7

* Remove README entry on rowtables for now

* Prep release

Co-authored-by: Lars Hellemo <[email protected]>
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