Skip to content

Commit 464393f

Browse files
committed
Merge branch 'master' into unsupported-data-sources-examples
2 parents 46128e8 + 40ed8c0 commit 464393f

File tree

52 files changed

+9999
-1638
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+9999
-1638
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Default ignored files
22
.idea
3+
!.idea/runConfigurations
4+
!.idea/runConfigurations/*.xml
5+
!.idea/externalDependencies.xml
6+
!.idea/vcs.xml
37
.gradle
48
.kotlin
59
build

.idea/externalDependencies.xml

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Build_Docs_Website.xml

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/runConfigurations/Run_Docs_Website_Locally.xml

Lines changed: 17 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/vcs.xml

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ allprojects {
189189
afterEvaluate {
190190
try {
191191
configure<KtlintExtension> {
192-
version = "1.4.1"
192+
version = "1.6.0"
193193
// rules are set up through .editorconfig
194194
}
195195
} catch (_: UnknownDomainObjectException) {

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/explainer/PluginCallbackProxy.kt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -314,29 +314,29 @@ private fun convertToDescription(dataframeLike: Any): String =
314314
else -> throw IllegalArgumentException("Unsupported type: ${dataframeLike::class}")
315315
}.escapeHtmlForIFrame()
316316

317-
internal fun String.escapeHtmlForIFrame(): String {
318-
val str = this
319-
return buildString {
320-
for (c in str) {
321-
when {
322-
c.code > 127 || c == '\'' || c == '\\' -> {
323-
append("&#")
324-
append(c.code)
325-
append(';')
326-
}
317+
internal fun String.escapeHtmlForIFrame(): String =
318+
buildString {
319+
for (c in this@escapeHtmlForIFrame) {
320+
when (c) {
321+
'<' -> append("&lt;")
322+
323+
'>' -> append("&gt;")
327324

328-
c == '"' -> append("&quot;")
325+
'&' -> append("&amp;")
329326

330-
c == '<' -> append("&amp;lt;")
327+
'"' -> append("&quot;")
331328

332-
c == '>' -> append("&amp;gt;")
329+
'\'' -> append("&#39;")
333330

334-
c == '&' -> append("&amp;")
331+
'\\' -> append("&#92;")
335332

336333
else -> {
337-
append(c)
334+
if (c.code > 127) {
335+
append("&#${c.code};")
336+
} else {
337+
append(c)
338+
}
338339
}
339340
}
340341
}
341342
}
342-
}

core/generated-sources/src/test/kotlin/org/jetbrains/kotlinx/dataframe/puzzles/DateTests.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package org.jetbrains.kotlinx.dataframe.puzzles
33
import io.kotest.matchers.shouldBe
44
import kotlinx.datetime.LocalDate
55
import kotlinx.datetime.Month
6+
import kotlinx.datetime.isoDayNumber
67
import kotlinx.datetime.toJavaLocalDate
78
import org.jetbrains.kotlinx.dataframe.api.add
89
import org.jetbrains.kotlinx.dataframe.api.aggregate
@@ -113,7 +114,7 @@ class DateTests {
113114

114115
(start..end).toList().toColumn("3thu").filter {
115116
it.toJavaLocalDate()[WeekFields.of(Locale.ENGLISH).weekOfMonth()] == 3 &&
116-
it.dayOfWeek.value == 4
117+
it.dayOfWeek.isoDayNumber == 4
117118
} shouldBe expected
118119
}
119120
}

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/explainer/PluginCallbackProxy.kt

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -314,29 +314,29 @@ private fun convertToDescription(dataframeLike: Any): String =
314314
else -> throw IllegalArgumentException("Unsupported type: ${dataframeLike::class}")
315315
}.escapeHtmlForIFrame()
316316

317-
internal fun String.escapeHtmlForIFrame(): String {
318-
val str = this
319-
return buildString {
320-
for (c in str) {
321-
when {
322-
c.code > 127 || c == '\'' || c == '\\' -> {
323-
append("&#")
324-
append(c.code)
325-
append(';')
326-
}
317+
internal fun String.escapeHtmlForIFrame(): String =
318+
buildString {
319+
for (c in this@escapeHtmlForIFrame) {
320+
when (c) {
321+
'<' -> append("&lt;")
322+
323+
'>' -> append("&gt;")
327324

328-
c == '"' -> append("&quot;")
325+
'&' -> append("&amp;")
329326

330-
c == '<' -> append("&amp;lt;")
327+
'"' -> append("&quot;")
331328

332-
c == '>' -> append("&amp;gt;")
329+
'\'' -> append("&#39;")
333330

334-
c == '&' -> append("&amp;")
331+
'\\' -> append("&#92;")
335332

336333
else -> {
337-
append(c)
334+
if (c.code > 127) {
335+
append("&#${c.code};")
336+
} else {
337+
append(c)
338+
}
338339
}
339340
}
340341
}
341342
}
342-
}

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/puzzles/DateTests.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ package org.jetbrains.kotlinx.dataframe.puzzles
33
import io.kotest.matchers.shouldBe
44
import kotlinx.datetime.LocalDate
55
import kotlinx.datetime.Month
6+
import kotlinx.datetime.isoDayNumber
67
import kotlinx.datetime.toJavaLocalDate
78
import org.jetbrains.kotlinx.dataframe.api.add
89
import org.jetbrains.kotlinx.dataframe.api.aggregate
@@ -113,7 +114,7 @@ class DateTests {
113114

114115
(start..end).toList().toColumn("3thu").filter {
115116
it.toJavaLocalDate()[WeekFields.of(Locale.ENGLISH).weekOfMonth()] == 3 &&
116-
it.dayOfWeek.value == 4
117+
it.dayOfWeek.isoDayNumber == 4
117118
} shouldBe expected
118119
}
119120
}

0 commit comments

Comments
 (0)