From c4feeb1aeebff7cb4399c99e1c4e9edf9140c2e4 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Sat, 10 Dec 2022 15:05:31 -0500 Subject: [PATCH 1/7] Fixed list-to-array conversion. --- src/main/java/edu/pitt/dbmi/causal/cmd/Args.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/edu/pitt/dbmi/causal/cmd/Args.java b/src/main/java/edu/pitt/dbmi/causal/cmd/Args.java index 1c8fd0a..1663dfe 100644 --- a/src/main/java/edu/pitt/dbmi/causal/cmd/Args.java +++ b/src/main/java/edu/pitt/dbmi/causal/cmd/Args.java @@ -72,7 +72,7 @@ public static String[] removeLongOption(String[] args, String option) { } } - return argsToKeep.toArray(String[]::new); + return argsToKeep.stream().toArray(String[]::new); } /** @@ -143,7 +143,7 @@ public static String[] extractLongOptions(String[] args, Options options) { } }); - return argsList.toArray(String[]::new); + return argsList.stream().toArray(String[]::new); } /** @@ -179,7 +179,7 @@ public static String[] extractOptions(String[] args, Options options) { } }); - return argsList.toArray(String[]::new); + return argsList.stream().toArray(String[]::new); } /** From b45dca7d57e32795dfff342248bfd42577aa9d3e Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Sat, 10 Dec 2022 20:19:29 -0500 Subject: [PATCH 2/7] Bumped up project version number. --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index c98fb3c..16ef83b 100644 --- a/pom.xml +++ b/pom.xml @@ -3,7 +3,7 @@ 4.0.0 edu.pitt.dbmi causal-cmd - 1.4.1-SNAPSHOT + 1.4.2 jar From 36a00de37ad9e3d0c7b8df9f848ee49c2c246441 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Sat, 10 Dec 2022 20:27:06 -0500 Subject: [PATCH 3/7] Enable code to compile under Java 8. --- pom.xml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 16ef83b..835c64c 100644 --- a/pom.xml +++ b/pom.xml @@ -7,10 +7,9 @@ jar - 11 UTF-8 - 11 - 11 + 1.8 + 1.8 From e41a668d8452801abbfaddee15c24ea596e11aa1 Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Sat, 10 Dec 2022 20:33:36 -0500 Subject: [PATCH 4/7] Updated dependencies to their latest version. --- pom.xml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pom.xml b/pom.xml index 835c64c..3144d48 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,7 @@ org.junit.jupiter junit-jupiter-engine - 5.8.2 + 5.9.1 test @@ -59,7 +59,7 @@ maven-resources-plugin - 3.2.0 + 3.3.0 copy-dist-resources @@ -82,7 +82,7 @@ org.apache.maven.plugins maven-jar-plugin - 3.2.2 + 3.3.0 @@ -94,7 +94,7 @@ org.apache.maven.plugins maven-assembly-plugin - 3.3.0 + 3.4.2 package @@ -133,7 +133,7 @@ org.apache.maven.plugins maven-javadoc-plugin - 3.4.0 + 3.4.1 /usr/bin/javadoc From f2e9e153f72340772c9c2e11c09877bc3c41675a Mon Sep 17 00:00:00 2001 From: Kevin Bui Date: Sat, 10 Dec 2022 21:15:00 -0500 Subject: [PATCH 5/7] Fixed code formatting. --- .../pitt/dbmi/causal/cmd/CausalCmdApplication.java | 2 +- src/main/java/edu/pitt/dbmi/causal/cmd/CmdArgs.java | 13 +++++++------ .../java/edu/pitt/dbmi/causal/cmd/CmdOptions.java | 3 +-- .../java/edu/pitt/dbmi/causal/cmd/CmdParams.java | 2 +- .../edu/pitt/dbmi/causal/cmd/data/DataFiles.java | 2 +- .../java/edu/pitt/dbmi/causal/cmd/util/GraphIO.java | 4 ++-- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java b/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java index e02eac7..74c6fb6 100644 --- a/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java +++ b/src/main/java/edu/pitt/dbmi/causal/cmd/CausalCmdApplication.java @@ -137,7 +137,7 @@ private static void runTetrad(CmdArgs cmdArgs) throws AlgorithmRunException, Val Files.deleteIfExists(outTxtFile); } - try ( PrintStream out = new PrintStream(new BufferedOutputStream(Files.newOutputStream(outTxtFile, StandardOpenOption.CREATE)), true)) { + try (PrintStream out = new PrintStream(new BufferedOutputStream(Files.newOutputStream(outTxtFile, StandardOpenOption.CREATE)), true)) { writeOutParameters(cmdArgs, out); if (!cmdArgs.isSkipValidation()) { diff --git a/src/main/java/edu/pitt/dbmi/causal/cmd/CmdArgs.java b/src/main/java/edu/pitt/dbmi/causal/cmd/CmdArgs.java index 9a9b538..80cf7d5 100644 --- a/src/main/java/edu/pitt/dbmi/causal/cmd/CmdArgs.java +++ b/src/main/java/edu/pitt/dbmi/causal/cmd/CmdArgs.java @@ -79,7 +79,7 @@ public class CmdArgs { * by the data reader. */ protected String commentMarker; - + /** * Indicates whether the first line in the data file is a header. */ @@ -89,7 +89,7 @@ public class CmdArgs { * Type of data in the dataset. */ protected DataType dataType; - + /** * Data delimiter. */ @@ -99,12 +99,12 @@ public class CmdArgs { * Algorithm class. */ protected Class algorithmClass; - + /** * Score class. */ protected Class scoreClass; - + /** * Independence test class. */ @@ -119,14 +119,15 @@ public class CmdArgs { * Indicates whether or not to skip data validation. */ protected boolean skipValidation; - + /** * Indicates whether to output the search graph in JSON format. */ protected boolean jsonGraph; /** - * Maximum number of threads can be used by algorithm, score, or independence test. + * Maximum number of threads can be used by algorithm, score, or + * independence test. */ protected int numOfThreads; diff --git a/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java b/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java index 834130a..bed8499 100644 --- a/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java +++ b/src/main/java/edu/pitt/dbmi/causal/cmd/CmdOptions.java @@ -165,12 +165,11 @@ public List