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

DocTests for OptionT #4038

Merged
merged 6 commits into from
Jan 31, 2022
Merged

DocTests for OptionT #4038

merged 6 commits into from
Jan 31, 2022

Conversation

FelAl
Copy link
Contributor

@FelAl FelAl commented Nov 7, 2021

Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

Thanks. I ❤️ doctests.

Since most of these are overrides, are we going to lose summaries of what they do for just "Example"? I like examples, but I wonder if there should be a first sentence explaining map, filter, etc. Have we added doctests like this for other data types as precedent?

* scala> import cats.data.OptionT
*
* scala> val optionT: OptionT[List, Int] = OptionT(List(Some(2), None, Some(414), None, None))
* scala> optionT.filter(el => (el % 2 ==0 ))
Copy link
Member

Choose a reason for hiding this comment

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

No big deal, but the whitespace on these is a bit weird:

Suggested change
* scala> optionT.filter(el => (el % 2 ==0 ))
* scala> optionT.filter(el => (el % 2 == 0))

@FelAl
Copy link
Contributor Author

FelAl commented Nov 8, 2021

@rossabaker thank you for the review.
I've checked previous PRs(https://github.com/typelevel/cats/pull/3053/files, https://github.com/typelevel/cats/pull/3073/files) and most of them have only section Example

rossabaker
rossabaker previously approved these changes Nov 17, 2021
Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

👍 Thanks!

@johnynek
Copy link
Contributor

looks like the collect examples don't yet work.

@rossabaker rossabaker dismissed their stale review November 20, 2021 20:56

Oops, I overlooked the build failure.

@FelAl
Copy link
Contributor Author

FelAl commented Nov 22, 2021

sbt ++2.12.15 buildJVM bench/test works locally right now without errors.

@FelAl
Copy link
Contributor Author

FelAl commented Jan 19, 2022

Sorry for the delay.

@FelAl FelAl requested a review from johnynek January 23, 2022 07:11
@FelAl FelAl requested a review from rossabaker January 31, 2022 17:00
Copy link
Member

@rossabaker rossabaker left a comment

Choose a reason for hiding this comment

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

Thanks for the touch-ups!

@johnynek
Copy link
Contributor

the job seemed to have a transient failure on future tests.

@rossabaker rossabaker merged commit 3198754 into typelevel:main Jan 31, 2022
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