Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge pom tags needed to publish to mvn #70

Merged
merged 12 commits into from
Aug 1, 2023
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

59 changes: 51 additions & 8 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>io.github.sanctuuary</groupId>
<artifactId>APE</artifactId>
<version>2.1.4</version>
<version>2.1.5</version>
<packaging>jar</packaging>
<name>io.github.sanctuuary:APE</name>
<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>
Expand Down Expand Up @@ -65,12 +65,30 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M5</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>3.0.0-M4</version>
<artifactId>maven-site-plugin</artifactId>
<version>3.7.1</version>
</plugin>
<plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.2.1</version>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.4.0</version>
Expand All @@ -83,6 +101,31 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>verify</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>

Expand All @@ -103,7 +146,7 @@
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-lang3</artifactId>
<version>3.12.0</version>
<version>3.13.0</version>
</dependency>
<dependency>
<groupId>org.apache.logging.log4j</groupId>
Expand All @@ -119,13 +162,13 @@
<dependency>
<groupId>org.json</groupId>
<artifactId>json</artifactId>
<version>20230227</version>
<version>20230618</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-api -->
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.8.2</version>
<version>5.10.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -142,7 +185,7 @@
<dependency>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.12.0</version>
<version>4.13.0</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
Expand Down
20 changes: 15 additions & 5 deletions src/main/java/nl/uu/cs/ape/APE.java
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,10 @@ public static boolean writeControlFlowGraphs(SolutionsList allSolutions, RankDir
* @return true if the execution was successfully performed, false otherwise.
*/
public static boolean writeCWLWorkflows(SolutionsList allSolutions) {

if (allSolutions.isEmpty()) {
return false;
}
// Check the configuration before continuing.
Path cwlFolder = allSolutions.getRunConfiguration().getSolutionDirPath2CWL();
int noCWLFiles = allSolutions.getRunConfiguration().getNoCWL();
Expand Down Expand Up @@ -597,17 +601,23 @@ public static boolean writeCWLWorkflows(SolutionsList allSolutions) {
DefaultCWLCreator cwlCreator = new DefaultCWLCreator(solution);
APEFiles.write2file(cwlCreator.generate(), script, false);

// Write the cwl input file (in YML) to the file system
String titleInputs = solution.getFileName() + "_inp.yml";
File inputScipt = cwlFolder.resolve(titleInputs).toFile();
APEFiles.write2file(cwlCreator.generateCWLWorkflowInputs(), inputScipt, false);

} catch (IOException e) {
log.error("Error occurred while writing a CWL file to the file system.");
e.printStackTrace();
}
});

// Write the cwl input file (in YML) to the file system
String titleInputs = "input.yml";
File inputScipt = cwlFolder.resolve(titleInputs).toFile();
DefaultCWLCreator cwlCreator = new DefaultCWLCreator(allSolutions.get(0));
try {
APEFiles.write2file(cwlCreator.generateCWLWorkflowInputs(), inputScipt, false);
} catch (IOException e) {
log.error("Error occurred while writing a CWL input file (yml) to the file system.");
e.printStackTrace();
}

APEUtils.timerPrintText(timerID, "CWL files have been generated.");
return true;
}
Expand Down
6 changes: 3 additions & 3 deletions src/test/java/nl/uu/cs/ape/test/sat/ape/UseCaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,10 +152,10 @@ void testUseCase(String name, String evaluationPath)
assertNotNull(files);
assertEquals(mutation.number_of_cwl_files,
Stream.of(files).filter(file -> file.getName().endsWith(".cwl")).count());
assertEquals(mutation.number_of_cwl_files,
Stream.of(files).filter(file -> file.getName().endsWith("inp.yml")).count());
assertEquals(1,
Stream.of(files).filter(file -> file.getName().startsWith("input.yml")).count());
for (File f : files) {
assertTrue(f.getName().startsWith("workflowSolution_"));
assertTrue(f.getName().startsWith("workflowSolution_") || f.getName().startsWith("input.yml"));
}
success("All %s expected CWL files were generated", mutation.number_of_cwl_files);
}
Expand Down
Loading