Cats: Add doctests (excellent first-time issue)

Created on 7 Sep 2018  路  14Comments  路  Source: typelevel/cats

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.

documentation good first issue help wanted

Most helpful comment

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

All 14 comments

@kailuowang I'll start working on Functor :)

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

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

@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 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!

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

Hi @kailuowang can i start for Applicatives ?

@kailuowang can I start with OptionT?

@vasiliybondarenko go right ahead!

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

@kailuowang i will start Validated.

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

@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.

I'll pick Show

Was this page helpful?
0 / 5 - 0 ratings

Related issues

LukaJCB picture LukaJCB  路  3Comments

LukaJCB picture LukaJCB  路  4Comments

chuwy picture chuwy  路  4Comments

davidabrahams picture davidabrahams  路  3Comments

tg44 picture tg44  路  4Comments