Skip to content

Commit 78951d1

Browse files
committed
fixed friend paths and made jupyter notebooks only test when debug mode is enabled
1 parent e8690a6 commit 78951d1

File tree

7 files changed

+47
-5
lines changed

7 files changed

+47
-5
lines changed

dataframe-geo/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ dependencies {
4949
}
5050

5151
tasks.withType<KotlinCompile>().configureEach {
52-
(this as BaseKotlinCompile).friendPaths.from(projects.core.path)
52+
(this as BaseKotlinCompile).friendPaths.from(project(projects.core.path).projectDir)
5353
}
5454

5555
kotlinPublications {

dataframe-jupyter/build.gradle.kts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ kotlin {
3737
}
3838

3939
tasks.withType<KotlinCompile> {
40-
(this as BaseKotlinCompile).friendPaths.from(projects.core.path)
40+
(this as BaseKotlinCompile).friendPaths.from(project(projects.core.path).projectDir)
4141
}
4242

4343
tasks.processJupyterApiResources {
4444
libraryProducers = listOf("org.jetbrains.kotlinx.dataframe.jupyter.Integration")
4545
}
4646

47+
tasks.test {
48+
maxHeapSize = "2048m"
49+
}
50+
4751
kotlinPublications {
4852
publication {
4953
publicationName.set("dataframe-jupyter")

dataframe-jupyter/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/DataFrameJupyterTest.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import org.jetbrains.kotlinx.jupyter.testkit.ReplProvider
66

77
abstract class DataFrameJupyterTest :
88
JupyterReplTestCase(
9-
ReplProvider.forLibrariesTesting(listOf("dataframe-jupyter")),
9+
ReplProvider.forLibrariesTesting(
10+
setOf("dataframe", "dataframe-jupyter"),
11+
),
1012
)
1113

1214
fun interface CodeReplacer {

dataframe-jupyter/src/test/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/SampleNotebooksTests.kt

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,27 @@ package org.jetbrains.kotlinx.dataframe.jupyter
33
import org.jetbrains.jupyter.parser.JupyterParser
44
import org.jetbrains.jupyter.parser.notebook.CodeCell
55
import org.jetbrains.jupyter.parser.notebook.Output
6+
import org.jetbrains.kotlinx.dataframe.BuildConfig
7+
import org.junit.Assume
8+
import org.junit.Before
69
import org.junit.Test
710
import java.io.File
811
import java.util.Locale
912

13+
/**
14+
* Runs the example notebooks in the dev folder (`/examples/notebooks/dev`), only when
15+
* debug mode is on:
16+
* `kotlin.dataframe.debug=true`
17+
*/
1018
class SampleNotebooksTests : DataFrameJupyterTest() {
1119

20+
/**
21+
* Skips the test if debug mode is off.
22+
*/
23+
@Suppress("KotlinConstantConditions")
24+
@Before
25+
fun checkDebugMode() = Assume.assumeTrue(BuildConfig.DEBUG)
26+
1227
@Test
1328
fun puzzles() = exampleTest("puzzles", "40 puzzles")
1429

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<configuration>
2+
<appender name="STDERR" class="ch.qos.logback.core.ConsoleAppender">
3+
<!-- encoders are assigned the type
4+
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
5+
<target>System.err</target>
6+
<encoder>
7+
<pattern>%-4relative [%thread] %-5level %logger{35} - %msg %n</pattern>
8+
</encoder>
9+
</appender>
10+
11+
<root level="DEBUG">
12+
<appender-ref ref="STDERR"/>
13+
</root>
14+
15+
<logger name="org.apache" level="ERROR"/>
16+
<logger name="org.jetbrains.kotlin.org.apache" level="ERROR"/>
17+
<logger name="httpclient" level="ERROR"/>
18+
<logger name="org.jetbrains.kotlin.httpclient" level="ERROR"/>
19+
<logger name="org.eclipse.aether" level="DEBUG"/>
20+
<logger name="org.jetbrains.kotlin.org.eclipse.aether" level="DEBUG"/>
21+
</configuration>

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@ org.gradle.jvmargs=-Xmx4G
1313
kotlin.dataframe.add.ksp=false
1414

1515
# Enables debug mode for dataframe.
16-
# This can make certain tests run that should not be run in production.
16+
# This can make certain tests and checks run that should not be run in production.
1717
# It can also be turned on from the command line with `-Pkotlin.dataframe.debug=true`
1818
kotlin.dataframe.debug=false

plugins/kotlin-dataframe/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ tasks.test {
7474
}
7575

7676
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>().configureEach {
77-
(this as BaseKotlinCompile).friendPaths.from(projects.core.path)
77+
(this as BaseKotlinCompile).friendPaths.from(project(projects.core.path).projectDir)
7878
compilerOptions {
7979
freeCompilerArgs.addAll(
8080
"-Xcontext-receivers",

0 commit comments

Comments
 (0)