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 jump start guide #2178

Merged
merged 5 commits into from
May 18, 2018
Merged

Add jump start guide #2178

merged 5 commits into from
May 18, 2018

Conversation

PawelLipski
Copy link
Contributor

No description provided.

@PawelLipski PawelLipski mentioned this pull request Mar 1, 2018
@PawelLipski
Copy link
Contributor Author

@Andrea @kailuowang please take a look, that's basically the blog post https://virtuslab.com/blog/cats-library/, let me know if you think this needs any modifications

@codecov-io
Copy link

codecov-io commented Mar 1, 2018

Codecov Report

Merging #2178 into master will decrease coverage by 0.09%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #2178     +/-   ##
=========================================
- Coverage   95.05%   94.96%   -0.1%     
=========================================
  Files         333      333             
  Lines        5789     5799     +10     
  Branches      211      217      +6     
=========================================
+ Hits         5503     5507      +4     
- Misses        286      292      +6
Impacted Files Coverage Δ
core/src/main/scala/cats/data/Tuple2K.scala 90.69% <0%> (-4.66%) ⬇️
core/src/main/scala/cats/data/EitherK.scala 93.47% <0%> (-4.35%) ⬇️
core/src/main/scala/cats/data/Nested.scala 94.28% <0%> (-1.43%) ⬇️
core/src/main/scala/cats/data/Kleisli.scala 96.9% <0%> (-1.04%) ⬇️
...in/scala/cats/data/IndexedReaderWriterStateT.scala 99.04% <0%> (-0.02%) ⬇️
.../src/main/scala/cats/syntax/applicativeError.scala 100% <0%> (ø) ⬆️
core/src/main/scala/cats/syntax/list.scala 100% <0%> (ø) ⬆️
kernel/src/main/scala/cats/kernel/Order.scala 88.88% <0%> (ø) ⬆️
core/src/main/scala/cats/data/EitherT.scala 97.65% <0%> (ø) ⬆️
core/src/main/scala/cats/syntax/flatMap.scala 82.6% <0%> (+15.94%) ⬆️

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 2ae785f...610346e. Read the comment docs.

@Andrea
Copy link
Contributor

Andrea commented Mar 2, 2018

Probably better that this PR is yours, I was basically re writing it, no point

@LukaJCB
Copy link
Member

LukaJCB commented Mar 2, 2018

Hi @PawelLipski, does it make sense to update this to 1.0? I don't think having a jump start guide for 0.9 is in the best interest here if I'm being honest and I don't think anything that's particular to 0.9 from the code portion. Anyways thanks much for the great work!

@kailuowang
Copy link
Contributor

kailuowang commented Mar 2, 2018

Thanks for the great work. To be honest, I am not sure how I feel about having Future in the jump start guide. It's extremely common in Scala but it is really something to be avoided in pure functional programming. So I am torn.

@PawelLipski
Copy link
Contributor Author

@LukaJCB Sure, I'll migrate to 1.0.0... I'm sure the Cartesian syntax changed in the meantime, I'll check the other pieces as well.
@kailuowang Yes, I'm aware of this problem... still, it's kind of most likely for typical users to employ Cats for dealing with futures and slick DBIOs. And cats provide instances for Future out of the box... so I guess it's perfectly OK to base the jump start guide on Futures.

@PawelLipski
Copy link
Contributor Author

@LukaJCB I added a commit that migrates the guide to 1.0.1. In particular, I replaced |@| syntax with mapN, removed the remarks about traverseU/sequenceU and renamed EitherT.liftT to EitherT.liftF. I can't see any other things that need to be updated... pls let me know if you spot anything.

@PawelLipski
Copy link
Contributor Author

Also, will soon link the new guide so that's accesible in the website.

@PawelLipski
Copy link
Contributor Author

@Andrea @kailuowang @LukaJCB I fixed all the issues the I could see so far, pls review

build.sbt Outdated
@@ -102,6 +102,7 @@ lazy val includeGeneratedSrc: Setting[_] = {
lazy val catsSettings = commonSettings ++ publishSettings ++ scoverageSettings ++ javadocSettings

lazy val scalaCheckVersion = "1.13.5"
lazy val scalaMockVersion = "3.6.0"
Copy link
Contributor

@Andrea Andrea Apr 16, 2018

Choose a reason for hiding this comment

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

Is it just me that finds mocks (in a functional context) a bit of a flag for things that could be improved? I can see why you are adding this here, at the same time...I have reservations for the same reason the Future was mentioned in another comment.
If it was me, I would go with a simplified implementation for the purposes of this example (this is why I was re writing a lot of the examples)

Copy link
Member

Choose a reason for hiding this comment

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

I fully agree, I think Future is good as a gateway drug, but I'm not sure we should encourage mocks. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okey, fixing now

@PawelLipski
Copy link
Contributor Author

@Andrea @kailuowang @LukaJCB removed mentions of mocks

@kailuowang
Copy link
Contributor

Thanks very much! This is looking good. We need a link to it, how about an entry close to the top in the FAQs LIst?

@PawelLipski
Copy link
Contributor Author

@kailuowang well... I actually added a link to that to the main menu but not sure not if it's not an overkill :) Please let me know if you can see a better place for that... Resources for Learners is an option as well but I guess it might be slightly less exposed there and some people who need sth like that might end up missing it

@kailuowang
Copy link
Contributor

I propose we add it as a new FAQ question and place it second on the list (after what import do I need).
The question could be something like
"I am new to pure functional programming, what quick wins can I get from Cats?"

@PawelLipski
Copy link
Contributor Author

Okey, I added to FAQ as suggested and removed from main menu. It's not linked now from anywhere else but that FAQ answer, though.

@PawelLipski
Copy link
Contributor Author

PawelLipski commented May 9, 2018

@kailuowang do you see any outstanding issues with this PR or can we think of merging? Recent travis fail is apparently due to some OOM... https://api.travis-ci.org/v3/job/374505453/log.txt

Copy link
Contributor

@kailuowang kailuowang left a comment

Choose a reason for hiding this comment

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

Thanks a lot!

@PawelLipski
Copy link
Contributor Author

@Andrea @LukaJCB can you see any issues left or can we go on to merging?

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.

Thank you! And sorry for the delay! :)

@PawelLipski
Copy link
Contributor Author

@LukaJCB can you merge? ;) or is there anything specific that holds us back from merging? ^^

@LukaJCB LukaJCB merged commit 0944cfe into typelevel:master May 18, 2018
@LukaJCB
Copy link
Member

LukaJCB commented May 18, 2018

I keep saying this, but yeah sorry for the delay and thanks for your work! It is appreciated! :)

@PawelLipski
Copy link
Contributor Author

No problem and thank you! :) When (circa) is it going to be published on the website? I guess that's gonna be included in some 1.1.1/1.2.0 right?

@kailuowang kailuowang added this to the 1.2 milestone May 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants