[Git][java-team/libeuclid-java][master] 5 commits: New upstream version 2.8
Andrius Merkys (@merkys)
gitlab at salsa.debian.org
Tue Feb 20 06:49:46 GMT 2024
Andrius Merkys pushed to branch master at Debian Java Maintainers / libeuclid-java
Commits:
926c3a50 by Andrius Merkys at 2024-02-19T02:48:06-05:00
New upstream version 2.8
- - - - -
e7ab891f by Andrius Merkys at 2024-02-19T02:48:12-05:00
Update upstream source from tag 'upstream/2.8'
Update to upstream version '2.8'
with Debian dir 40f599cabe2bebf3591c0492b23632f1993e3f5c
- - - - -
a060d613 by Andrius Merkys at 2024-02-20T01:24:08-05:00
Add missing copyright stanza.
- - - - -
acdfb520 by Andrius Merkys at 2024-02-20T01:24:38-05:00
Update changelog for 2.8-1 release
- - - - -
25a99fb9 by Andrius Merkys at 2024-02-20T01:28:29-05:00
Build depends on libmaven-enforcer-plugin-java.
- - - - -
21 changed files:
- .github/workflows/maven.yml
- CITATION.cff
- README.md
- debian/changelog
- debian/control
- debian/copyright
- pom.xml
- src/main/java/org/xmlcml/euclid/IntSet.java
- src/main/java/org/xmlcml/euclid/ParsedSymop.java
- src/main/java/org/xmlcml/euclid/Point3Vector.java
- src/main/java/org/xmlcml/euclid/Real2.java
- src/main/java/org/xmlcml/euclid/RealRange.java
- src/main/java/org/xmlcml/euclid/Util.java
- src/main/java/org/xmlcml/stml/STMLArray.java
- src/main/java/org/xmlcml/stml/attribute/DoubleSTAttribute.java
- + src/test/java/org/xmlcml/stml/STMLArrayTest.java
- + src/test/java/org/xmlcml/stml/STMLAttributeTest.java
- + src/test/java/org/xmlcml/stml/STMLElementTest.java
- + src/test/java/org/xmlcml/stml/STMLScalarTest.java
- + src/test/java/org/xmlcml/stml/STMLTypeTest.java
- src/main/java/org/xmlcml/testutil/TestUtils.java → src/test/java/org/xmlcml/testutil/TestUtils.java
Changes:
=====================================
.github/workflows/maven.yml
=====================================
@@ -14,13 +14,28 @@ jobs:
name: Java ${{ matrix.java }}
steps:
- - uses: actions/checkout at v3
+ - uses: actions/checkout at v4
- name: Set up Java
- uses: actions/setup-java at v3
+ uses: actions/setup-java at v4
with:
distribution: 'temurin'
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn clean install -Dgpg.skip -Dmaven.javadoc.skip=true
+
+ coverage:
+ runs-on: ubuntu-latest
+ needs: build
+ steps:
+ - uses: actions/checkout at v4
+ - name: Set up Java
+ uses: actions/setup-java at v4
+ with:
+ distribution: temurin
+ java-version: 8
+ - name: Build with Maven
+ run: mvn clean install -Dgpg.skip -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=true
- name: Upload coverage reports to Codecov
- uses: codecov/codecov-action at v3
+ uses: codecov/codecov-action at v4
+ with:
+ token: ${{ secrets.CODECOV_TOKEN }}
=====================================
CITATION.cff
=====================================
@@ -1,8 +1,8 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
title: Euclid
-version: 2.7
-date-released: 2023-12-18
+version: 2.8
+date-released: 2024-02-17
url: "https://github.com/BlueObelisk/euclid"
preferred-citation:
type: article
=====================================
README.md
=====================================
@@ -17,7 +17,7 @@ It's used a lot in CML tools (JUMBO, JUMBO-converters) and also AMI (for extract
Instructions to increase the version:
```shell
-mvn versions:set -DnewVersion=2.8-SNAPSHOT
+mvn versions:set -DnewVersion=2.9-SNAPSHOT
```
Deploy to Sonatype with the following commands, for snapshots and releases respectively:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,10 @@
+libeuclid-java (2.8-1) unstable; urgency=medium
+
+ * New upstream version 2.8
+ * Add missing copyright stanza.
+
+ -- Andrius Merkys <merkys at debian.org> Tue, 20 Feb 2024 01:24:30 -0500
+
libeuclid-java (2.7-1) unstable; urgency=medium
* New upstream version 2.7
=====================================
debian/control
=====================================
@@ -14,6 +14,7 @@ Build-Depends-Indep:
libcommons-math-java (>= 2.2),
libjoda-time-java (>= 1.6.2),
liblog4j2-java,
+ libmaven-enforcer-plugin-java,
libmaven-javadoc-plugin-java (>= 3.0.1),
libxom-java (>= 1.2.10-2),
Standards-Version: 4.6.2
=====================================
debian/copyright
=====================================
@@ -33,6 +33,10 @@ Files: src/main/java/org/xmlcml/euclid/RandomNumberGenerator.java
Copyright: 2000, Sundar Dorai-Raj
License: Apache-2.0 and GPL-2+
+Files: src/test/java/org/xmlcml/stml/*
+Copyright: 2024, Egon Willighagen <egonw at users.sf.net>
+License: Apache-2.0
+
Files: debian/*
Copyright: 2019-2024, Andrius Merkys <merkys at debian.org>
License: Apache-2.0
=====================================
pom.xml
=====================================
@@ -3,7 +3,7 @@
<groupId>org.blueobelisk</groupId>
<artifactId>euclid</artifactId>
- <version>2.7</version>
+ <version>2.8</version>
<packaging>jar</packaging>
<properties>
@@ -68,10 +68,33 @@
<build>
<plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>3.4.1</version>
+ <executions>
+ <execution>
+ <id>enforce-maven</id>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>3.2.5</version>
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>1.8</version>
+ </requireJavaVersion>
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.10.1</version>
+ <version>3.12.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
@@ -80,7 +103,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>3.4.1</version>
+ <version>3.6.3</version>
<executions>
<execution>
<id>attach-javadocs</id>
@@ -101,7 +124,7 @@
</plugin>
<plugin>
<artifactId>maven-source-plugin</artifactId>
- <version>3.2.1</version>
+ <version>3.3.0</version>
<executions>
<execution>
<id>attach-sources</id>
@@ -178,7 +201,7 @@
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
- <version>1.6.8</version>
+ <version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
@@ -189,7 +212,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
- <version>1.6</version>
+ <version>3.1.0</version>
<executions>
<execution>
<id>sign-artifacts</id>
@@ -203,7 +226,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
- <version>0.8.8</version>
+ <version>0.8.11</version>
<executions>
<execution>
<id>start-agent</id>
@@ -249,18 +272,18 @@
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j</artifactId>
- <version>2.22.0</version>
+ <version>2.22.1</version>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-1.2-api</artifactId>
- <version>2.22.0</version>
+ <version>2.22.1</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId>
- <version>2.22.0</version>
+ <version>2.22.1</version>
</dependency>
<dependency>
@@ -277,7 +300,7 @@
<dependency>
<groupId>joda-time</groupId>
<artifactId>joda-time</artifactId>
- <version>2.12.5</version>
+ <version>2.12.7</version>
</dependency>
<dependency>
=====================================
src/main/java/org/xmlcml/euclid/IntSet.java
=====================================
@@ -276,7 +276,7 @@ public class IntSet implements EuclidConstants {
* @return tur if contains
*/
public boolean contains(int value) {
- return set.contains(new Integer(value));
+ return set.contains(Integer.valueOf(value));
}
/**
@@ -476,7 +476,7 @@ public class IntSet implements EuclidConstants {
if (number.equals(0)) {
listList.add(new ArrayList<Integer>());
} else {
- List<List<Integer>> listListMinus = IntSet.getPermutations0(new Integer(number - 1));
+ List<List<Integer>> listListMinus = IntSet.getPermutations0(Integer.valueOf(number - 1));
for (List<Integer> listMinus : listListMinus) {
for (Integer ii = 0; ii < number; ii++) {
List<Integer> copyList = IntSet.copy(listMinus);
=====================================
src/main/java/org/xmlcml/euclid/ParsedSymop.java
=====================================
@@ -114,7 +114,7 @@ public class ParsedSymop {
if (!matched) {
throw new RuntimeException("Cannot parse as symmetry operator: "+s);
}
- number = (numberS != null) ? new Double(numberS) : ((fractS != null) ? calculateFract() : null);
+ number = (numberS != null) ? Double.valueOf(numberS) : ((fractS != null) ? calculateFract() : null);
}
public String getXyz() {
@@ -134,7 +134,7 @@ public class ParsedSymop {
if (!matcher.matches()) {
throw new RuntimeException("Cannot parse as fraction: "+fractS);
}
- return new Double(matcher.group(1))/new Double(matcher.group(2));
+ return Double.valueOf(matcher.group(1))/Double.valueOf(matcher.group(2));
}
// Pattern.compile(SIGNED_XYZ+"("+SIGNED_XYZ+"?)"); // signedxyz signedxyz?
=====================================
src/main/java/org/xmlcml/euclid/Point3Vector.java
=====================================
@@ -895,7 +895,7 @@ public class Point3Vector implements EuclidConstants {
RealArray cc = c.getXYZ();
tt = tt.subtract(cc);
return Math.sqrt(tt.innerProduct())
- / (new Double(size())).doubleValue();
+ / (Double.valueOf(size())).doubleValue();
}
/**
* get point furthest from another. useful for alignments
=====================================
src/main/java/org/xmlcml/euclid/Real2.java
=====================================
@@ -543,7 +543,7 @@ public class Real2 implements EuclidConstants {
for (int j = 0; j < p2Vector.size(); j++) {
p = p.plus(p2Vector.get(j));
}
- double scale = 1.0 / (new Double(p2Vector.size()).doubleValue());
+ double scale = 1.0 / (Double.valueOf(p2Vector.size()).doubleValue());
p = p.multiplyBy(scale);
return p;
}
=====================================
src/main/java/org/xmlcml/euclid/RealRange.java
=====================================
@@ -510,13 +510,13 @@ public class RealRange implements EuclidConstants, Comparable<RealRange> {
if (matcher.matches()) {
String minS = matcher.group(1);
String maxS = matcher.group(2);
- min = (ANY.equals(minS)) ? -Double.MAX_VALUE : new Double(minS);
- max = (ANY.equals(maxS)) ? Double.MAX_VALUE : new Double(maxS);
+ min = (ANY.equals(minS)) ? -Double.MAX_VALUE : Double.valueOf(minS);
+ max = (ANY.equals(maxS)) ? Double.MAX_VALUE : Double.valueOf(maxS);
} else {
matcher = CURLY_PATTERN1.matcher(token);
if (matcher.matches()) {
String minS = matcher.group(1);
- min = (ANY.equals(minS)) ? -Double.MAX_VALUE : new Double(minS);
+ min = (ANY.equals(minS)) ? -Double.MAX_VALUE : Double.valueOf(minS);
max = min;
}
}
=====================================
src/main/java/org/xmlcml/euclid/Util.java
=====================================
@@ -2770,7 +2770,7 @@ public class Util implements EuclidConstants {
public static boolean isInt(String s) {
boolean couldBeInt = true;
try {
- new Integer(s);
+ Integer.valueOf(s);
} catch (NumberFormatException e) {
couldBeInt = false;
}
@@ -2822,7 +2822,7 @@ public class Util implements EuclidConstants {
public static boolean isFloat(String s) {
boolean couldBeFloat = true;
try {
- new Double(s);
+ Double.valueOf(s);
} catch (NumberFormatException e) {
couldBeFloat = false;
}
@@ -2876,7 +2876,7 @@ public class Util implements EuclidConstants {
public static double getDouble(String s) {
double d = Double.NaN;
try {
- d = new Double(s).doubleValue();
+ d = Double.valueOf(s).doubleValue();
} catch (NumberFormatException nfe) {
throw new RuntimeException("Bad double: " + s);
}
@@ -3172,7 +3172,7 @@ class StringIntegerComparator implements Comparator<Object> {
if (ss.length() == 0) {
ss = "0";
}
- return new Integer(ss);
+ return Integer.valueOf(ss);
}
/** reverses lines in file.
=====================================
src/main/java/org/xmlcml/stml/STMLArray.java
=====================================
@@ -485,7 +485,7 @@ public class STMLArray extends STMLElement implements HasUnits, HasArraySize,
ii = new int[ss.length];
for (int i = 0; i < ii.length; i++) {
try {
- ii[i] = new Integer(ss[i]).intValue();
+ ii[i] = Integer.valueOf(ss[i]).intValue();
} catch (NumberFormatException nfe) {
throw new RuntimeException("Bad int (" + ss[i]
+ ") at position: " + i);
@@ -978,9 +978,9 @@ public class STMLArray extends STMLElement implements HasUnits, HasArraySize,
} else if (XSD_DATE.equals(dataType)) {
this.append(JodaDate.parseDate(content).toString());
} else if (XSD_DOUBLE.equals(dataType)) {
- this.append(new Double(content).doubleValue());
+ this.append(Double.valueOf(content).doubleValue());
} else if (XSD_INTEGER.equals(dataType)) {
- this.append(new Integer(content).intValue());
+ this.append(Integer.valueOf(content).intValue());
}
}
=====================================
src/main/java/org/xmlcml/stml/attribute/DoubleSTAttribute.java
=====================================
@@ -82,7 +82,7 @@ public class DoubleSTAttribute extends STMLAttribute {
public DoubleSTAttribute(DoubleSTAttribute att) {
super(att);
if (att.d != null) {
- this.d = new Double(att.d.doubleValue());
+ this.d = Double.valueOf(att.d.doubleValue());
}
}
@@ -152,7 +152,7 @@ public class DoubleSTAttribute extends STMLAttribute {
*/
public void setSTMLValue(double d) {
checkValue(d);
- this.d = new Double(d);
+ this.d = Double.valueOf(d);
this.setValue("" + d);
}
=====================================
src/test/java/org/xmlcml/stml/STMLArrayTest.java
=====================================
@@ -0,0 +1,37 @@
+/* Copyright 2024 Egon Willighagen <egonw at users.sf.net>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.xmlcml.stml;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import nu.xom.Element;
+
+public class STMLArrayTest {
+
+ @Test
+ public void testDefaultConstructor() {
+ STMLArray array = new STMLArray();
+ Assert.assertNotNull(array);
+ }
+
+ @Test
+ public void testCopy() {
+ STMLArray array = new STMLArray();
+ Element copy = array.copy();
+ Assert.assertTrue(copy instanceof STMLArray);
+ }
+
+}
=====================================
src/test/java/org/xmlcml/stml/STMLAttributeTest.java
=====================================
@@ -0,0 +1,38 @@
+/* Copyright 2024 Egon Willighagen <egonw at users.sf.net>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.xmlcml.stml;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+import nu.xom.Attribute;
+
+public class STMLAttributeTest {
+
+ @Test
+ public void testDefaultConstructor() {
+ STMLAttribute attribute = new STMLAttribute("naam");
+ Assert.assertNotNull(attribute);
+ Assert.assertEquals("naam", attribute.getLocalName());
+ }
+
+ @Test
+ public void testCopy() {
+ STMLAttribute attribute = new STMLAttribute("naam");
+ Attribute copy = attribute.copy();
+ Assert.assertTrue(copy instanceof STMLAttribute);
+ }
+
+}
=====================================
src/test/java/org/xmlcml/stml/STMLElementTest.java
=====================================
@@ -0,0 +1,28 @@
+/* Copyright 2024 Egon Willighagen <egonw at users.sf.net>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.xmlcml.stml;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class STMLElementTest {
+
+ @Test
+ public void testDefaultConstructor() {
+ STMLElement element = new STMLElement();
+ Assert.assertNotNull(element);
+ }
+
+}
=====================================
src/test/java/org/xmlcml/stml/STMLScalarTest.java
=====================================
@@ -0,0 +1,28 @@
+/* Copyright 2024 Egon Willighagen <egonw at users.sf.net>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.xmlcml.stml;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class STMLScalarTest {
+
+ @Test
+ public void testDefaultConstructor() {
+ STMLScalar scalar = new STMLScalar();
+ Assert.assertNotNull(scalar);
+ }
+
+}
=====================================
src/test/java/org/xmlcml/stml/STMLTypeTest.java
=====================================
@@ -0,0 +1,28 @@
+/* Copyright 2024 Egon Willighagen <egonw at users.sf.net>
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.xmlcml.stml;
+
+import org.junit.Assert;
+import org.junit.Test;
+
+public class STMLTypeTest {
+
+ @Test
+ public void testDefaultConstructor() {
+ STMLType type = new STMLType();
+ Assert.assertEquals(0, type.getSummary().length());
+ }
+
+}
=====================================
src/main/java/org/xmlcml/testutil/TestUtils.java → src/test/java/org/xmlcml/testutil/TestUtils.java
=====================================
@@ -296,8 +296,8 @@ public final class TestUtils implements STMLConstants {
Error ee = null;
try {
try {
- testVal = new Double(testValue).doubleValue();
- refVal = new Double(refValue).doubleValue();
+ testVal = Double.valueOf(testValue).doubleValue();
+ refVal = Double.valueOf(refValue).doubleValue();
Assert.assertEquals(message + " doubles ", refVal, testVal,
eps);
} catch (NumberFormatException e) {
View it on GitLab: https://salsa.debian.org/java-team/libeuclid-java/-/compare/2fd350e2efd74ec6494eb8a5cc1c4f81b34a8024...25a99fb92f088136aced019077359986fc83b52b
--
View it on GitLab: https://salsa.debian.org/java-team/libeuclid-java/-/compare/2fd350e2efd74ec6494eb8a5cc1c4f81b34a8024...25a99fb92f088136aced019077359986fc83b52b
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20240220/0155ff84/attachment.htm>
More information about the pkg-java-commits
mailing list