- better README

- made the build system obtain and use svn revision info directly in version.js
- fixed lunch4j initial memory usage
- added .ini support for .exe starting in windows
- more robust up-to-date logic that uses SVN revisions instead of dates
- connected to new freebase.com/labs/gridworks web site


git-svn-id: http://google-refine.googlecode.com/svn/trunk@362 7d457c2a-affb-35e4-300a-418c747d4874
This commit is contained in:
Stefano Mazzocchi 2010-03-31 00:17:40 +00:00
parent 8508fbbd01
commit 571f2c9ab3
7 changed files with 141 additions and 42 deletions

View File

@ -1,23 +1,58 @@
G r i d w o r k s F r e e b a s e G r i d w o r k s
------------------- ---------------------------------------
What is this? What is this?
------------- -------------
Gridworks is a tabular data exploration and manipulation tool. Freebase Gridworks is a power tool that allows you to load data,
understand it, clean it up, reconcile it internally, and augment it
with data coming from Freebase. All with the comfort and privacy of
[more soon] your own computer.
Where can I get more information on Gridworks?
----------------------------------------------
Look at the Gridworks web site
http://www.freebase.com/labs/gridworks/
Licensing and legal issues
--------------------------
Freebase Gridworks is open source software and is licensed under the BSD license
located in the LICENSE.txt. See that file also for information on open source
libraries that Gridworks depends on.
Credits
-------
This software was created by Metaweb Technology Inc. and originally written
and conceived by David Huynh <david@metaweb.com>.
This is the full list of contributors (in chronological order):
- David Huynh <david@metaweb.com>
- Stefano Mazzocchi <stefano@metaweb.com>
- Vishal Talwar <vishal@metaweb.com>
- o - - o -
Thank you for your interest. Thank you for your interest.
The Freebase Gridworks Development Team
http://www.freebase.com/labs/gridworks

View File

@ -23,12 +23,14 @@
<property name="src.dir" value="${basedir}/src/main/java" /> <property name="src.dir" value="${basedir}/src/main/java" />
<property name="graphics.dir" value="${basedir}/src/graphics" /> <property name="graphics.dir" value="${basedir}/src/graphics" />
<property name="conf.dir" value="${basedir}/src/conf" />
<property name="lib.dir" value="${basedir}/lib" /> <property name="lib.dir" value="${basedir}/lib" />
<property name="tools.dir" value="${basedir}/thirdparty" /> <property name="tools.dir" value="${basedir}/thirdparty" />
<property name="tests.dir" value="${basedir}/tests" /> <property name="tests.dir" value="${basedir}/tests" />
<property name="classes.dir" value="${build.dir}/classes" /> <property name="classes.dir" value="${build.dir}/classes" />
<property name="tests_classes.dir" value="${tests.dir}/classes" /> <property name="tests_classes.dir" value="${tests.dir}/classes" />
<property name="webapp.dir" value="${build.dir}/webapp" />
<property name="bundle.dir" value="${build.dir}/bundle" /> <property name="bundle.dir" value="${build.dir}/bundle" />
<property name="exe.dir" value="${build.dir}/exe" /> <property name="exe.dir" value="${build.dir}/exe" />
<property name="cli.name" value="gridworks-${version}" /> <property name="cli.name" value="gridworks-${version}" />
@ -64,14 +66,31 @@
<target name="jar" depends="build"> <target name="jar" depends="build">
<jar destfile="${build.dir}/gridworks.jar" basedir="${classes.dir}"/> <jar destfile="${build.dir}/gridworks.jar" basedir="${classes.dir}"/>
</target> </target>
<target name="prepare_webapp">
<mkdir dir="${webapp.dir}" />
<copy todir="${webapp.dir}">
<fileset dir="${basedir}/src/main/webapp">
<include name="**/*"/>
</fileset>
</copy>
<replace file="${webapp.dir}/scripts/version.js">
<replacefilter token="$VERSION" value="${version}"/>
<replacefilter token="$REVISION" value="${revision}"/>
</replace>
</target>
<target name="bundle" depends="jar"> <target name="bundle" depends="jar, prepare_webapp">
<taskdef <taskdef
name="jarbundler" name="jarbundler"
classname="net.sourceforge.jarbundler.JarBundler" classname="net.sourceforge.jarbundler.JarBundler"
classpath="${tools.dir}/jarbundler-2.1.0.jar" classpath="${tools.dir}/jarbundler-2.1.0.jar"
/> />
<mkdir dir="${bundle.dir}"/> <mkdir dir="${bundle.dir}"/>
<jarbundler <jarbundler
dir="${bundle.dir}" dir="${bundle.dir}"
name="Gridworks" name="Gridworks"
@ -94,13 +113,13 @@
<include name="**/*.jar" /> <include name="**/*.jar" />
</jarfileset> </jarfileset>
<jarfilelist dir="${build.dir}" files="gridworks.jar" /> <jarfilelist dir="${build.dir}" files="gridworks.jar" />
<resourcefileset dir="${basedir}/src/main/"> <resourcefileset dir="${webapp.dir}">
<include name="webapp/**" /> <include name="**" />
</resourcefileset> </resourcefileset>
</jarbundler> </jarbundler>
</target> </target>
<target name="exe" depends="jar"> <target name="exe" depends="jar, prepare_webapp">
<mkdir dir="${exe.dir}"/> <mkdir dir="${exe.dir}"/>
<taskdef <taskdef
name="launch4j" name="launch4j"
@ -117,7 +136,7 @@
<classPath mainClass="com.metaweb.gridworks.Gridworks"> <classPath mainClass="com.metaweb.gridworks.Gridworks">
<cp>lib/*.jar</cp> <cp>lib/*.jar</cp>
</classPath> </classPath>
<jre minVersion="1.6.0" jdkPreference="preferJre" initialHeapPercent="10" maxHeapPercent="80"> <jre minVersion="1.6.0" jdkPreference="preferJre" initialHeapSize="256" maxHeapSize="1024">
<opt>-Djava.library.path=lib/native/windows</opt> <opt>-Djava.library.path=lib/native/windows</opt>
</jre> </jre>
<versionInfo <versionInfo
@ -145,15 +164,26 @@
</fileset> </fileset>
</copy> </copy>
<copy file="${build.dir}/gridworks.jar" tofile="${exe.dir}/lib/gridworks-${version}-${revision}.jar"/> <copy file="${build.dir}/gridworks.jar" tofile="${exe.dir}/lib/gridworks-${version}-${revision}.jar"/>
<copy todir="${exe.dir}/webapp"> <copy todir="${exe.dir}/src/main/webapp">
<fileset dir="${basedir}/src/main/webapp"> <fileset dir="${webapp.dir}">
<include name="**/*"/> <include name="**"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="${cli.dir}/licenses">
<fileset dir="${basedir}/licenses">
<include name="**"/>
</fileset>
</copy>
<copy file="${conf.dir}/gridworks.l4j.ini" tofile="${exe.dir}/gridworks.l4j.ini"/>
<copy file="${basedir}/README.txt" tofile="${exe.dir}/README.txt"/>
<copy file="${basedir}/LICENSE.txt" tofile="${exe.dir}/LICENSE.txt"/>
<zip destfile="${dist.dir}/gridworks-${version}-${revision}.zip" basedir="${exe.dir}"/> <zip destfile="${dist.dir}/gridworks-${version}-${revision}.zip" basedir="${exe.dir}"/>
</target> </target>
<target name="cli" depends="jar"> <target name="cli" depends="jar, prepare_webapp">
<mkdir dir="${cli.dir}"/> <mkdir dir="${cli.dir}"/>
<copy todir="${cli.dir}/lib"> <copy todir="${cli.dir}/lib">
@ -170,13 +200,13 @@
<copy file="${build.dir}/gridworks.jar" tofile="${cli.dir}/lib/gridworks-${version}-${revision}.jar"/> <copy file="${build.dir}/gridworks.jar" tofile="${cli.dir}/lib/gridworks-${version}-${revision}.jar"/>
<copy todir="${cli.dir}/src/main/webapp"> <copy todir="${cli.dir}/src/main/webapp">
<fileset dir="${basedir}/src/main/webapp"> <fileset dir="${webapp.dir}">
<include name="**/*"/> <include name="**"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="${cli.dir}/licenses"> <copy todir="${cli.dir}/licenses">
<fileset dir="${basedir}/licenses"> <fileset dir="${basedir}/licenses">
<include name="**/*"/> <include name="**"/>
</fileset> </fileset>
</copy> </copy>
<copy file="${basedir}/gridworks.ini" tofile="${cli.dir}/gridworks.ini"/> <copy file="${basedir}/gridworks.ini" tofile="${cli.dir}/gridworks.ini"/>

View File

@ -115,7 +115,7 @@ launch4j_prepare() {
LAUNCH4J_TAR=`ls | grep launch4j | grep tar.gz | grep -v svn` LAUNCH4J_TAR=`ls | grep launch4j | grep tar.gz | grep -v svn`
LAUNCH4J_DIR="launch4j" LAUNCH4J_DIR="launch4j"
if [ ! -d "$LAUNCH4J_DIR" ] ; then if [ ! -d "$LAUNCH4J_DIR" ] ; then
tar xzf $LAUNCH4J_TAR -C thirdparty || exit 1 tar xzf $LAUNCH4J_TAR || exit 1
fi fi
cd .. cd ..
} }
@ -143,9 +143,27 @@ get_revision() {
} }
dist() { dist() {
make_dmg $1 get_revision
make_exe $1 get_version $1
make_cli $1
#make_dmg $1
#make_exe $1
#make_cli $1
echo "Distributions were built."
echo
echo "Upload them, then prepend the GridworksReleases array at"
echo
echo " http://acre.freebase.com/#app=/user/dfhuynh/labs-site&file=gridworks.js"
echo
echo "with"
echo
echo " {"
echo " description: \"Gridworks $VERSION\","
echo " version: \"${VERSION}\","
echo " revision: \"${REVISION}\""
echo " },"
echo
} }
make_exe() { make_exe() {
@ -156,9 +174,6 @@ make_exe() {
get_revision get_revision
ant exe ant exe
echo ""
echo "Built exe ZIP for version $VERSION-$REVISION"
} }
make_cli() { make_cli() {
@ -167,9 +182,6 @@ make_cli() {
get_revision get_revision
ant cli ant cli
echo ""
echo "Built cli ZIP for version $VERSION-$REVISION"
} }
make_dmg() { make_dmg() {
@ -219,12 +231,9 @@ make_dmg() {
sync sync
sync sync
hdiutil detach $DEVICE hdiutil detach $DEVICE
hdiutil convert "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" -format UDZO -imagekey zlib-level=9 -o "$GRIDWORKS_DIST_DIR/gridworks-$VERSION.dmg" hdiutil convert "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" -format UDZO -imagekey zlib-level=9 -o "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg"
hdiutil internet-enable -yes "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg" hdiutil internet-enable -yes "$GRIDWORKS_DIST_DIR/gridworks-$VERSION-$REVISION.dmg"
rm -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg" rm -f "$GRIDWORKS_BUILD_DIR/temp_gridworks.dmg"
echo ""
echo "Built DMG for version $VERSION-$REVISION"
} }
test() { test() {

View File

@ -0,0 +1,10 @@
# Launch4j runtime config
# initial memory heap size
-Xms256M
# max memory memory heap size
-Xmx1024M
#-XX:+UseLargePages
#-Dsomevar="%SOMEVAR%"

View File

@ -1 +1 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Gridworks</title> <link rel="stylesheet" href="/styles/common.css" /> <link rel="stylesheet" href="/styles/index.css" /> <script type="text/javascript" src="externals/jquery-1.4.1.min.js"></script> <script type="text/javascript" src="externals/date.js"></script> <script type="text/javascript" src="scripts/util/string.js"></script> <script type="text/javascript" src="scripts/index.js"></script> <script type="text/javascript" src="http://labs.freebase.com/projects/gridworks/releases.js"></script> </head> <body> <div id="header"> <a id="logo" href="http://www.freebase.com/" title="Freebase"><img alt="Freebase" src="images/freebase-headerlogo.png" /></a> <div id="path"><span class="app-path-section"><a href="./index.html">Gridworks</a></span></div> </div> <div id="body"> <div id="body-empty"> <table><tr> <td id="body-empty-logo-container"><img src="images/gridworks.png" /> Gridworks</td> <td id="body-empty-create-project-panel-container"></td> </tr></table> </div> <div id="body-nonempty"> <table><tr> <td id="body-nonempty-logo-container"><img src="images/gridworks.png" /> Gridworks</td> <td id="body-nonempty-projects-container"> <div id="projects"></div> </td> <td id="body-nonempty-create-project-panel-container"></td> </tr></table> </div> </div> <div id="footer"> <a href="about.html">About Freebase Gridworks</a> &bull; &copy; 2010 <a href="http://www.metaweb.com/">Metaweb Technologies, Inc.</a> </div> <div id="body-template"> <div id="create-project-panel"> <h1>Upload Data File</h1> <form id="file-upload-form" method="post" enctype="multipart/form-data" action="/command/create-project-from-upload" accept-charset="UTF-8"> <div class="grid-layout layout-tight"><table> <tr><td>Data File:</td><td> <input type="file" id="project-file-input" name="project-file" /> </td></tr> <tr><td>Project Name:</td><td> <input type="text" size="30" id="project-name-input" name="project-name" /> </td></tr> <tr><td>Load up to:</td><td> <input id="limit-input" name="limit" size="5" /> data rows (optional) </td></tr> <tr><td>Skip:</td><td> <input id="skip-input" name="skip" size="5" /> initial data rows (optional) </td></tr> <tr><td></td><td> <input type="submit" value="Create Project" id="upload-file-button" /> </td></tr> </table></div> </form> <h1>Import Existing Project</h1> <form id="project-upload-form" method="post" enctype="multipart/form-data" action="/command/import-project" accept-charset="UTF-8"> <table id="import-project-panel-layout"> <tr><td>Project TAR File:</td><td> <input type="file" id="project-tar-file-input" name="project-file" /> </td></tr> <tr><td>Re-name Project:</td><td> <input type="text" size="30" id="project-name-input" name="project-name" /> (optional) </td></tr> <tr><td></td><td> <input type="submit" value="Import Project" id="import-project-button" /> </td></tr> </table> </form> </div> </div> </body> </html> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd"> <html> <head> <title>Gridworks</title> <link rel="stylesheet" href="/styles/common.css" /> <link rel="stylesheet" href="/styles/index.css" /> <script type="text/javascript" src="externals/jquery-1.4.1.min.js"></script> <script type="text/javascript" src="externals/date.js"></script> <script type="text/javascript" src="scripts/util/string.js"></script> <script type="text/javascript" src="scripts/version.js"></script> <script type="text/javascript" src="scripts/index.js"></script> <script type="text/javascript" src="http://www.freebase.com/labs/gridworks.js"></script> </head> <body> <div id="header"> <a id="logo" href="http://www.freebase.com/" title="Freebase"><img alt="Freebase" src="images/freebase-headerlogo.png" /></a> <div id="path"><span class="app-path-section"><a href="./index.html">Gridworks</a></span></div> </div> <div id="body"> <div id="body-empty"> <table><tr> <td id="body-empty-logo-container"><img src="images/gridworks.png" /> Gridworks</td> <td id="body-empty-create-project-panel-container"></td> </tr></table> </div> <div id="body-nonempty"> <table><tr> <td id="body-nonempty-logo-container"><img src="images/gridworks.png" /> Gridworks</td> <td id="body-nonempty-projects-container"> <div id="projects"></div> </td> <td id="body-nonempty-create-project-panel-container"></td> </tr></table> </div> </div> <div id="footer"> <a href="about.html">About Freebase Gridworks</a> &bull; &copy; 2010 <a href="http://www.metaweb.com/">Metaweb Technologies, Inc.</a> </div> <div id="body-template"> <div id="create-project-panel"> <h1>Upload Data File</h1> <form id="file-upload-form" method="post" enctype="multipart/form-data" action="/command/create-project-from-upload" accept-charset="UTF-8"> <div class="grid-layout layout-tight"><table> <tr><td>Data File:</td><td> <input type="file" id="project-file-input" name="project-file" /> </td></tr> <tr><td>Project Name:</td><td> <input type="text" size="30" id="project-name-input" name="project-name" /> </td></tr> <tr><td>Load up to:</td><td> <input id="limit-input" name="limit" size="5" /> data rows (optional) </td></tr> <tr><td>Skip:</td><td> <input id="skip-input" name="skip" size="5" /> initial data rows (optional) </td></tr> <tr><td></td><td> <input type="submit" value="Create Project" id="upload-file-button" /> </td></tr> </table></div> </form> <h1>Import Existing Project</h1> <form id="project-upload-form" method="post" enctype="multipart/form-data" action="/command/import-project" accept-charset="UTF-8"> <table id="import-project-panel-layout"> <tr><td>Project TAR File:</td><td> <input type="file" id="project-tar-file-input" name="project-file" /> </td></tr> <tr><td>Re-name Project:</td><td> <input type="text" size="30" id="project-name-input" name="project-name" /> (optional) </td></tr> <tr><td></td><td> <input type="submit" value="Import Project" id="import-project-button" /> </td></tr> </table> </form> </div> </div> </body> </html>

View File

@ -1,8 +1,3 @@
var GridworksVersion = {
description: "Gridworks 1.0 beta 2 (rolling update)",
date: "2010-03-23"
};
function onLoad() { function onLoad() {
$.getJSON( $.getJSON(
"/command/get-all-project-metadata", "/command/get-all-project-metadata",
@ -14,14 +9,13 @@ function onLoad() {
"json" "json"
); );
var thisVersion = Date.parseExact(GridworksVersion.date, "yyyy-MM-dd"); if (isThereNewRelease()) {
var latestVersion = Date.parseExact(GridworksReleases.releases[0].date, "yyyy-MM-dd");
if (thisVersion.getTime() < latestVersion.getTime()) {
$('<div id="version-message">' + $('<div id="version-message">' +
'New version "' + GridworksReleases.releases[0].description + '" <a href="' + GridworksReleases.homepage + '">available for download here</a>.' + 'New version "' + GridworksReleases.releases[0].description + '" <a href="' + GridworksReleases.homepage + '">available for download here</a>.' +
'</div>').appendTo(document.body) '</div>').appendTo(document.body)
} }
} }
$(onLoad); $(onLoad);
function onClickUploadFileButton(evt) { function onClickUploadFileButton(evt) {
@ -113,4 +107,21 @@ function formatDate(d) {
} else { } else {
return d.toString("ddd, MMM d, yyyy"); return d.toString("ddd, MMM d, yyyy");
} }
}
function isThereNewRelease() {
var thisRevision = GridworksVersion.revision;
var revision_pattern = /r([0-9]+)/;
if (!revision_pattern.test(thisRevision)) { // probably "trunk"
return false;
}
var latestRevision = GridworksReleases.releases[0].revision;
var thisRev = parseInt(revision_pattern.exec(thisRevision)[1]);
var latestRev = parseInt(revision_pattern.exec(GridworksReleases.releases[0].revision)[1]);
return latestRev > thisRev;
} }

View File

@ -0,0 +1,4 @@
var GridworksVersion = {
description: "Gridworks $VERSION",
revision: "$REVISION"
};