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

adding in examples and tests for amend2 generators #101

Merged
merged 2 commits into from
Jun 7, 2018
Merged

Conversation

jbigred1
Copy link
Contributor

@jbigred1 jbigred1 commented Jun 7, 2018

This contains examples for amend2 generators

Will address #93

@jbigred1 jbigred1 requested a review from idreeskhan June 7, 2018 17:45
@codecov-io
Copy link

codecov-io commented Jun 7, 2018

Codecov Report

Merging #101 into master will increase coverage by 0.63%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #101      +/-   ##
==========================================
+ Coverage   70.67%   71.31%   +0.63%     
==========================================
  Files          24       24              
  Lines        1081     1105      +24     
  Branches      125      125              
==========================================
+ Hits          764      788      +24     
  Misses        317      317
Impacted Files Coverage Δ
...tify/ratatool/examples/scalacheck/GenExample.scala 100% <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 334716f...6b1c3eb. Read the comment docs.

"type": "STRING"
}
]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

newline, surprised if this isn't caught in style checks

Copy link
Contributor

@idreeskhan idreeskhan left a comment

Choose a reason for hiding this comment

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

Mostly the map thing so that the output is crisp. Otherwise looks good

.tupled
.amend2(recordIdGen)(_.set("record_id"), _.set("record_id"))

val correlatedRecordGen: Gen[(TableRow, TableRow)] =
Copy link
Contributor

Choose a reason for hiding this comment

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

Can call a.map after to set the nested field so that the output is a single TableRow with the record ID fields correlated.

Copy link
Contributor

Choose a reason for hiding this comment

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

Same for Avro

private val tableRowGenDup: Gen[TableRow] =
tableRowOf(tableSchema)

val exampleRecordGen2: Gen[(TableRow, TableRow)] =
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we name this something else. Maybe joinableExampleGen or something more descriptive. The name itself is up to you

@idreeskhan
Copy link
Contributor

👍 Good to merge when tests pass

@jbigred1 jbigred1 merged commit 0322dc2 into master Jun 7, 2018
@jbigred1 jbigred1 deleted the amend_examples branch June 7, 2018 20:02
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