cats icon indicating copy to clipboard operation
cats copied to clipboard

Add doctests (excellent first-time issue)

Open kailuowang opened this issue 6 years ago • 14 comments

Doctests are a great way to provide compilable and testable example code for scaladoc. We should cover as many methods with doctests as possible. Here is an example of PR adding doctests. Note that to test the doctests run sbt coreJVM/test This issue encompasses the effort of adding more doctest coverage to our type classes and data types. It would be a great first-time contribution.

If you are interested, please comment here on what type classes or data types you'd like to work on.

kailuowang avatar Sep 07 '18 16:09 kailuowang

@kailuowang I'll start working on Functor :)

YuvalItzchakov avatar Sep 09 '18 13:09 YuvalItzchakov

I'll be writing them for Semigroup, Group, and Monoid.

DennisVDB avatar Sep 22 '18 13:09 DennisVDB

Kleisli seems pretty barren w.r.t doctests, I can start on that one?

nasadorian avatar Nov 06 '18 15:11 nasadorian

@kailuowang So since Kleisli implements quite a few typeclasses, how much doctesting is too much? Should every method be covered? EDIT: I guess you can never have too much test coverage

nasadorian avatar Nov 07 '18 16:11 nasadorian

@nasadorian hmm, good question. I think I would focus on methods that are not part of type classes. There a couple of them in KleisliFunctions. Thanks!

kailuowang avatar Nov 07 '18 16:11 kailuowang

A little late, but I did not forget! PR is linked... added a handful of doctests and comments to Kleisli! @kailuowang

nasadorian avatar Feb 02 '19 00:02 nasadorian

Hi @kailuowang can i start for Applicatives ?

hamednourhani avatar May 03 '19 06:05 hamednourhani

@kailuowang can I start with OptionT?

vasiliybondarenko avatar Jul 16 '19 10:07 vasiliybondarenko

@vasiliybondarenko go right ahead!

LukaJCB avatar Jul 16 '19 12:07 LukaJCB

@kailuowang i checked Applicative. That was done previously. I will work on EitherT.

hamednourhani avatar Sep 09 '19 16:09 hamednourhani

@kailuowang i will start Validated.

hamednourhani avatar Sep 11 '19 20:09 hamednourhani

@kailuowang i checked Ior data type. that was interesting and good opportunity to learn. I will start Ior.

hamednourhani avatar Sep 14 '19 06:09 hamednourhani

@kailuowang i checked the Chain data type as it used widely in cats and i like to add more doctest to it to learn more.

hamednourhani avatar Sep 16 '19 06:09 hamednourhani

I'll pick Show

muskan3006 avatar Dec 09 '20 20:12 muskan3006