Skip to content

Commit a56ba1d

Browse files
Made the three new visualization components into three separate components
1 parent cc974dc commit a56ba1d

20 files changed

Lines changed: 2898 additions & 671 deletions

File tree

‎BarChart/README.md‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
Carnegie Mellon University, Massachusetts Institute of Technology, Stanford University, University of Memphis.
2+
Copyright 2016. All Rights Reserved.
3+
4+
# LearnSphere and Tigris
5+
6+
[LearnSphere](LearnSphere.org) is co-developed by the [LearnLab](http://learnlab.org) – a flagship project of [Carnegie Mellon](http://cmu.edu)'s [Simon Initiative](https://www.cmu.edu/simon). It is community software infrastructure for sharing, analysis, and collaboration of/around educational data. LearnSphere integrates existing and new educational data infrastructures to offer a world class repository of education data.
7+
8+
[Tigris](https://pslcdatashop.web.cmu.edu/LearnSphereLogin) is a workflow authoring tool which is part of the community software infrastructure being built for the LearnSphere project. The platform provides a way to create custom analyses and interact with new as well as existing data formats and repositories.
9+
10+
# Appendix A. Technical Details
11+
## I. Dependencies
12+
13+
1. Ant 1.9 or greater
14+
2. Java Enterprise Edition Software Development Kit (J2EE SDK)
15+
2. Eclipse or Cygwin.
16+
3. Clone the GitHub repository using `git clone https://github.com/PSLCDataShop/WorkflowComponents WorkflowComponents` command.
17+
4. BKT contains executables which may need to be rebuilt for your system.
18+
- From the command-line in `WorkflowComponents/AnalysisBkt/program/standard-bkt-public-standard-bkt` folder issue the `make`command.
19+
- Then, copy the predicthmm.exe and `trainhmm.exe` to the `AnalysisBkt/program` directory.
20+
21+
22+
## II. Documentation
23+
24+
See `WorkflowComponents/Workflow Components.docx` for detailed information on creating, modifying, or running components.
25+
26+
## III. Testing a workflow component in Eclipse, Cygwin, or Linux
27+
28+
### A. Eclipse
29+
30+
1. File -> Import -> General -> Existing Projects into Workspace.
31+
2. Choose any component directory from your newly imported git clone, i.e. `WorkflowComponents/<AnyComponent>`.
32+
3. Click 'Finish'.
33+
4. In the Ant view (Windows -> Show View -> Ant), add the desired component's build.xml to your current buildfiles, e.g. `<AnyComponent>/build.xml`.
34+
5. Double click the ant task `runToolTemplate`. The component should produce example XML output if it is setup correctly.
35+
36+
**NB**: For debugging, you may wish to add the jars in the directory `WorkflowComponents/CommonLibraries` to your build path.
37+
38+
39+
### B. Cygwin or Linux
40+
41+
1. Change to your `WorkflowComponents` directory, e.g. `/cygdrive/c/your_workspace/<AnyComponent>/`
42+
2. Issue the command `ant -p` to get a list of ant tasks
43+
3. Issue `ant runComponent` to run the component with the included example data
44+
45+
46+
## IV. Building components
47+
48+
### Build all components
49+
50+
Modify the `dir` variable in `WorkflowComponents/build.sh` to match your `WorkflowComponents` path, then run the script (requires bash)
51+
52+
### Building a single component
53+
54+
Issue the `ant dist` command.
55+
56+
57+
58+
59+
60+

‎BarChart/build.xml‎

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
<project name="BarChart" default="dist" basedir=".">
2+
<description>
3+
Java-based BarChart workflow component.
4+
</description>
5+
6+
<!-- set global properties for this build -->
7+
<property file="build.properties" />
8+
<property name="source" location="${basedir}/source" />
9+
<property name="build" location="${basedir}/build" />
10+
<property name="dist" location="${basedir}/dist" />
11+
<property name="lib" location="../CommonLibraries" />
12+
<property name="javadoc" location="${basedir}/javadoc" />
13+
14+
<property name="version" value="1.0" />
15+
16+
<property name="component.id" value="BarChart" />
17+
<property name="component.version" value="v${version} 2015" />
18+
19+
<property name="ToolTemplate.jar" value="${dist}/${component.id}-${version}.jar" />
20+
21+
<path id="lib.path">
22+
<fileset dir="${lib}">
23+
<include name="**/**.jar" />
24+
</fileset>
25+
</path>
26+
27+
<target name="dist" depends="compile" description="generate the distribution">
28+
<!-- Create the distribution directory -->
29+
<mkdir dir="${dist}" />
30+
31+
<path id="build-classpath">
32+
<fileset dir="${lib}">
33+
<include name="*.jar" />
34+
</fileset>
35+
</path>
36+
<manifestclasspath property="lib.list" jarfile="${ToolTemplate.jar}">
37+
<classpath refid="build-classpath" />
38+
</manifestclasspath>
39+
<jar jarfile="${ToolTemplate.jar}" basedir="${build}" includes="edu/cmu/pslc/learnsphere/visualization/d3/**">
40+
<manifest>
41+
<attribute name="Main-Class" value="edu.cmu.pslc.learnsphere.visualization.d3.BarChartMain" />
42+
<attribute name="Class-Path" value="${lib.list}" />
43+
</manifest>
44+
</jar>
45+
</target>
46+
47+
<path id="run.classpath">
48+
<pathelement path="${ToolTemplate.jar}" />
49+
<path refid="lib.path" />
50+
<pathelement path="." />
51+
</path>
52+
53+
<target name="init">
54+
<!-- Create the time stamp in DSTAMP -->
55+
<tstamp />
56+
<!-- Create the build directory structure used by compile -->
57+
<mkdir dir="${build}" />
58+
<mkdir dir="${dist}" />
59+
</target>
60+
61+
<target name="compile" depends="init" description="compile the source ">
62+
<!-- Compile the java code from ${source} into ${build} -->
63+
<javac srcdir="${source}" destdir="${build}" debug="on">
64+
<classpath refid="lib.path" />
65+
</javac>
66+
</target>
67+
68+
<!-- Delete the temporary directories. -->
69+
<target name="clean" description="clean up">
70+
<delete dir="${build}" />
71+
<delete dir="${dist}" />
72+
<delete dir="${javadoc}" />
73+
</target>
74+
75+
<target name="javadoc" depends="compile" description="Create javadoc documentation">
76+
<mkdir dir="${javadoc}" />
77+
<javadoc sourcepath="${source}" destdir="${javadoc}" packagenames="*.*" author="true" private="true" version="true" doctitle="&lt;h1&gt;${component.id} (Version ${component.version})&lt;/h1&gt;" windowtitle="${component.id} (Version ${component.version})">
78+
<classpath refid="lib.path" />
79+
</javadoc>
80+
</target>
81+
82+
<target name="runComponent" depends="clean, compile, dist" description="executes BarChart">
83+
<java classname="edu.cmu.pslc.learnsphere.visualization.d3.BarChartMain" fork="true">
84+
<classpath refid="run.classpath" />
85+
<arg value="-componentXmlFile" />
86+
<arg value="${basedir}/test/components/ComponentBarChart.xml" />
87+
<arg value="-workflowDir" />
88+
<arg value="${basedir}/test/" />
89+
<arg value="-toolDir" />
90+
<arg value="${basedir}/" />
91+
<arg value="-schemaFile" />
92+
<arg value="${basedir}/schemas/BarChart_v1_0.xsd" />
93+
<jvmarg value="-Xmx1048m"/>
94+
<!-- <arg value="-preprocess" /> Use this to test preprocessing. -->
95+
</java>
96+
</target>
97+
98+
</project>

‎BarChart/info.xml‎

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<info>
4+
<author>DataShop@CMU
5+
<email>datashop-help@lists.andrew.cmu.edu</email>
6+
</author>
7+
<url>https://github.com/LearnSphere/WorkflowComponents/tree/master/BarChart</url>
8+
<date>2018-9-14</date>
9+
<abstract>The <b>Bar Chart</b> component creates a bar chart of the input data. Use a tab-delimited file with column headers as input. The options are contained in the html output file.</abstract>
10+
11+
<inputs>
12+
<b>tab-delimited</b> - Must have column headers in the first row.
13+
</inputs>
14+
15+
<outputs>
16+
<b>BarChart html file</b><br/>
17+
<b>Original Input Data File</b> - unmodified<br/>
18+
</outputs>
19+
20+
<options>
21+
<b>Options are in the output</b><br/>
22+
</options>
23+
24+
</info>

‎BarChart/log4j.properties‎

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#uses both FileAppender and ConsoleAppender
2+
log4j.rootLogger=DEBUG, R
3+
4+
#Configures the RollingFileAppender, comment this part if DailyRollingFileAppender is used
5+
6+
log4j.appender.R=org.apache.log4j.RollingFileAppender
7+
log4j.appender.R.File=WorkflowComponent.log
8+
log4j.appender.R.encoding=UTF-8
9+
log4j.appender.R.MaxFileSize=1000MB
10+
log4j.appender.R.MaxBackupIndex=10
11+
log4j.appender.R.layout=org.apache.log4j.PatternLayout
12+
log4j.appender.R.layout.ConversionPattern=%p: [%t] %c %d{dd MMM yyyy HH:mm:ss,SSS} - %m%n
13+
14+
#Configures the ConsoleAppender, comment this part if only R is used
15+
16+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
17+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
18+
log4j.appender.stdout.layout.ConversionPattern=%p: [%t] %c %d{dd MMM yyyy HH:mm:ss,SSS} - %m%n
19+
20+
21+
#to change logging level for a specific datashop package
22+
log4j.logger.edu.cmu.pslc.learnsphere=DEBUG
23+
log4j.logger.org.springframework=WARN
24+
log4j.logger.org.hibernate=DEBUG
25+
26+

0 commit comments

Comments
 (0)