Skip to content

Commit

Permalink
Merge pull request #142 from openworm/development
Browse files Browse the repository at this point in the history
Release 0.4.2
  • Loading branch information
tarelli authored Jan 16, 2019
2 parents 1c1d9df + e1e081c commit ea141a8
Show file tree
Hide file tree
Showing 10 changed files with 39 additions and 52 deletions.
2 changes: 0 additions & 2 deletions .settings/org.eclipse.wst.common.project.facet.core.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@
<faceted-project>
<runtime name="Virgo Runtime"/>
<installed facet="org.eclipse.virgo.server.bundle" version="1.0"/>
<installed facet="java" version="1.7"/>
<installed facet="jst.utility" version="1.0"/>
</faceted-project>
5 changes: 2 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
language: java
install:
- export main_repo_branch=$TRAVIS_BRANCH
- git clone https://github.com/openworm/org.geppetto.model.git
- cd org.geppetto.model
- if [ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out master ..." && git checkout development; fi
- if [[ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi
- git status
- mvn install
- cd ..
- git clone https://github.com/openworm/org.geppetto.core.git
- cd org.geppetto.core
- if [ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out master ..." && git checkout development; fi
- if [[ `git branch -a | egrep "remotes/origin/${TRAVIS_BRANCH}"` ]]; then git checkout $TRAVIS_BRANCH ; else echo "Branch $TRAVIS_BRANCH does not exist for the dependent bundle, checking out development ..." && git checkout development; fi
- git status
- mvn install
- cd ..
Expand Down
27 changes: 13 additions & 14 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,47 +4,41 @@
<groupId>org.geppetto</groupId>
<artifactId>simulation</artifactId>
<name>Geppetto Simulation Bundle</name>
<version>0.4.1</version>
<version>0.4.2</version>
<packaging>bundle</packaging>
<properties>
<spring.version>3.1.3.RELEASE</spring.version>
<spring.version>4.3.9.RELEASE</spring.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<dependencies>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1.3</version>
</dependency>

<dependency>
<groupId>org.geppetto</groupId>
<artifactId>core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.core</artifactId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.beans</artifactId>
<artifactId>spring-beans</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.context</artifactId>
<artifactId>spring-context</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.web</artifactId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>org.springframework.aop</artifactId>
<artifactId>spring-aop</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
Expand All @@ -62,6 +56,11 @@
<artifactId>cloning</artifactId>
<version>1.9.3</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
</dependency>
</dependencies>
<repositories>
<repository>
Expand Down Expand Up @@ -152,7 +151,7 @@
{maven-resources},META-INF/spring=src/main/java/META-INF/spring,src/main/resources
</Include-Resource>
<Import-Package>
org.geppetto.core.simulation,org.geppetto.core.data,org.springframework.beans.factory.config,org.aopalliance.aop,org.springframework.aop,,org.springframework.aop.scope,org.springframework.aop.framework,*
org.geppetto.core.simulation,org.geppetto.core.data,org.springframework.beans.factory.config,org.aopalliance.aop,org.springframework.aop,org.springframework.aop.scope,org.springframework.aop.framework,*
</Import-Package>
</instructions>
</configuration>
Expand Down
8 changes: 4 additions & 4 deletions src/main/java/META-INF/spring/app-config.xml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
http://www.springframework.org/schema/context/spring-context.xsd">

<!-- Scans the impl package for module @Components to install and configure -->
<context:component-scan base-package="org.geppetto.simulation" scoped-proxy="targetClass"/>
Expand All @@ -15,5 +16,4 @@
<property name="updateCycle" value="20" />
<property name="simulationCapacity" value="10" />
</bean>

</beans>
4 changes: 2 additions & 2 deletions src/main/java/META-INF/spring/module-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.1.xsd">
http://www.springframework.org/schema/context/spring-context.xsd">

<!-- <bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/>-->
<!-- Instructs Spring to scan for internal service components to instantiate and configure -->
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/META-INF/spring/osgi-config.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
xmlns:osgi="http://www.springframework.org/schema/osgi"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/osgi
http://www.springframework.org/schema/osgi/spring-osgi-1.2.xsd
http://www.springframework.org/schema/osgi/spring-osgi.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">
http://www.springframework.org/schema/aop/spring-aop.xsd">


</beans>
19 changes: 0 additions & 19 deletions src/main/java/app-config.xml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ public void endOfSteps(IAspectConfiguration aspectConfiguration, Map<File, Resul
{
String instancePath = aspectConfiguration.getInstance();
SimulatorRuntime simulatorRuntime = simulatorRuntimes.get(instancePath);

try
{
List<File> rawToZip = new ArrayList<File>();
Expand Down Expand Up @@ -427,12 +427,20 @@ public void endOfSteps(IAspectConfiguration aspectConfiguration, Map<File, Resul
}
Path zipped = zipper.processAddedFilesAndZip();
String newPath = "projects/" + Long.toString(runtimeProject.getGeppettoProject().getId()) + "/experiment/" + experiment.getId() + "/" + fileName;

ISimulationResult simulationResults;
IPersistedData rawResults;
if(!DataManagerHelper.getDataManager().isDefault())
{
//save results to amazon instance server
S3Manager.getInstance().saveFileToS3(zipped.toFile(), newPath);
rawResults = DataManagerHelper.getDataManager().newPersistedData(S3Manager.getInstance().getURL(newPath), PersistedDataType.RECORDING);
}else {
//create persisted data object, but don't save it to a server, just locally
rawResults = DataManagerHelper.getDataManager().newPersistedData(zipped.toUri().toURL(), PersistedDataType.RECORDING);
}
IPersistedData rawResults = DataManagerHelper.getDataManager().newPersistedData(S3Manager.getInstance().getURL(newPath), PersistedDataType.RECORDING);
ISimulationResult simulationResults = DataManagerHelper.getDataManager().newSimulationResult(instancePath, rawResults, ResultsFormat.RAW);

simulationResults = DataManagerHelper.getDataManager().newSimulationResult(instancePath, rawResults, ResultsFormat.RAW);
experiment.addSimulationResult(simulationResults);

DataManagerHelper.getDataManager().saveEntity(experiment.getParentProject());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,9 @@ public GeppettoManager(IGeppettoManager manager)
if(manager instanceof GeppettoManager)
{
GeppettoManager other = (GeppettoManager) manager;
this.projects.putAll(other.projects);
if(other.projects!=null) {
this.projects.putAll(other.projects);
}
this.user = DataManagerHelper.getDataManager().getUserByLogin(other.getUser().getLogin());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -640,7 +640,7 @@ public void test24DownloadResults() throws GeppettoExecutionException, IOExcepti
URL rawRecording = manager.downloadResults("testVar(testType)", ResultsFormat.RAW, addedExperiment, geppettoProject);
rawRecording.openConnection().connect();
// unix and windows output paths differ, checks both
boolean rawRecPath = rawRecording.getPath().endsWith("experiment/1/rawRecording.zip") || rawRecording.getPath().endsWith("experiment\\1\\rawRecording.zip");
boolean rawRecPath = rawRecording.getPath().endsWith("1/testVar(testType)/rawRecording.zip") || rawRecording.getPath().endsWith("1\\testVar(testType)\\rawRecording.zip");

Assert.assertTrue(rawRecPath);
}
Expand Down

0 comments on commit ea141a8

Please sign in to comment.