[Swift-commit] r8235 - in SwiftApps: EPlus/examples swift-galaxy swift-galaxy/swift
ketan at ci.uchicago.edu
ketan at ci.uchicago.edu
Tue Sep 9 12:41:24 CDT 2014
Author: ketan
Date: 2014-09-09 12:41:24 -0500 (Tue, 09 Sep 2014)
New Revision: 8235
Modified:
SwiftApps/EPlus/examples/run.sh
SwiftApps/swift-galaxy/setup.py
SwiftApps/swift-galaxy/swift/swiftforeach.py
Log:
changes in EPlus and galaxy
Modified: SwiftApps/EPlus/examples/run.sh
===================================================================
--- SwiftApps/EPlus/examples/run.sh 2014-09-08 18:54:40 UTC (rev 8234)
+++ SwiftApps/EPlus/examples/run.sh 2014-09-09 17:41:24 UTC (rev 8235)
@@ -1,2 +1,5 @@
#! /bin/sh
-runenergyplus CHICAGO-EXAMPLE.imf CHICAGO.epw
+
+export PATH=~/EPlus/EnergyPlus-8-0-0/bin:$PATH
+
+runenergyplus ./CHICAGO-EXAMPLE.imf ./CHICAGO.epw
Modified: SwiftApps/swift-galaxy/setup.py
===================================================================
--- SwiftApps/swift-galaxy/setup.py 2014-09-08 18:54:40 UTC (rev 8234)
+++ SwiftApps/swift-galaxy/setup.py 2014-09-09 17:41:24 UTC (rev 8235)
@@ -1,25 +1,44 @@
#!/usr/bin/env python
-import xml.etree.ElementTree as ET
-
"""
Setup script to install swift-galaxy framework to your Galaxy installation.
+
+Usage: ./setup.py <path/to/galaxy>
"""
+import xml.etree.ElementTree as ET
import subprocess
import sys
import os
import distutils.spawn
import traceback
import fnmatch
+import tarfile
+import urllib
galaxyloc=sys.argv[1]
+#step 0. Download swift-galaxy.tgz and swift-rel.tgz untar and set path
+if not os.path.isfile("/tmp/swift-galaxy.tgz"):
+ urllib.urlretrieve("http://mcs.anl.gov/~ketan/swift-galaxy.tgz", filename="/tmp/swift-galaxy.tgz")
+ swiftgaltar = tarfile.open("/tmp/swift-galaxy.tgz")
+ swiftgaltar.extractall(path="/tmp")
+ swiftgaltar.close()
+
+if not os.path.isfile("/tmp/swift-0.94.1-RC3.tar.gz"):
+ urllib.urlretrieve("http://swift-lang.org/packages/swift-0.94.1-RC3.tar.gz", filename="/tmp/swift-0.94.1-RC3.tar.gz")
+ swiftar = tarfile.open("/tmp/swift-0.94.1-RC3.tar.gz")
+ swiftar.extractall(path="/tmp")
+ swiftar.close()
+ os.environ["PATH"] = os.environ["PATH"] + ":/tmp/swift-0.94.1-RC3/bin"
+
#step 1. Create symlink to the swift directory from the tools directory of galaxyloc if not already present
-#os.symlink (os.getcwd()+"/swift", galaxyloc+"/tools/swift");
+if os.path.lexists(galaxyloc+"/tools/swift"):
+ os.remove(galaxyloc+"/tools/swift")
+os.symlink ("/tmp/swift-galaxy/swift", galaxyloc+"/tools/swift");
+
#step 2. update the tool_conf.xml
-
tree = ET.parse(galaxyloc+"/tool_conf.xml")
root = tree.getroot()
@@ -28,15 +47,6 @@
tree.write (galaxyloc+"/tool_conf.xml")
-#i = lines.index("<toolbox>")
-#lines.insert(i, 'Random text to insert')
-
-#<section name="swift" id="swift">
-# <tool file="swift/genswift.xml" />
-# <tool file="swift/genericswift.xml" />
-# <tool file="swift/swiftforeach.xml" />
-#</section>
-
#step 3. Print message
print "Swift/Galaxy Installed."
Modified: SwiftApps/swift-galaxy/swift/swiftforeach.py
===================================================================
--- SwiftApps/swift-galaxy/swift/swiftforeach.py 2014-09-08 18:54:40 UTC (rev 8234)
+++ SwiftApps/swift-galaxy/swift/swiftforeach.py 2014-09-09 17:41:24 UTC (rev 8235)
@@ -23,7 +23,7 @@
yield a
def buildcfg(wdir):
- f=open(wdir+"/cf", 'w');
+ f=open(wdir+"/cf", 'w')
f.write("use.provider.staging=true\n")
f.write("wrapperlog.always.transfer=true\n")
f.write("execution.retries=0\n")
More information about the Swift-commit
mailing list