Skip to content

Commit 6dd93ef

Browse files
authored
Merge pull request #52 from ie3-institute/ck/v1.4-release
Preparing v 1.4 release
2 parents 98f19ca + 84a5475 commit 6dd93ef

12 files changed

+165
-425
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7-
## [Unreleased/Snapshot]
7+
## [1.4]
88

99
### Added
1010
- Introduction of EmptyQuantity, a representation for null value Quantities
@@ -14,7 +14,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1414
- Improved implementation of `StandardUnits.PU`
1515
- BREAKING: replaced Unit API 1.0 (JSR 363, tec.uom.se) with Unit API 2.0 (JSR 385, tech.units.indriya)
1616

17-
### Fixed
17+
### Removed
18+
- Deprecated methods in `GeoUtils`
19+
- Deprecated `TimeTools`
1820

1921
## [1.3.2]
2022

@@ -40,3 +42,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4042

4143
### Fixed
4244
- fixes + extensions in StandardUnits
45+
46+
[1.4]: https://github.com/ie3-institute/powersystemutils/compare/v1.3.2...v1.4
47+
[1.3.2]: https://github.com/ie3-institute/powersystemutils/compare/v1.3.1...v1.3.2
48+
[1.3.1]: https://github.com/ie3-institute/powersystemutils/compare/64283b769d1faeac0a6468b0f225f5e995741cdd...v1.3.1

build.gradle

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
plugins {
2-
id "com.jfrog.artifactory" version "4.9.7"
2+
id "com.jfrog.artifactory" version "4.18.0"
33
id 'groovy' // groovy support
44
id 'java' // java support
55
id 'maven-publish'
66
id 'signing'
77
id 'pmd' //code check, working on source code
8-
id 'com.github.spotbugs' version '2.0.0' //code check, working on byte code
9-
id 'com.diffplug.gradle.spotless' version '3.27.1'//code format
10-
id 'com.simonharrer.modernizer' version '1.6.0-1' //detect deprecated APIs
8+
id 'com.github.spotbugs' version '4.6.0' //code check, working on byte code
9+
id 'com.diffplug.spotless' version '5.7.0'//code format
10+
id 'com.simonharrer.modernizer' version '2.1.0-1' //detect deprecated APIs
1111
id 'com.github.onslip.gradle-one-jar' version '1.0.5' // pack a self contained jar
1212
id 'jacoco' // java code coverage plugin
13-
id "org.sonarqube" version "2.7.1" // sonarqube
13+
id "org.sonarqube" version "3.0" // sonarqube
1414
}
1515

1616
ext {
1717
// version (changing these should be considered thoroughly!)
1818
hibernateVersion = '5.3.3.Final'
19-
slf4jVersion = '1.7.26'
19+
slf4jVersion = '1.7.30'
2020
javaVersion = JavaVersion.VERSION_1_8
2121

2222
scriptsLocation = 'gradle' + File.separator + 'scripts' + File.separator //location of script plugins
2323
}
2424

2525
group = 'com.github.ie3-institute'
26-
version = '1.4-SNAPSHOT'
26+
version = '1.4'
2727
description = 'PowerSystemUtils'
2828
sourceCompatibility = javaVersion
2929
targetCompatibility = javaVersion
@@ -67,7 +67,6 @@ dependencies {
6767
testCompile 'org.spockframework:spock-core:1.3-groovy-+'
6868

6969
spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:+' // find bugs in java programs
70-
7170
}
7271

7372
wrapper {

gradle/scripts/spotless.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ spotless {
1818
groovy {
1919
licenseHeader ie3LicHead
2020
excludeJava() // excludes all Java sources within the Groovy source dirs from formatting
21-
paddedCell() // Avoid cyclic ambiguities
2221
// the Groovy Eclipse formatter extends the Java Eclipse formatter,
2322
// so it formats Java files by default (unless `excludeJava` is used).
2423
greclipse()

src/main/java/edu/ie3/util/ArrayHelper.java

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,13 @@
88
import org.apache.commons.math3.complex.Complex;
99

1010
/**
11-
* Contains convenience methos for arrays
11+
* Contains convenience methods for arrays
1212
*
1313
* @author roemer
1414
*/
1515
public class ArrayHelper {
16+
private static final String ARRAY_DIMENSION_MISMATCH_MESSAGE =
17+
"Both arrays may have the same dimension.";
1618

1719
private ArrayHelper() {}
1820

@@ -45,12 +47,12 @@ public static boolean arrayContainsValue(int[] arr, int value) {
4547
/**
4648
* Element wise addition of two double arrays
4749
*
48-
* @param a Array of double values for the first summand
49-
* @param b Array of double values for the second summand
50+
* @param a Array of double values for the first addend
51+
* @param b Array of double values for the second addend
5052
* @return c Double array with the summation of a and b
5153
*/
5254
public static double[] add(double[] a, double[] b) {
53-
assert a.length == b.length : "Both arrays may have the same dimension.";
55+
if (a.length != b.length) throw new IllegalArgumentException(ARRAY_DIMENSION_MISMATCH_MESSAGE);
5456
double[] c = new double[a.length];
5557
for (int i = 0; i < c.length; i++) {
5658
c[i] = a[i] + b[i];
@@ -61,12 +63,12 @@ public static double[] add(double[] a, double[] b) {
6163
/**
6264
* Element wise addition of two double arrays
6365
*
64-
* @param a Array of {@link Complex} values for the first summand
65-
* @param b Array of {@link Complex} values for the second summand
66+
* @param a Array of {@link Complex} values for the first addend
67+
* @param b Array of {@link Complex} values for the second addend
6668
* @return c Double array with the summation of a and b
6769
*/
6870
public static Complex[] add(Complex[] a, Complex[] b) {
69-
assert a.length == b.length : "Both arrays may have the same dimension.";
71+
if (a.length != b.length) throw new IllegalArgumentException(ARRAY_DIMENSION_MISMATCH_MESSAGE);
7072
Complex[] c = new Complex[a.length];
7173
for (int i = 0; i < c.length; i++) {
7274
c[i] = a[i].add(b[i]);
@@ -82,7 +84,7 @@ public static Complex[] add(Complex[] a, Complex[] b) {
8284
* @return The Array of double values built by subtraction
8385
*/
8486
public static double[] subtract(double[] a, double[] b) {
85-
assert a.length == b.length : "Both arrays may have the same dimension.";
87+
if (a.length != b.length) throw new IllegalArgumentException(ARRAY_DIMENSION_MISMATCH_MESSAGE);
8688
double[] c = new double[a.length];
8789
for (int i = 0; i < c.length; i++) {
8890
c[i] = a[i] - b[i];
@@ -98,7 +100,7 @@ public static double[] subtract(double[] a, double[] b) {
98100
* @return The Array of {@link Complex} values built by subtraction
99101
*/
100102
public static Complex[] subtract(Complex[] a, Complex[] b) {
101-
assert a.length == b.length : "Both arrays may have the same dimension.";
103+
if (a.length != b.length) throw new IllegalArgumentException(ARRAY_DIMENSION_MISMATCH_MESSAGE);
102104
Complex[] c = new Complex[a.length];
103105
for (int i = 0; i < c.length; i++) {
104106
c[i] = a[i].subtract(b[i]);

src/main/java/edu/ie3/util/TimeTools.java

Lines changed: 0 additions & 240 deletions
This file was deleted.

0 commit comments

Comments
 (0)