Skip to content

Commit 77f1fbd

Browse files
Merge pull request #70 from sanctuuary/dev
Merge pom tags needed to publish to mvn Fix tests
2 parents 0003126 + dbaa52f commit 77f1fbd

File tree

4 files changed

+69
-46
lines changed

4 files changed

+69
-46
lines changed

.travis.yml

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

pom.xml

Lines changed: 51 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<groupId>io.github.sanctuuary</groupId>
66
<artifactId>APE</artifactId>
7-
<version>2.1.4</version>
7+
<version>2.1.5</version>
88
<packaging>jar</packaging>
99
<name>io.github.sanctuuary:APE</name>
1010
<description>APE is a command line tool and an API for the automated exploration of possible computational pipelines (workflows) from large collections of computational tools.</description>
@@ -65,12 +65,30 @@
6565
</execution>
6666
</executions>
6767
</plugin>
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-surefire-plugin</artifactId>
71+
<version>3.0.0-M5</version>
72+
</plugin>
6873
<plugin>
6974
<groupId>org.apache.maven.plugins</groupId>
70-
<artifactId>maven-surefire-plugin</artifactId>
71-
<version>3.0.0-M4</version>
75+
<artifactId>maven-site-plugin</artifactId>
76+
<version>3.7.1</version>
7277
</plugin>
73-
<plugin>
78+
<plugin>
79+
<groupId>org.apache.maven.plugins</groupId>
80+
<artifactId>maven-source-plugin</artifactId>
81+
<version>3.2.1</version>
82+
<executions>
83+
<execution>
84+
<id>attach-sources</id>
85+
<goals>
86+
<goal>jar-no-fork</goal>
87+
</goals>
88+
</execution>
89+
</executions>
90+
</plugin>
91+
<plugin>
7492
<groupId>org.apache.maven.plugins</groupId>
7593
<artifactId>maven-javadoc-plugin</artifactId>
7694
<version>3.4.0</version>
@@ -83,6 +101,31 @@
83101
</execution>
84102
</executions>
85103
</plugin>
104+
<plugin>
105+
<groupId>org.sonatype.plugins</groupId>
106+
<artifactId>nexus-staging-maven-plugin</artifactId>
107+
<version>1.6.13</version>
108+
<extensions>true</extensions>
109+
<configuration>
110+
<serverId>ossrh</serverId>
111+
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
112+
<autoReleaseAfterClose>true</autoReleaseAfterClose>
113+
</configuration>
114+
</plugin>
115+
<plugin>
116+
<groupId>org.apache.maven.plugins</groupId>
117+
<artifactId>maven-gpg-plugin</artifactId>
118+
<version>3.0.1</version>
119+
<executions>
120+
<execution>
121+
<id>sign-artifacts</id>
122+
<phase>verify</phase>
123+
<goals>
124+
<goal>sign</goal>
125+
</goals>
126+
</execution>
127+
</executions>
128+
</plugin>
86129
</plugins>
87130
</build>
88131

@@ -103,7 +146,7 @@
103146
<dependency>
104147
<groupId>org.apache.commons</groupId>
105148
<artifactId>commons-lang3</artifactId>
106-
<version>3.12.0</version>
149+
<version>3.13.0</version>
107150
</dependency>
108151
<dependency>
109152
<groupId>org.apache.logging.log4j</groupId>
@@ -119,13 +162,13 @@
119162
<dependency>
120163
<groupId>org.json</groupId>
121164
<artifactId>json</artifactId>
122-
<version>20230227</version>
165+
<version>20230618</version>
123166
</dependency>
124167
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
125168
<dependency>
126169
<groupId>org.junit.jupiter</groupId>
127170
<artifactId>junit-jupiter-api</artifactId>
128-
<version>5.8.2</version>
171+
<version>5.10.0</version>
129172
<scope>test</scope>
130173
</dependency>
131174
<dependency>
@@ -142,7 +185,7 @@
142185
<dependency>
143186
<groupId>org.antlr</groupId>
144187
<artifactId>antlr4-runtime</artifactId>
145-
<version>4.12.0</version>
188+
<version>4.13.0</version>
146189
</dependency>
147190
<dependency>
148191
<groupId>org.yaml</groupId>

src/main/java/nl/uu/cs/ape/APE.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -568,6 +568,10 @@ public static boolean writeControlFlowGraphs(SolutionsList allSolutions, RankDir
568568
* @return true if the execution was successfully performed, false otherwise.
569569
*/
570570
public static boolean writeCWLWorkflows(SolutionsList allSolutions) {
571+
572+
if (allSolutions.isEmpty()) {
573+
return false;
574+
}
571575
// Check the configuration before continuing.
572576
Path cwlFolder = allSolutions.getRunConfiguration().getSolutionDirPath2CWL();
573577
int noCWLFiles = allSolutions.getRunConfiguration().getNoCWL();
@@ -597,17 +601,23 @@ public static boolean writeCWLWorkflows(SolutionsList allSolutions) {
597601
DefaultCWLCreator cwlCreator = new DefaultCWLCreator(solution);
598602
APEFiles.write2file(cwlCreator.generate(), script, false);
599603

600-
// Write the cwl input file (in YML) to the file system
601-
String titleInputs = solution.getFileName() + "_inp.yml";
602-
File inputScipt = cwlFolder.resolve(titleInputs).toFile();
603-
APEFiles.write2file(cwlCreator.generateCWLWorkflowInputs(), inputScipt, false);
604-
605604
} catch (IOException e) {
606605
log.error("Error occurred while writing a CWL file to the file system.");
607606
e.printStackTrace();
608607
}
609608
});
610609

610+
// Write the cwl input file (in YML) to the file system
611+
String titleInputs = "input.yml";
612+
File inputScipt = cwlFolder.resolve(titleInputs).toFile();
613+
DefaultCWLCreator cwlCreator = new DefaultCWLCreator(allSolutions.get(0));
614+
try {
615+
APEFiles.write2file(cwlCreator.generateCWLWorkflowInputs(), inputScipt, false);
616+
} catch (IOException e) {
617+
log.error("Error occurred while writing a CWL input file (yml) to the file system.");
618+
e.printStackTrace();
619+
}
620+
611621
APEUtils.timerPrintText(timerID, "CWL files have been generated.");
612622
return true;
613623
}

src/test/java/nl/uu/cs/ape/test/sat/ape/UseCaseTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,10 +152,10 @@ void testUseCase(String name, String evaluationPath)
152152
assertNotNull(files);
153153
assertEquals(mutation.number_of_cwl_files,
154154
Stream.of(files).filter(file -> file.getName().endsWith(".cwl")).count());
155-
assertEquals(mutation.number_of_cwl_files,
156-
Stream.of(files).filter(file -> file.getName().endsWith("inp.yml")).count());
155+
assertEquals(1,
156+
Stream.of(files).filter(file -> file.getName().startsWith("input.yml")).count());
157157
for (File f : files) {
158-
assertTrue(f.getName().startsWith("workflowSolution_"));
158+
assertTrue(f.getName().startsWith("workflowSolution_") || f.getName().startsWith("input.yml"));
159159
}
160160
success("All %s expected CWL files were generated", mutation.number_of_cwl_files);
161161
}

0 commit comments

Comments
 (0)