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

Add nice fallback for build_variable #2451

Merged
merged 3 commits into from
Feb 13, 2021
Merged

Add nice fallback for build_variable #2451

merged 3 commits into from
Feb 13, 2021

Conversation

odow
Copy link
Member

@odow odow commented Feb 5, 2021

Closes Part I of #1884 (The related issue is still unresolved.)

@codecov
Copy link

codecov bot commented Feb 5, 2021

Codecov Report

Merging #2451 (0b5677d) into master (a171d75) will decrease coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2451      +/-   ##
==========================================
- Coverage   92.25%   92.16%   -0.09%     
==========================================
  Files          43       43              
  Lines        4634     4610      -24     
==========================================
- Hits         4275     4249      -26     
- Misses        359      361       +2     
Impacted Files Coverage Δ
src/macros.jl 92.43% <100.00%> (+0.29%) ⬆️
src/Containers/no_duplicate_dict.jl 92.85% <0.00%> (-7.15%) ⬇️
src/Containers/vectorized_product_iterator.jl 40.00% <0.00%> (-6.67%) ⬇️
src/Containers/SparseAxisArray.jl 80.26% <0.00%> (-3.95%) ⬇️
src/Containers/DenseAxisArray.jl 74.81% <0.00%> (-2.97%) ⬇️
src/print.jl 90.47% <0.00%> (-0.87%) ⬇️
src/Containers/generate_container.jl 81.48% <0.00%> (-0.67%) ⬇️
src/parse_nlp.jl 95.03% <0.00%> (+4.58%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a171d75...0b5677d. Read the comment docs.

@joaquimg
Copy link
Member

joaquimg commented Feb 5, 2021

Just commented here #2421 (comment) why I think we should not have multiple positional args.

"you need to implement `build_variable`."
)
end

function build_variable(_error::Function, variable::ScalarVariable,
Copy link
Member

Choose a reason for hiding this comment

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

Note that this build_variable is not documented, and as in the comment in #2421 (comment)

It could be build_variabe_in_set. It would be probably breaking though.

It might be even good not to document to keep it less breaking.

Copy link
Member

Choose a reason for hiding this comment

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

it seems you hit a similar problem in: #2450

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, it's staying for now. It should be obvious that it should change if we refactor the macros.

@odow odow requested a review from blegat February 11, 2021 20:57
@odow odow merged commit c432f66 into master Feb 13, 2021
@odow odow deleted the od/missing_build_variable branch February 13, 2021 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants