JuliaGeometry / Contour.jl

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

Interface polish #30

Closed tomasaschan closed 8 years ago

tomasaschan commented 8 years ago

I came to think of a backwards-compatible way of implementing #29, so I went ahead and did it :)

The extra piece that makes this work is that the type that is now returned by contours is also an iterable, so iterating over it the way one previously iterated over the array we returned "just works". However, I'm inclined to immediately deprecate this API, so that with the next tagged release, we start moving people over to using levels and lines rather than property accessors and direct iteration. @darwindarak, does this sound reasonable?

There are now also some tests in test/interface.jl that verify that both the old and the new invocations work.

codecov-io commented 8 years ago

Current coverage is 92.59%

Merging #30 into master will decrease coverage by -4.15% as of e3e701a

@@            master     #30   diff @@
======================================
  Files            1       1       
  Stmts          123     135    +12
  Branches         0       0       
  Methods          0       0       
======================================
+ Hit            119     125     +6
  Partial          0       0       
- Missed           4      10     +6

Review entire Coverage Diff as of e3e701a

Powered by Codecov. Updated on successful CI builds.

darwindarak commented 8 years ago

That's a cool solution. Looks good to me!