JuliaGeometry / Contour.jl

Calculating contour curves for 2D scalar fields in Julia
Other
43 stars 13 forks source link

Deprecate iteration #32

Closed tomasaschan closed 8 years ago

tomasaschan commented 8 years ago

Deprecated API:

for contour in contours(xs, ys, zs, N)
    for line in contour.lines
        x, y = coordinates(line)
        plot(x, y)
    end
end

New API:

cs = contours(xs, ys, zs, N)
for level in levels(cs)
    for line in lines(level)
        x, y = coordinates(line)
        plot(x, y)
    end
end

See #28 and #29 for some discussion.

tomasaschan commented 8 years ago

JuliaLang/METADATA.jl#4638 tags a release right before this, and I intend to tag yet another release after this merges.

codecov-io commented 8 years ago

Current coverage is 91.30%

Merging #32 into master will increase coverage by +2.02% as of 59f3115

@@            master    #32   diff @@
=====================================
  Files            1      1       
  Stmts          140    138     -2
  Branches         0      0       
  Methods          0      0       
=====================================
+ Hit            125    126     +1
  Partial          0      0       
+ Missed          15     12     -3

Review entire Coverage Diff as of 59f3115

Powered by Codecov. Updated on successful CI builds.

tbreloff commented 8 years ago

+1 this change is an improvement.

On Feb 22, 2016, at 3:28 PM, Tomas Lycken notifications@github.com wrote:

Deprecated API:

for contour in contours(xs, ys, zs, N) for line in contour.lines x, y = coordinates(line) plot(x, y) end end New API:

cs = contours(xs, ys, zs, N) for level in levels(cs) for line in lines(level) x, y = coordinates(line) plot(x, y) end end See #28 and #29 for some discussion.

You can view, comment on, or merge this pull request online at:

https://github.com/tlycken/Contour.jl/pull/32

Commit Summary

Deprecate iteration over the result of contours Improve deprecation warnings File Changes

M src/Contour.jl (15) Patch Links:

https://github.com/tlycken/Contour.jl/pull/32.patch https://github.com/tlycken/Contour.jl/pull/32.diff — Reply to this email directly or view it on GitHub.

tomasaschan commented 8 years ago

Hm. We should probably deprecate push!, length and eltype while where at it.