Skip to content

Bump com.diffplug.spotless from 6.25.0 to 7.0.2 #1106

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.7.3
version = 3.8.1
runner.dialect = scala213

rewrite.trailingCommas.style = multiple
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
id 'scala' // scala support
id 'signing'
id 'maven-publish' // publish to a maven repo (local or mvn central, has to be defined)
id 'com.diffplug.spotless' version '6.25.0' // code format
id 'com.diffplug.spotless' version '7.0.2' // code format
id "com.github.ben-manes.versions" version '0.52.0'
id "de.undercouch.download" version "5.6.0" // downloads plugin
id "kr.motd.sphinx" version "2.10.1" // documentation generation
Expand Down
6 changes: 3 additions & 3 deletions gradle/scripts/spotless.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ spotless {
// same as groovy, but for .gradle (defaults to '*.gradle')
target('*.gradle', 'gradle/scripts/*.gradle')
greclipse()
indentWithSpaces(2)
leadingTabsToSpaces(2)
}

//sets a license header, removes unused imports and formats conforming to the scala fmt formatter
Expand All @@ -32,15 +32,15 @@ spotless {
format ('misc') {
target('**/.gitignore', 'configs/**')
trimTrailingWhitespace()
indentWithTabs()
leadingSpacesToTabs()
endWithNewline()
}

/* Formats markdown files, just like the other misc files, but without trimming trailing white spaces (nested
* enumerations) */
format('md') {
target('**/*.md')
indentWithSpaces(2)
leadingTabsToSpaces(2)
endWithNewline()
}
}
3 changes: 1 addition & 2 deletions src/main/scala/edu/ie3/simona/config/ConfigFailFast.scala
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ object ConfigFailFast extends LazyLogging {
}

/** Check participants' basic runtime configurations, as well as in default as
* in individual configs. This comprises
* i.e. uuid and scaling factor
* in individual configs. This comprises i.e. uuid and scaling factor
*/
private def checkBaseRuntimeConfigs(
defaultConfig: BaseRuntimeConfig,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,8 +142,8 @@ object FlexibilityMessage {
* next second after the current tick.
* @param requestAtTick
* Optionally the tick at which flex options are foreseen to have changed,
* i.e. the tick at which the controlled asset model would like to be
* activated at the latest.
* i.e. the tick at which the controlled asset model would like to be
* activated at the latest.
*/
final case class FlexCompletion(
override val modelUuid: UUID,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ class PowerFlowSupportSpec
0.0001d.asAmpere,
currentTolerance,
)
// angles are not reliable enough with such small magnitudes
// angles are not reliable enough with such small magnitudes
}

// right/bottom side segments (lines that are adjacent to the closed switch) should have load
Expand Down Expand Up @@ -381,7 +381,7 @@ class PowerFlowSupportSpec
0.0001d.asAmpere,
currentTolerance,
)
// angles are not reliable enough with such small magnitudes
// angles are not reliable enough with such small magnitudes
}

}
Expand Down
56 changes: 8 additions & 48 deletions src/test/scala/edu/ie3/simona/model/participant2/PvModelSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -515,68 +515,28 @@ class PvModelSpec extends UnitSpec with GivenWhenThen with DefaultTestData {
(43d, -14d, -22.5d, 45d, 15d,
35.176193345578606393727080835951995075234213360724d), // Duffie
(
51.516667d,
+18.4557514d,
-15.00225713d,
30d,
+0d,
14.420271449960715d,
51.516667d, +18.4557514d, -15.00225713d, 30d, +0d, 14.420271449960715d,
), // Iqbal
(
51.516667d,
+18.4557514d,
-15.00225713d,
90d,
+0d,
58.65287310017624d,
51.516667d, +18.4557514d, -15.00225713d, 90d, +0d, 58.65287310017624d,
), // Iqbal
(
35.0d,
+23.2320597d,
+30.00053311d,
45d,
10d,
39.62841449023577d,
35.0d, +23.2320597d, +30.00053311d, 45d, 10d, 39.62841449023577d,
), // Kalogirou - Solar Energy Engineering Example 2.7 ISBN 978-0-12-374501-9; DOI https://doi.org/10.1016/B978-0-12-374501-9.X0001-5
(
35.0d,
+23.2320597d,
+30.00053311d,
45d,
90d,
18.946300807438607d,
35.0d, +23.2320597d, +30.00053311d, 45d, 90d, 18.946300807438607d,
), // Kalogirou - Solar Energy Engineering Example 2.7 changed to 90° panel azimuth to WEST
(
35.0d,
+23.2320597d,
+74.648850625d,
45d,
90d,
21.95480347380729d,
35.0d, +23.2320597d, +74.648850625d, 45d, 90d, 21.95480347380729d,
), // Kalogirou - Solar Energy Engineering Example 2.7 90° panel azimuth to WEST at 17:00
(
35.0d,
+23.2320597d,
+74.648850625d,
45d,
-90d,
109.00780288303966d,
35.0d, +23.2320597d, +74.648850625d, 45d, -90d, 109.00780288303966d,
), // Kalogirou - Solar Energy Engineering Example 2.7 90° panel azimuth to EAST at 17:00
(
27.96d,
-17.51d,
-11.1d,
30d,
+10d,
22.384603601536398d,
27.96d, -17.51d, -11.1d, 30d, +10d, 22.384603601536398d,
), // Goswami Principles of Solar Engineering Example 2.7a
(
-35.3d,
-17.51d,
-4.2d,
30d,
+170d,
14.882390116876563d,
-35.3d, -17.51d, -4.2d, 30d, +170d, 14.882390116876563d,
), // Goswami Principles of Solar Engineering Example 2.7b
(40d, -11.6d, 82.5d, 60d, 0d, 79.11011928744357d),
(40d, -11.6d, -82.5d, 60d, 0d,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,32 @@ import scala.jdk.CollectionConverters._

/** Test data for a [[Transformer2WInput]].
*
* Transformer type: d_v = 1.5 % tap_min = -13 tap_max = 13 tap_neut = 0
* is_autotap = true tapSide = high voltage side (ConnectorPort.B -> None in
* [[edu.ie3.simona.model.grid.TransformerTappingModel]]) r = 30.25 Ω x =
* 4.5375 Ω g = 0 b = 1.1 nS s_rated = 40000 kVA
* -> iNomHv = 209.9455524325912 A
* -> iNomLv = 2309.401076758503 A capex = 100.000 € opex = 0 €
* {{{
* Transformer type:
* d_v = 1.5 %
* tap_min = -13
* tap_max = 13
* tap_neut = 0
* is_autotap = true
* tapSide = high voltage side (ConnectorPort.B -> None in
* [[edu.ie3.simona.model.grid.TransformerTappingModel]])
* r = 30.25 Ω
* x = 4.5375 Ω
* g = 0
* b = 1.1 nS
* s_rated = 40000 kVA -> iNomHv = 209.9455524325912 A
* -> iNomLv = 2309.401076758503 A
* capex = 100.000 €
* opex = 0 €
*
* Transformer model: tap_side = hv (element port A) tap_pos = 0 auto_tap =
* false amount = 1 vHv = 110 kV vLv = 10 kV
* Transformer model:
* tap_side = hv (element port A)
* tap_pos = 0
* auto_tap = false
* amount = 1
* vHv = 110 kV
* vLv = 10 kV
* }}}
*/
trait TransformerInputTestData extends DefaultTestData {
private val nodeA = new NodeInput(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,16 +41,29 @@ import javax.measure.quantity.ElectricPotential
*
* Reference System: 400 kVA @ 10 kV --> Reference admittance: 4 mS
*
* Transformer type: d_v = 1.5 % tap_min = -13 tap_max = 13 tap_neut = 0
* is_autotap = true tapSide = high voltage side (ConnectorPort.B -> None in
* [[TransformerTappingModel]]) r = 30.25 Ω -> 0.001 p.u. x = 4.5375 Ω ->
* 0.00015 p.u. g = 0 -> 0.0 p.u. b = 1.1 nS -> -0.000033275 p.u.K s_rated =
* 40000 kVA
* -> iNomHv = 209.9455524325912 A
* -> iNomLv = 2309.401076758503 A
* {{{
* Transformer type:
* d_v = 1.5 %
* tap_min = -13
* tap_max = 13
* tap_neut = 0
* is_autotap = true
* tapSide = high voltage side (ConnectorPort.B -> None in
* [[TransformerTappingModel]])
* r = 30.25 Ω -> 0.001 p.u.
* x = 4.5375 Ω -> 0.00015 p.u.
* g = 0 -> 0.0 p.u.
* b = 1.1 nS -> -0.000033275 p.u.K
* s_rated = 40000 kVA -> iNomHv = 209.9455524325912 A
* -> iNomLv = 2309.401076758503 A
*
* Transformer model: tap_side = hv (element port A) tap_pos = 0 amount = 1 vHv
* \= 110 kV (node 6) vLv = 10 kV (node 3)
* Transformer model:
* tap_side = hv (element port A)
* tap_pos = 0
* amount = 1
* vHv = 110 kV (node 6)
* vLv = 10 kV (node 3)
* }}}
*
* Transformer admittance matrix data: gij = bij = g0 hv = 0 b0 hv =
* -0.0000166375 // todo CK check g0 lv = b0 lv =
Expand Down