Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into to/#160-adjust-useresg…
Browse files Browse the repository at this point in the history
…uide
  • Loading branch information
ckittl committed Mar 15, 2022
2 parents 539848e + 03d6d10 commit f2820b2
Show file tree
Hide file tree
Showing 14 changed files with 37 additions and 25 deletions.
13 changes: 12 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,22 @@ updates:
- johanneshiry
- t-ober
- sensarmad
- sebastian-peter
- danielfeismann
ignore:
- dependency-name: org.spockframework:spock-core
versions:
- 2.1-groovy-3.0-SNAPSHOT
- 2.1-groovy-2.5-SNAPSHOT
- 2.1-groovy-3.0-SNAPSHOT
- 2.2-groovy-4.0-SNAPSHOT
- 2.2-groovy-2.5-SNAPSHOT
- 2.2-groovy-3.0-SNAPSHOT
- 2.2-M1-groovy-2.5
- 2.2-M1-groovy-3.0
- 2.2-M1-groovy-4.0
- 2.2-M2-groovy-2.5
- 2.2-M2-groovy-3.0
- 2.2-M2-groovy-4.0
- dependency-name: org.scalatest:scalatest_2.13
versions:
- 3.3.0-SNAP+
Expand Down
12 changes: 6 additions & 6 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ plugins {
id 'com.diffplug.spotless' version '6.3.0'// code format
id 'com.github.onslip.gradle-one-jar' version '1.0.6' // pack a self contained jar
id "com.github.ben-manes.versions" version '0.42.0'
id "de.undercouch.download" version "5.0.1" // downloads plugin
id "de.undercouch.download" version "5.0.2" // downloads plugin
id "kr.motd.sphinx" version "2.10.1" // documentation generation
id "com.github.johnrengelman.shadow" version "7.1.2" // fat jar
id "org.sonarqube" version "3.3" // sonarqube
Expand Down Expand Up @@ -96,12 +96,12 @@ dependencies {

/* logging */
implementation "com.typesafe.scala-logging:scala-logging_${scalaVersion}:3.9.4" // akka scala logging
implementation "ch.qos.logback:logback-classic:1.2.10"
implementation "ch.qos.logback:logback-classic:1.2.11"

/* testing */
testImplementation 'org.spockframework:spock-core:2.1-M2-groovy-3.0'
testImplementation 'org.spockframework:spock-core:2.1-groovy-3.0'
testImplementation 'org.scalatestplus:mockito-3-4_2.13:3.2.10.0'
implementation 'org.mockito:mockito-core:4.3.1' // mocking framework
implementation 'org.mockito:mockito-core:4.4.0' // mocking framework
testImplementation "org.scalatest:scalatest_${scalaVersion}:3.2.11"
testRuntimeClasspath 'com.vladsch.flexmark:flexmark-all:0.64.0'
testImplementation group: 'org.pegdown', name: 'pegdown', version: '1.6.0'
Expand Down Expand Up @@ -136,13 +136,13 @@ dependencies {
scalaCompilerPlugin "com.sksamuel.scapegoat:scalac-scapegoat-plugin_${scalaBinaryVersion}:${scapegoatVersion}"

implementation 'org.apache.commons:commons-math3:3.6.1' // apache commons math3
implementation 'org.apache.poi:poi-ooxml:5.2.0' // used for FilenameUtils
implementation 'org.apache.poi:poi-ooxml:5.2.1' // used for FilenameUtils
implementation 'javax.measure:unit-api:2.1.3'
implementation 'tech.units:indriya:2.1.3' // quantities
implementation 'org.apache.commons:commons-csv:1.9.0'
implementation 'org.scalanlp:breeze_2.13:1.3' // scientific calculations (http://www.scalanlp.org/)
implementation 'de.lmu.ifi.dbs.elki:elki:0.7.5' // Statistics (for random load model)
implementation 'com.google.guava:guava:31.0.1-jre' // Building threads
implementation 'com.google.guava:guava:31.1-jre' // Building threads
implementation 'org.jgrapht:jgrapht-core:1.5.1'
}

Expand Down
2 changes: 1 addition & 1 deletion input/samples/vn_simona/fullGrid/pv_input.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"uuid","albedo","azimuth","cos_phi_rated","eta_conv","height","id","k_g","k_t","market_reaction","node","operates_from","operates_until","operator","q_characteristics","s_rated"
"uuid","albedo","azimuth","cos_phi_rated","eta_conv","elevation_angle","id","k_g","k_t","market_reaction","node","operates_from","operates_until","operator","q_characteristics","s_rated"
5b38af42-1ee4-4a41-b666-ea141187df37,0.20000000298023224,-11.463644027709961,0.8999999761581421,96.0,33.62879943847656,NS_NET146_F2_(3)_PV,0.8999999761581421,1.0,false,0170837a-1876-45f9-a613-666f9991964d,,,,cosPhiFixed:{(0.00,0.90)},10.0
e447506e-3d43-4bce-8aab-a7ca8b7fbc45,0.20000000298023224,3.8914573192596436,0.8999999761581421,98.0,42.77021408081055,NS_NET146_F4_(9)_PV,0.8999999761581421,1.0,false,9b889b73-c108-4b38-b6eb-3377841e0c83,,,,cosPhiFixed:{(0.00,0.90)},10.0
6cac0624-6336-4418-bcf0-990abcdb824b,0.20000000298023224,-8.097375869750977,0.8999999761581421,98.0,44.90728759765625,NS_NET146_F4_(16)_PV,0.8999999761581421,1.0,false,9f7599de-c488-46c5-b053-1279a511f7b9,,,,cosPhiFixed:{(0.00,0.90)},30.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,7 @@ case object PVModel {
inputModel.getAlbedo,
inputModel.getEtaConv,
inputModel.getAzimuth,
inputModel.getHeight
inputModel.getElevationAngle
)

model.enable()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
package edu.ie3.simona.service.primary

import akka.actor.{Actor, ActorRef, PoisonPill, Props}
import edu.ie3.datamodel.io.connectors.CsvFileConnector.CsvIndividualTimeSeriesMetaInformation
import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme
import edu.ie3.datamodel.io.csv.CsvIndividualTimeSeriesMetaInformation
import edu.ie3.datamodel.io.naming.FileNamingStrategy
import edu.ie3.datamodel.io.naming.timeseries.ColumnScheme
import edu.ie3.datamodel.io.source.TimeSeriesMappingSource
import edu.ie3.datamodel.io.source.csv.CsvTimeSeriesMappingSource
import edu.ie3.datamodel.models.value.Value
Expand Down Expand Up @@ -148,7 +148,7 @@ case class PrimaryServiceProxy(
.distinct
.flatMap { timeSeriesUuid =>
mappingSource
.getTimeSeriesMetaInformation(timeSeriesUuid)
.timeSeriesMetaInformation(timeSeriesUuid)
.toScala match {
case Some(metaInformation) =>
val columnScheme = metaInformation.getColumnScheme
Expand Down Expand Up @@ -386,7 +386,7 @@ case class PrimaryServiceProxy(
None
) =>
/* The mapping and actual data sources are from csv. At first, get the file name of the file to read. */
Try(mappingSource.getTimeSeriesMetaInformation(timeSeriesUuid).get)
Try(mappingSource.timeSeriesMetaInformation(timeSeriesUuid).get)
.flatMap {
/* Time series meta information could be successfully obtained */
case csvMetaData: CsvIndividualTimeSeriesMetaInformation =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
package edu.ie3.simona.service.primary

import akka.actor.{ActorRef, Props}
import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme
import edu.ie3.datamodel.io.factory.timeseries.TimeBasedSimpleValueFactory
import edu.ie3.datamodel.io.naming.FileNamingStrategy
import edu.ie3.datamodel.io.naming.timeseries.ColumnScheme
import edu.ie3.datamodel.io.source.TimeSeriesSource
import edu.ie3.datamodel.io.source.csv.CsvTimeSeriesSource
import edu.ie3.datamodel.models.value.Value
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,7 @@ object WeatherSource {
*/
object WeatherScheme extends ParsableEnumeration {
val ICON: Value = Value("icon")
val PSDM: Value = Value("psdm")
val COSMO: Value = Value("cosmo")
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import edu.ie3.datamodel.io.connectors.{
}
import edu.ie3.datamodel.io.factory.timeseries.{
IconTimeBasedWeatherValueFactory,
PsdmTimeBasedWeatherValueFactory
CosmoTimeBasedWeatherValueFactory
}
import edu.ie3.datamodel.io.naming.FileNamingStrategy
import edu.ie3.datamodel.io.source.couchbase.CouchbaseWeatherSource
Expand Down Expand Up @@ -357,7 +357,8 @@ private[weather] object WeatherSourceWrapper extends LazyLogging {
.mkString("\n\t")}'"
)
case Success(WeatherScheme.ICON) => new IconTimeBasedWeatherValueFactory()
case Success(WeatherScheme.PSDM) => new PsdmTimeBasedWeatherValueFactory()
case Success(WeatherScheme.COSMO) =>
new CosmoTimeBasedWeatherValueFactory()
case Success(unknownScheme) =>
throw new InitializationException(
s"Error while initializing WeatherFactory for weather source wrapper: weather scheme '$unknownScheme' is not an expected input."
Expand All @@ -373,8 +374,8 @@ private[weather] object WeatherSourceWrapper extends LazyLogging {
)
case Success(WeatherScheme.ICON) =>
new IconTimeBasedWeatherValueFactory(timeStampPattern)
case Success(WeatherScheme.PSDM) =>
new PsdmTimeBasedWeatherValueFactory(timeStampPattern)
case Success(WeatherScheme.COSMO) =>
new CosmoTimeBasedWeatherValueFactory(timeStampPattern)
case Success(unknownScheme) =>
throw new InitializationException(
s"Error while initializing WeatherFactory for weather source wrapper: weather scheme '$unknownScheme' is not an expected input."
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ trait PVModelITHelper {
inputModel.getAlbedo(),
inputModel.getEtaConv(),
inputModel.getAzimuth(),
inputModel.getHeight(),
inputModel.getElevationAngle(),
getQuantity(1d, SQUARE_METRE)
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ class PVModelTest extends Specification {
pvInput.getAlbedo(),
pvInput.getEtaConv() as ComparableQuantity<Dimensionless>,
getQuantity(Math.toRadians(pvInput.getAzimuth().getValue().doubleValue()), RADIAN),
getQuantity(Math.toRadians(pvInput.getHeight().getValue().doubleValue()), RADIAN),
getQuantity(Math.toRadians(pvInput.getElevationAngle().getValue().doubleValue()), RADIAN),
getQuantity(1d, SQUARE_METRE)
)
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
"uuid";"albedo";"azimuth";"cosphi_rated";"eta_conv";"height";"id";"k_g";"k_t";"market_reaction";"operates_from";"operates_until";"s_rated";"q_characteristics";"node";"operator"
"uuid";"albedo";"azimuth";"cosphi_rated";"eta_conv";"elevation_angle";"id";"k_g";"k_t";"market_reaction";"operates_from";"operates_until";"s_rated";"q_characteristics";"node";"operator"
7ac5bb15-36ee-42b0-902b-9cd520e241b3;0.2;16.09490984119475;0.95;91.23978812713176;51.75144341774285;pv_south_1;0.9;1;false;;;100;cosPhiFixed:{(0.00,1.0)};022a94c6-2d60-4400-875c-ab9db1ae2736;
939d254a-98b9-43d9-939d-dac9d91e7d73;0.2;-11.883286549709737;0.95;93.55452200165019;50.710754711180925;pv_south_2;0.9;1;false;;;100;cosPhiFixed:{(0.00,1.0)};9a2524f1-3639-4e90-a547-81a259712f8c;
e3b34366-9a4b-4e8f-b46d-fccdd3c318b3;0.2;-3.6445723846554756;0.95;90.07983175106347;50.727743320167065;pv_south_3;0.9;1;false;;;100;cosPhiFixed:{(0.00,1.0)};9354b02c-a4a9-4e9d-905a-e48110b04d88;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,7 +875,7 @@ class ConfigFailFastSpec extends UnitSpec with ConfigTestData {
ConfigFailFast invokePrivate checkWeatherDataSource(
weatherDataSource
)
}.getMessage shouldBe "The weather data scheme 'this won't work' is not supported. Supported schemes:\n\ticon\n\tpsdm"
}.getMessage shouldBe "The weather data scheme 'this won't work' is not supported. Supported schemes:\n\ticon\n\tcosmo"
}

}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ import akka.actor.{ActorRef, ActorSystem, PoisonPill}
import akka.testkit.{TestActorRef, TestProbe}
import akka.util.Timeout
import com.typesafe.config.ConfigFactory
import edu.ie3.datamodel.io.csv.timeseries.ColumnScheme
import edu.ie3.datamodel.io.naming.FileNamingStrategy
import edu.ie3.datamodel.io.naming.timeseries.ColumnScheme
import edu.ie3.datamodel.io.source.TimeSeriesMappingSource
import edu.ie3.datamodel.io.source.csv.CsvTimeSeriesMappingSource
import edu.ie3.datamodel.models.value.{SValue, Value}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ trait PvInputTestData
1,
Quantities.getQuantity(12, StandardUnits.AZIMUTH),
Quantities.getQuantity(10, StandardUnits.EFFICIENCY),
Quantities.getQuantity(100, StandardUnits.SOLAR_HEIGHT),
Quantities.getQuantity(100, StandardUnits.SOLAR_ELEVATION_ANGLE),
12,
11,
false,
Expand Down

0 comments on commit f2820b2

Please sign in to comment.