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 on flatTransform to OptionT as suggested. (Issue #2309) #2314

Merged
merged 2 commits into from
Aug 16, 2018
Merged

Adding on flatTransform to OptionT as suggested. (Issue #2309) #2314

merged 2 commits into from
Aug 16, 2018

Conversation

sh-abhi
Copy link

@sh-abhi sh-abhi commented Jul 7, 2018

@codecov-io
Copy link

codecov-io commented Jul 7, 2018

Codecov Report

Merging #2314 into master will increase coverage by 0.48%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2314      +/-   ##
==========================================
+ Coverage   94.73%   95.21%   +0.48%     
==========================================
  Files         338      343       +5     
  Lines        5868     6085     +217     
  Branches      213      215       +2     
==========================================
+ Hits         5559     5794     +235     
+ Misses        309      291      -18
Impacted Files Coverage Δ
core/src/main/scala/cats/data/OptionT.scala 97.64% <100%> (+0.02%) ⬆️
...rc/main/scala/cats/laws/discipline/Arbitrary.scala 98.07% <0%> (-0.84%) ⬇️
core/src/main/scala/cats/instances/function.scala 100% <0%> (ø) ⬆️
core/src/main/scala/cats/package.scala 100% <0%> (ø) ⬆️
laws/src/main/scala/cats/laws/ChoiceLaws.scala 100% <0%> (ø) ⬆️
core/src/main/scala/cats/instances/tuple.scala 100% <0%> (ø) ⬆️
laws/src/main/scala/cats/laws/MonadLaws.scala 100% <0%> (ø) ⬆️
...ore/src/main/scala/cats/syntax/representable.scala 100% <0%> (ø)
...s/src/main/scala/cats/laws/RepresentableLaws.scala 100% <0%> (ø)
core/src/main/scala/cats/Representable.scala 100% <0%> (ø)
... and 11 more

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 91ef0e9...f3a482d. Read the comment docs.

@@ -290,6 +290,12 @@ class OptionTSuite extends CatsSuite {
}
}

test("flatTransform consistent with value.map") {
Copy link
Member

Choose a reason for hiding this comment

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

should be with value.flatMap

Copy link
Author

Choose a reason for hiding this comment

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

Good catch, will update.

@kubukoz
Copy link
Member

kubukoz commented Jul 7, 2018

Do you think we should add this for EitherT and IorT in some way too? Once this is merged we could prepare additional PRs for them.

I'm still not sure about the name, so I'd wait for one of the maintainers to take a look and decide.

@sh-abhi
Copy link
Author

sh-abhi commented Jul 7, 2018

@kubukoz I think we should, and I do agree with you that it would make sense to have one of the maintainers decide. I also agree that separate PRs for each would be the way to go if the decision is to go ahead with it.

@sh-abhi
Copy link
Author

sh-abhi commented Jul 12, 2018

@kubukoz, any particular maintainers we should request to take a look at this?

@LukaJCB
Copy link
Member

LukaJCB commented Jul 12, 2018

I think flatTransform is probably fine in terms of naming :)

@sh-abhi
Copy link
Author

sh-abhi commented Aug 10, 2018

@kubukoz @LukaJCB friendly ping on this.

@kubukoz
Copy link
Member

kubukoz commented Aug 11, 2018

I'm not a maintainer so I'll just delegate to Luka ;) Might also want to ping @kailuowang

Copy link
Member

@LukaJCB LukaJCB 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 :)

@sh-abhi
Copy link
Author

sh-abhi commented Aug 12, 2018

Thanks @LukaJCB! It appears that I don't have the ability to merge. @kailuowang, @LukaJCB, not sure if you're able to?

@LukaJCB LukaJCB added this to the 1.3 milestone Aug 16, 2018
Copy link
Contributor

@ceedubs ceedubs left a comment

Choose a reason for hiding this comment

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

Thanks @ABHISHEK7!

@LukaJCB LukaJCB merged commit c9ea988 into typelevel:master Aug 16, 2018
catostrophe pushed a commit to catostrophe/cats that referenced this pull request Sep 15, 2018
… (typelevel#2314)

* Adding on flatTransform to OptionT as suggested.

* Code review changes; fixed a typo in OptionTSuite's flatTransform test.
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.

6 participants