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 kategory-effects-rx2 #233

Merged
merged 26 commits into from
Sep 15, 2017
Merged

Add kategory-effects-rx2 #233

merged 26 commits into from
Sep 15, 2017

Conversation

pakoito
Copy link
Member

@pakoito pakoito commented Aug 25, 2017

Depends on #232

This PR adds support for RxJava 2's Observable. It's a WIP until I figure some things out, like whether we need to support Single, if tailrecM is correct as it's slow as fuck, and whether to provide a better DSL for binding w/ Schedulers.

@pakoito pakoito self-assigned this Aug 25, 2017
@pakoito pakoito requested review from wiyarmir, raulraja and a team August 25, 2017 01:54
@codecov-io
Copy link

codecov-io commented Aug 25, 2017

Codecov Report

❗ No coverage uploaded for pull request base (master@e3256e1). Click here to learn what that means.
The diff coverage is 89.06%.

Impacted file tree graph

@@            Coverage Diff            @@
##             master     #233   +/-   ##
=========================================
  Coverage          ?   43.11%           
  Complexity        ?      323           
=========================================
  Files             ?      150           
  Lines             ?     4010           
  Branches          ?      402           
=========================================
  Hits              ?     1729           
  Misses            ?     2160           
  Partials          ?      121
Impacted Files Coverage Δ Complexity Δ
kategory-core/src/main/kotlin/kategory/data/Try.kt 20.72% <ø> (ø) 5 <0> (?)
...re/src/main/kotlin/kategory/typeclasses/Comonad.kt 65% <ø> (ø) 0 <0> (?)
...core/src/main/kotlin/kategory/typeclasses/Monad.kt 72.54% <100%> (ø) 0 <0> (?)
...src/main/kotlin/kategory/typeclasses/MonadError.kt 69.23% <100%> (ø) 0 <0> (?)
...kategory/effects/instances/ObservableWInstances.kt 88.23% <88.23%> (ø) 0 <0> (?)
...c/main/kotlin/kategory/effects/data/ObservableW.kt 88.46% <88.46%> (ø) 6 <6> (?)

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 e3256e1...e129aae. Read the comment docs.

@pakoito
Copy link
Member Author

pakoito commented Aug 25, 2017

Threading and Schedulers should be a parameter

@pakoito
Copy link
Member Author

pakoito commented Aug 25, 2017

Proposed API:

ObservableWFlatMapInstances.binding {
 val users = getUserList().bind(destination = Schedulers.newThread())
 val user = Observable.from(users).bind()
 val friends = getFriends(user.id).bind(destination = Schedulers.newThread())
 val result = updateInDatabase().bind(origin = DatabaseScheduler.instance())
 yield(result)
}

@pakoito
Copy link
Member Author

pakoito commented Sep 14, 2017

Ready for release @kategory/maintainers !!

@pakoito pakoito mentioned this pull request Sep 15, 2017
build.dependsOn ':detekt'

sourceCompatibility = javaVersion
targetCompatibility = javaVersion
Copy link
Member

Choose a reason for hiding this comment

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

This has moved to root build.gradle while ago

@pakoito pakoito merged commit c5d26d6 into master Sep 15, 2017
@pakoito pakoito deleted the paco-effectsrx2 branch September 15, 2017 22:31
@pakoito pakoito mentioned this pull request Sep 15, 2017
3 tasks
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