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 Proto BigDiffy example #85

Merged
merged 8 commits into from
Apr 24, 2018
Merged

Add Proto BigDiffy example #85

merged 8 commits into from
Apr 24, 2018

Conversation

idreeskhan
Copy link
Contributor

Quick workaround for #83 which has a bit of complexity due to ProtoBuf APIs.

@codecov-io
Copy link

codecov-io commented Apr 23, 2018

Codecov Report

Merging #85 into master will increase coverage by 1.15%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #85      +/-   ##
==========================================
+ Coverage   69.76%   70.91%   +1.15%     
==========================================
  Files          22       24       +2     
  Lines         959     1021      +62     
  Branches      117      125       +8     
==========================================
+ Hits          669      724      +55     
- Misses        290      297       +7
Impacted Files Coverage Δ
...tify/ratatool/examples/scalacheck/GenExample.scala 100% <ø> (ø)
...in/scala/com/spotify/ratatool/diffy/BigDiffy.scala 46.4% <0%> (-0.38%) ⬇️
...atool/examples/diffy/ProtobufBigDiffyExample.scala 0% <0%> (ø)
...la/com/spotify/ratatool/samplers/AvroSampler.scala 96.87% <0%> (-3.13%) ⬇️
...om/spotify/ratatool/scalacheck/AvroGenerator.scala 89.39% <0%> (+4.54%) ⬆️
...cala/com/spotify/ratatool/scalacheck/package.scala 82.35% <0%> (+11.76%) ⬆️

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 d75eda4...e724f2c. Read the comment docs.

@@ -282,6 +282,22 @@ object BigDiffy extends Command {
r.setFields(mergeFields(x.getFields.asScala, y.getFields.asScala).asJava)
}

def saveStats[T](bigDiffy: BigDiffy[T], output: String, withHeader: Boolean = false): Any = {
Copy link
Contributor

Choose a reason for hiding this comment

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

should this return Unit instead

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yea, definitely

args.list("unordered").toSet)
} catch {
case e: Throwable =>
throw e
Copy link
Contributor

Choose a reason for hiding this comment

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

what's the point of doing this

@@ -27,6 +27,7 @@ import com.spotify.ratatool.avro.specific.{EnumField, ExampleRecord, NestedExamp
import com.spotify.ratatool.scalacheck._
import org.apache.avro.util.Utf8
import org.scalacheck.{Arbitrary, Gen}

Copy link
Contributor

Choose a reason for hiding this comment

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

extra line

Copy link
Contributor

@jbigred1 jbigred1 left a comment

Choose a reason for hiding this comment

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

Looks good

@idreeskhan idreeskhan merged commit 91bb160 into master Apr 24, 2018
@idreeskhan idreeskhan deleted the idrees/proto-diffy-example branch April 24, 2018 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants