Skip to content

Commit 1232fd1

Browse files
add spelling conventions and name fixes in a whole project
1 parent 37540a8 commit 1232fd1

File tree

30 files changed

+85
-59
lines changed

30 files changed

+85
-59
lines changed

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/api/join.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -168,12 +168,12 @@ public fun <C> ColumnMatch(left: ColumnReference<C>, right: ColumnReference<C>):
168168
public typealias JoinColumnsSelector<A, B> = JoinDsl<A, B>.(ColumnsContainer<A>) -> ColumnsResolver<*>
169169

170170
public enum class JoinType {
171-
Left, // all data from left data frame, nulls for mismatches in right data frame
172-
Right, // all data from right data frame, nulls for mismatches in left data frame
173-
Inner, // only matched data from right and left data frame
174-
Filter, // only matched data from left data frame
175-
Full, // all data from left and from right data frame, nulls for any mismatches
176-
Exclude, // mismatched rows from left data frame
171+
Left, // all data from left dataframe, nulls for mismatches in right dataframe
172+
Right, // all data from right dataframe, nulls for mismatches in left dataframe
173+
Inner, // only matched data from right and left dataframe
174+
Filter, // only matched data from left dataframe
175+
Full, // all data from left and from right dataframe, nulls for any mismatches
176+
Exclude, // mismatched rows from left dataframe
177177
}
178178

179179
internal val JoinType.addNewColumns: Boolean

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/AccessApi.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import org.jetbrains.kotlinx.dataframe.documentation.AccessApi.AnyApiLinks
55
/**
66
* ## Access APIs
77
*
8-
* By nature, data frames are dynamic objects, column labels depend on the input source and also new columns could be added
8+
* By nature, dataframes are dynamic objects, column labels depend on the input source and also new columns could be added
99
* or deleted while wrangling. Kotlin, in contrast, is a statically typed language and all types are defined and verified
10-
* ahead of execution. That's why creating a flexible, handy, and, at the same time, safe API to a data frame is tricky.
10+
* ahead of execution. That's why creating a flexible, handy, and, at the same time, safe API to a dataframe is tricky.
1111
*
1212
* In `Kotlin DataFrame` we provide four different ways to access columns, and, while they're essentially different, they
1313
* look pretty similar in the data wrangling DSL. These include:

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/documentation/ExpressionsGivenDataFrame.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ import org.jetbrains.kotlinx.dataframe.DataFrameExpression as DfDataFrameExpress
88

99
/**
1010
* ## Expressions Given DataFrame
11-
* Expressing values using a "Data Frame Expression" can occur exclusively in a
11+
* Expressing values using a "DataFrame Expression" can occur exclusively in a
1212
* {@include [DataFrameExpressionLink]}.
1313
*/
1414
internal interface ExpressionsGivenDataFrame {
1515

1616
interface OPERATION
1717

18-
/** Provide a new value for every selected data frame using a [dataframe expression][DfDataFrameExpression]. */
18+
/** Provide a new value for every selected dataframe using a [dataframe expression][DfDataFrameExpression]. */
1919
interface DataFrameExpression {
2020

2121
/**
@@ -28,6 +28,6 @@ internal interface ExpressionsGivenDataFrame {
2828
interface WithExample
2929
}
3030

31-
/** [Data Frame Expression][DataFrameExpression] */
31+
/** [DataFrame Expression][DataFrameExpression] */
3232
interface DataFrameExpressionLink
3333
}

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/api/join.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,34 +105,34 @@ internal fun <A, B> DataFrame<A>.joinImpl(
105105
leftCol.path to allRightJoinColumns[colNumber].path
106106
}.toMap()
107107

108-
// compute pairs of join key to row index from right data frame
108+
// compute pairs of join key to row index from right dataframe
109109
val rightJoinKeyToIndex = other
110110
.indices()
111111
.map { index -> allRightJoinColumns.map { it.data[index] } to index }
112112

113-
// group row indices by key from right data frame
113+
// group row indices by key from right dataframe
114114
val groupedRight = when (joinType) {
115115
JoinType.Exclude -> rightJoinKeyToIndex.associate { it.first to emptyList() }
116116
else -> rightJoinKeyToIndex.groupBy({ it.first }) { it.second }
117117
}
118118

119119
var outputRowsCount = 0
120120

121-
// for every row index from left data frame compute a list of matched indices from right data frame
121+
// for every row index from left dataframe compute a list of matched indices from right dataframe
122122
val leftToRightMapping = indices.map { leftIndex ->
123123
val leftKey = allLeftJoinColumns.map { it.data[leftIndex] }
124124
val rightIndices = groupedRight[leftKey]
125125
outputRowsCount += rightIndices?.size ?: if (joinType.allowRightNulls) 1 else 0
126126
rightIndices
127127
}
128128

129-
// for every row index in right data frame store a flag indicating whether this row was matched by some row in left data frame
129+
// for every row index in right dataframe store a flag indicating whether this row was matched by some row in left dataframe
130130
val rightMatched = BooleanArray(other.nrow) { false }
131131

132-
// number of rows in right data frame that were not matched by any row in left data frame. Used for correct allocation of an output array
132+
// number of rows in right dataframe that were not matched by any row in left dataframe. Used for correct allocation of an output array
133133
var rightUnmatchedCount = other.nrow
134134

135-
// compute matched indices from right data frame and number of rows in output data frame
135+
// compute matched indices from right dataframe and number of rows in output dataframe
136136
if (joinType.allowLeftNulls) {
137137
leftToRightMapping.forEach { rightIndices ->
138138
rightIndices?.forEach { i ->

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/codeGen/ReplCodeGeneratorImpl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ internal class ReplCodeGeneratorImpl : ReplCodeGenerator {
5959
?.takeIf { it.findAnnotation<DataSchema>() != null }
6060
?.let { registeredMarkers[it] ?: MarkersExtractor.get(it) }
6161
if (currentMarker != null) {
62-
// we need to make sure that the property's marker type is open in order to let derived data frames be assignable to it
62+
// we need to make sure that the property's marker type is open in order to let derived dataframes be assignable to it
6363
if (currentMarker.isOpen) {
6464
val columnSchema = currentMarker.schema
65-
// for mutable properties we do strong typing only at the first processing, after that we allow its type to be more general than actual data frame type
65+
// for mutable properties we do strong typing only at the first processing, after that we allow its type to be more general than actual dataframe type
6666
if (wasProcessedBefore || columnSchema == targetSchema) {
67-
// property scheme is valid for current data frame, but we should also check that all compatible open markers are implemented by it
67+
// property scheme is valid for current dataframe, but we should also check that all compatible open markers are implemented by it
6868
val requiredBaseMarkers = registeredMarkers.values.filterRequiredForSchema(columnSchema)
6969
if (requiredBaseMarkers.any() && requiredBaseMarkers.all { currentMarker.implements(it) }) {
7070
return CodeWithTypeCastGenerator.EMPTY

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/impl/codeGen/SchemaReader.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import org.jetbrains.kotlinx.dataframe.schema.DataFrameSchema
1616
import java.net.URL
1717

1818
/**
19-
* Reader that can read a data frame from a URL. It tries to guess the format based on the given [formats] and returns
19+
* Reader that can read a dataframe from a URL. It tries to guess the format based on the given [formats] and returns
2020
* [DfReadResult.Success], or returns [DfReadResult.Error] if it fails.
2121
*/
2222
public val CodeGenerator.Companion.urlDfReader: (url: URL, formats: List<SupportedFormat>) -> DfReadResult

core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/string.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ internal fun AnyFrame.renderToString(
3232

3333
// title
3434
if (title) {
35-
sb.appendLine("Data Frame [${size()}]")
35+
sb.appendLine("DataFrame [${size()}]")
3636
sb.appendLine()
3737
}
3838

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/codeGen/CodeGenerationTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ class CodeGenerationTests : BaseTest() {
153153
}
154154

155155
@Test
156-
fun `generate marker interface for nested data frame`() {
156+
fun `generate marker interface for nested dataframe`() {
157157
val property = ::df
158158
val grouped = df.move { name and city }.under("nameAndCity")
159159
val generated = ReplCodeGenerator.create().process(grouped, property)

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/codeGen/ShortNamesRenderingTest.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ internal class ShortNamesRenderingTest : TypeRenderingStrategy by ShortNames {
7777
}
7878

7979
@Test
80-
fun `data frame`() {
80+
fun `dataframe`() {
8181
fields.keys.asClue {
8282
fields["f"]!!.renderAccessorFieldType() shouldBe
8383
"DataFrame<org.jetbrains.kotlinx.dataframe.internal.codeGen.ShortNamesRenderingTest.Marker>"
@@ -125,7 +125,7 @@ internal class ShortNamesRenderingTest : TypeRenderingStrategy by ShortNames {
125125
}
126126

127127
@Test
128-
fun `data frame column`() {
128+
fun `dataframe column`() {
129129
fields.keys.asClue {
130130
fields["f"]!!.renderColumnType() shouldBe
131131
"DataColumn<DataFrame<org.jetbrains.kotlinx.dataframe.internal.codeGen.ShortNamesRenderingTest.Marker>>"

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/testSets/person/DataFrameTests.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1977,7 +1977,7 @@ class DataFrameTests : BaseTest() {
19771977
}
19781978

19791979
@Test
1980-
fun `render nested data frames to string`() {
1980+
fun `render nested dataframes to string`() {
19811981
val rendered = typed
19821982
.drop(1)
19831983
.groupBy { name }

0 commit comments

Comments
 (0)