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

Pass names (index_vars) to container extensions. #3088

Merged
merged 5 commits into from
Sep 30, 2022

Conversation

hellemo
Copy link
Contributor

@hellemo hellemo commented Sep 25, 2022

Our container in SparseVariables supports storing the names of the subindices (index_vars), but these are not currently passed to containers.

See sintefore/SparseVariables.jl#19

@codecov
Copy link

codecov bot commented Sep 25, 2022

Codecov Report

Base: 97.63% // Head: 97.64% // Increases project coverage by +0.01% 🎉

Coverage data is based on head (31e3a2a) compared to base (f3bfb74).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3088      +/-   ##
==========================================
+ Coverage   97.63%   97.64%   +0.01%     
==========================================
  Files          32       32              
  Lines        4305     4330      +25     
==========================================
+ Hits         4203     4228      +25     
  Misses        102      102              
Impacted Files Coverage Δ
src/Containers/container.jl 97.82% <100.00%> (+0.09%) ⬆️
src/Containers/macro.jl 100.00% <100.00%> (ø)
src/mutable_arithmetics.jl 88.34% <0.00%> (-0.23%) ⬇️
src/nlp.jl 100.00% <0.00%> (ø)
src/quad_expr.jl 100.00% <0.00%> (ø)
src/variables.jl 100.00% <0.00%> (ø)
src/Containers/DenseAxisArray.jl 95.19% <0.00%> (ø)
src/aff_expr.jl 97.18% <0.00%> (+0.05%) ⬆️

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.

src/Containers/container.jl Outdated Show resolved Hide resolved
@odow odow added Type: Enhancement Category: Containers Related to the Containers submodule labels Sep 25, 2022
Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

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

One thought I had: it might make sense to make names the last argument? Then we'd have a 4, 3, 2 argument methods, each dropping the last argument.

@hellemo
Copy link
Contributor Author

hellemo commented Sep 28, 2022

Yeah, I guess so. My reasoning was that names go naturally together with the indices they refer to, but there is a certain appeal to dropping (or adding) the last argument and keep the first arguments the same. No strong opinions from my side, can update if you prefer.

@odow
Copy link
Member

odow commented Sep 28, 2022

Yeah, I think please swap. Let's have consistency in the dropping argument order.

@odow odow merged commit 1af86eb into jump-dev:master Sep 30, 2022
@hellemo hellemo mentioned this pull request Oct 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Containers Related to the Containers submodule Type: Enhancement
Development

Successfully merging this pull request may close these issues.

3 participants