Skip to content

Commit 7ae67ff

Browse files
committed
fixed jupyter tests
1 parent b261047 commit 7ae67ff

File tree

25 files changed

+200063
-43204
lines changed

25 files changed

+200063
-43204
lines changed

dataframe-jupyter/src/main/kotlin/org/jetbrains/kotlinx/dataframe/jupyter/JupyterHtmlRenderer.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,8 @@ internal object SerializationKeys {
142142
const val NROW = org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.NROW
143143
const val COLUMNS = org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.COLUMNS
144144
const val KOTLIN_DATAFRAME = org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.KOTLIN_DATAFRAME
145+
const val DATA = org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.DATA
146+
const val METADATA = org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.METADATA
145147
}
146148

147149
@Suppress("INVISIBLE_REFERENCE")

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ import kotlinx.serialization.json.jsonArray
1414
import kotlinx.serialization.json.jsonObject
1515
import kotlinx.serialization.json.jsonPrimitive
1616
import org.intellij.lang.annotations.Language
17-
import org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.DATA
18-
import org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.KOTLIN_DATAFRAME
19-
import org.jetbrains.kotlinx.dataframe.impl.io.SerializationKeys.METADATA
17+
import org.jetbrains.kotlinx.dataframe.jupyter.SerializationKeys.DATA
18+
import org.jetbrains.kotlinx.dataframe.jupyter.SerializationKeys.KOTLIN_DATAFRAME
19+
import org.jetbrains.kotlinx.dataframe.jupyter.SerializationKeys.METADATA
2020
import org.jetbrains.kotlinx.jupyter.api.MimeTypedResult
2121
import org.jetbrains.kotlinx.jupyter.testkit.JupyterReplTestCase
2222
import org.junit.BeforeClass

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,13 @@ 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.junit.Ignore
76
import org.junit.Test
87
import java.io.File
98
import java.util.Locale
109

1110
class SampleNotebooksTests : DataFrameJupyterTest() {
11+
1212
@Test
13-
@Ignore
1413
fun puzzles() = exampleTest("puzzles", "40 puzzles")
1514

1615
@Test
@@ -26,18 +25,16 @@ class SampleNotebooksTests : DataFrameJupyterTest() {
2625
)
2726

2827
@Test
29-
@Ignore
3028
fun titanic() =
3129
exampleTest(
3230
dir = "titanic",
3331
notebookName = "Titanic",
3432
replacer = CodeReplacer.byMap(
35-
"../../idea-examples/" to "$IDEA_EXAMPLES_PATH/",
33+
testFile("titanic", "titanic.csv"),
3634
),
3735
)
3836

3937
@Test
40-
@Ignore
4138
fun wine() =
4239
exampleTest(
4340
dir = "wine",
@@ -48,7 +45,6 @@ class SampleNotebooksTests : DataFrameJupyterTest() {
4845
)
4946

5047
@Test
51-
@Ignore
5248
fun netflix() {
5349
val currentLocale = Locale.getDefault()
5450
try {
@@ -68,12 +64,11 @@ class SampleNotebooksTests : DataFrameJupyterTest() {
6864
}
6965

7066
@Test
71-
@Ignore
7267
fun movies() =
7368
exampleTest(
7469
dir = "movies",
7570
replacer = CodeReplacer.byMap(
76-
"ml-latest/movies.csv" to "$IDEA_EXAMPLES_PATH/movies/src/main/resources/movies.csv",
71+
testFile("movies", "movies.csv"),
7772
),
7873
// There is no tags data in repository
7974
cellClause = CellClause.stopAfter { cell ->

examples/notebooks/dev/github/github.ipynb

Lines changed: 7 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,21 @@
11
{
22
"cells": [
33
{
4+
"metadata": {},
45
"cell_type": "code",
5-
"source": "%use dataframe(0.16.0-dev-6098)",
6-
"metadata": {
7-
"pycharm": {
8-
"name": "#%%\n"
9-
},
10-
"ExecuteTime": {
11-
"end_time": "2025-03-07T11:23:15.006584Z",
12-
"start_time": "2025-03-07T11:23:11.415146Z"
13-
}
14-
},
156
"outputs": [],
16-
"execution_count": 1
7+
"execution_count": null,
8+
"source": "%use dataframe"
179
},
1810
{
19-
"metadata": {
20-
"ExecuteTime": {
21-
"end_time": "2025-03-07T11:23:17.636570Z",
22-
"start_time": "2025-03-07T11:23:15.035907Z"
23-
}
24-
},
11+
"metadata": {},
2512
"cell_type": "code",
13+
"outputs": [],
14+
"execution_count": null,
2615
"source": [
2716
"%useLatestDescriptors\n",
2817
"%use kandy"
29-
],
30-
"outputs": [],
31-
"execution_count": 2
18+
]
3219
},
3320
{
3421
"cell_type": "markdown",

examples/notebooks/dev/github/jetbrains.json

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/notebooks/dev/json/KeyValueAndOpenApi.ipynb

Lines changed: 169 additions & 2266 deletions
Large diffs are not rendered by default.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"numSpecs": 3809,
3+
"numAPIs": 2362,
4+
"numEndpoints": 79405,
5+
"unreachable": 138,
6+
"invalid": 634,
7+
"unofficial": 24,
8+
"fixes": 34001,
9+
"fixedPct": 21,
10+
"datasets": [
11+
{
12+
"title": "providerCount",
13+
"data": {
14+
"adyen.com": 69,
15+
"amazonaws.com": 295,
16+
"apideck.com": 14,
17+
"apisetu.gov.in": 181,
18+
"azure.com": 1832,
19+
"ebay.com": 20,
20+
"fungenerators.com": 12,
21+
"googleapis.com": 443,
22+
"hubapi.com": 11,
23+
"interzoid.com": 20,
24+
"mastercard.com": 14,
25+
"microsoft.com": 27,
26+
"nexmo.com": 20,
27+
"nytimes.com": 11,
28+
"parliament.uk": 11,
29+
"sportsdata.io": 35,
30+
"twilio.com": 41,
31+
"windows.net": 10,
32+
"Others": 743
33+
}
34+
}
35+
],
36+
"stars": 2964,
37+
"issues": 206,
38+
"thisWeek": {
39+
"added": 123,
40+
"updated": 119
41+
}
42+
}

0 commit comments

Comments
 (0)