Skip to content

Commit

Permalink
reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
vkkhare committed Feb 11, 2020
1 parent 30522f2 commit 67fffa7
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 18 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ script:
- ./gradlew build check

deploy:
provider: script
script: ./gradlew final
on:
branch: master
provider: script
script: ./gradlew final
on:
branch: master
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ allprojects {
google()
jcenter()
maven {
url "https://dl.bintray.com/openmined/KotlinSyft"
url "https://dl.bintray.com/openmined/KotlinSyft"
}
}
}
Expand Down
13 changes: 6 additions & 7 deletions demo-app/src/main/java/org/openmined/syft/demo/StandaloneDemo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ package org.openmined.syft.demo

import io.reactivex.Scheduler
import io.reactivex.schedulers.Schedulers
import kotlinx.serialization.ImplicitReflectionSerializer
import org.openmined.syft.Syft
import org.openmined.syft.networking.requests.Protocol
import org.openmined.syft.networking.clients.SignallingClient
import org.openmined.syft.networking.requests.Protocol
import org.openmined.syft.threading.ProcessSchedulers

@ExperimentalUnsignedTypes
Expand All @@ -15,10 +14,10 @@ fun main() {
"echo.websocket.org",
2000u
), object : ProcessSchedulers {
override val computeThreadScheduler: Scheduler
get() = Schedulers.computation()
override val calleeThreadScheduler: Scheduler
get() = Schedulers.single()
}
override val computeThreadScheduler: Scheduler
get() = Schedulers.computation()
override val calleeThreadScheduler: Scheduler
get() = Schedulers.single()
}
)
}
2 changes: 1 addition & 1 deletion syftlib/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ dependencies {
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.core:core-ktx:1.2.0'
implementation "org.jetbrains.kotlinx:kotlinx-serialization-runtime:0.14.0"

implementation 'org.webrtc:google-webrtc:1.0.30039'
implementation 'io.reactivex.rxjava2:rxjava:2.2.12'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
Expand Down
2 changes: 1 addition & 1 deletion syftlib/src/main/java/org/openmined/syft/Syft.kt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class Syft private constructor(
TAG,
"Socket was closed successfully"
)
is NetworkMessage.SocketError -> Log.e(TAG,"socket error",it.throwable)
is NetworkMessage.SocketError -> Log.e(TAG, "socket error", it.throwable)
is NetworkMessage.MessageReceived -> handleResponse(
CommunicationDataFactory.deserializeSocket(
it.message
Expand Down
2 changes: 1 addition & 1 deletion syftlib/src/main/java/org/openmined/syft/SyftJob.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class SyftJob(val modelName: String, val version: String? = null) {
/**
* create a worker job
*/
fun start(){
fun start() {

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SignallingClient(
fun send(type: MessageType, data: JsonObject? = null) {
val message = json {
TYPE to type.value
if (data!=null)
if (data != null)
DATA to data
}.toString()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ private const val TAG = "WebRTCClient"
internal class WebRTCClient(
private val peerConnectionFactory: PeerConnectionFactory,
private val peerConfig: PeerConnection.RTCConfiguration,
@ExperimentalUnsignedTypes
private val signallingClient: SignallingClient
) {

Expand Down Expand Up @@ -184,7 +185,7 @@ internal class WebRTCClient(
}
}
else -> {
Log.d(TAG,"unknown message type received")
Log.d(TAG, "unknown message type received")
}
}

Expand Down
1 change: 0 additions & 1 deletion syftlib/src/test/java/org/openmined/syft/SyftTest.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import com.nhaarman.mockitokotlin2.verify
import com.nhaarman.mockitokotlin2.whenever
import io.reactivex.Flowable
import io.reactivex.schedulers.Schedulers
import kotlinx.serialization.ImplicitReflectionSerializer
import org.junit.jupiter.api.Test
import org.openmined.syft.networking.clients.NetworkMessage
import org.openmined.syft.networking.clients.SignallingClient
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ class WebRTCClientTest {
fun setUp() {
MockitoAnnotations.initMocks(this)
}

@Test
@ExperimentalUnsignedTypes
fun `Given a workerId and a scopeId when the client starts it sends it through the socket`() {
Expand Down

0 comments on commit 67fffa7

Please sign in to comment.