Skip to content

Rename copy! -> copy_to #491

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

Merged
merged 1 commit into from
Aug 25, 2018
Merged

Rename copy! -> copy_to #491

merged 1 commit into from
Aug 25, 2018

Conversation

blegat
Copy link
Member

@blegat blegat commented Aug 24, 2018

Also rename defaultcopy! to default_copy_to.

Related to #475

@mlubin
Copy link
Member

mlubin commented Aug 24, 2018

Style question: should we define copy_to or extend Base.copyto!?

@odow
Copy link
Member

odow commented Aug 24, 2018

Define copy_to. Internal consistency over using multiple dispatch just for the sake of it.

@codecov-io
Copy link

codecov-io commented Aug 24, 2018

Codecov Report

Merging #491 into master will not change coverage.
The diff coverage is 84.61%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #491   +/-   ##
=======================================
  Coverage   95.38%   95.38%           
=======================================
  Files          46       46           
  Lines        4681     4681           
=======================================
  Hits         4465     4465           
  Misses        216      216
Impacted Files Coverage Δ
src/attributes.jl 96.66% <ø> (ø) ⬆️
src/constraints.jl 100% <ø> (ø) ⬆️
src/MathOptInterface.jl 0% <ø> (ø) ⬆️
src/Utilities/copy.jl 93.75% <0%> (ø) ⬆️
src/Bridges/bridgeoptimizer.jl 96.93% <100%> (ø) ⬆️
src/Utilities/mockoptimizer.jl 94.9% <100%> (ø) ⬆️
src/Utilities/universalfallback.jl 99.3% <100%> (ø) ⬆️
src/Test/modellike.jl 100% <100%> (ø) ⬆️
src/Utilities/model.jl 97.84% <100%> (ø) ⬆️
src/Utilities/cachingoptimizer.jl 90.05% <100%> (ø) ⬆️

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 16b4dda...d99c4b6. Read the comment docs.

Copy link
Member

@mlubin mlubin left a comment

Choose a reason for hiding this comment

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

I'm not fully sure about not extending the Base method, but let's just go ahead and see how it turns out.

@blegat
Copy link
Member Author

blegat commented Aug 25, 2018

The copy here is not really identical since we need to return a variable map. If some copies are done silently because we overwrite Base.copyto! it might indicate an unexpected copy and hence unexpected bugs and/or inefficiency.

@blegat blegat merged commit 615a40b into master Aug 25, 2018
@mlubin mlubin deleted the bl/renamecopy branch August 25, 2018 12:03
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.

4 participants