Skip to content

Commit 39cb077

Browse files
authored
Merge pull request #58 from bd2kccd/development
Merge final version 1.3.4 to master.
2 parents 9cc6fdb + f272b7e commit 39cb077

File tree

17 files changed

+118
-41
lines changed

17 files changed

+118
-41
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ If you want to host the application with your own hardware, follow the instructi
1717
#### Dependencies
1818
Download and uncompress the source code for each of following dependencies:
1919

20-
* [ccd-job-queue-0.1.6](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.6)
21-
* [ccd-mail-0.2.2](https://github.com/bd2kccd/ccd-mail/releases/tag/v0.2.2)
22-
* [ccd-db-0.6.3](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.3)
20+
* [ccd-job-queue-0.1.7](https://github.com/bd2kccd/ccd-job-queue/releases/tag/v0.1.7)
21+
* [ccd-mail-0.2.3](https://github.com/bd2kccd/ccd-mail/releases/tag/v0.2.3)
22+
* [ccd-db-0.6.4](https://github.com/bd2kccd/ccd-db/releases/tag/v0.6.4)
2323
* [ccd-commons-0.3.1](https://github.com/bd2kccd/ccd-commons/releases/tag/v0.3.1)
2424
To install the dependencies, go to the top directory of each project and do a maven install by typing **mvn install**.
2525

2626
#### Application
27-
Download and uncompress the application source code [causal-web-1.3.1](https://github.com/bd2kccd/causal-web/releases/tag/v1.3.1). To compile and build the application, go to the directory **causal-web-1.3.1** and type **mvn package**.
27+
Download and uncompress the application source code [causal-web-1.3.4](https://github.com/bd2kccd/causal-web/releases/tag/v1.3.4). To compile and build the application, go to the directory **causal-web-1.3.4** and type **mvn package**.
2828

2929
#### External Dependencies
30-
* [causal-cmd-6.0.1-SNAPSHOT-jar-with-dependencies.jar](https://github.com/cmu-phil/tetrad/releases/tag/v6.0.1-20161122)
30+
* [causal-cmd-0.1.2-jar-with-dependencies.jar](https://github.com/bd2kccd/causal-cmd/releases/tag/v0.1.2)
3131

3232
## Configure the software
3333

3434
### Setup the directory structure and copy libraries
3535
First, you need to create a workspace for the application to work in. Create a directory called **workspace**, for an example ***/home/tuser/workspace***.
3636
Inside the workspace directory, create another folder called **lib**, for example ***/home/tuser/workspace/lib***.
3737

38-
Copy the **causal-cmd-6.0.1.jar** to the **workspace/lib** folder.
38+
Copy the **causal-cmd-0.1.2-jar-with-dependencies.jar** to the **workspace/lib** folder.
3939

4040
### Configure
41-
There are 4 configuration files to configure located in causal-web-1.3.1/src/main/resources folder:
41+
There are 4 configuration files to configure located in causal-web-1.3.4/src/main/resources folder:
4242
1. **application-hsqldb.properties**: HSQLDB database configurations (for testing only).
4343
2. **application-mysql.properties**: MySQL database configurations
4444
3. **application.properties**: Spring Boot configurations
@@ -74,15 +74,15 @@ spring.profiles.active=scheduler,mysql
7474
Make sure you set **ccd.server.workspace=/home/tuser/workspace** and **ccd.folder.lib=lib** in the **ccd.properties** file.
7575

7676
## Compile the Program
77-
Go to the **causal-web** directory and run the command **mvn clean package**. This will create a jar file called **causal-web-1.3.1.jar** in the **/target** folder.
77+
Go to the **causal-web** directory and run the command **mvn clean package**. This will create a jar file called **causal-web-1.3.4.jar** in the **/target** folder.
7878

7979
### Launch the Program
8080
```java
81-
java -jar causal-web-1.3.1.jar
81+
java -jar causal-web-1.3.4.jar
8282
```
8383
To give the program 4GB of memory to run on, type the follow, using the jvm options:
8484
```java
85-
java -Xmx4G -jar causal-web-1.3.1.jar
85+
java -Xmx4G -jar causal-web-1.3.4.jar
8686
```
8787

8888
To launch app in the browser

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
<groupId>edu.pitt.dbmi</groupId>
77
<artifactId>causal-web</artifactId>
8-
<version>1.3.2</version>
8+
<version>1.3.4</version>
99
<packaging>jar</packaging>
1010

1111
<name>causal-web</name>

src/main/java/edu/pitt/dbmi/ccd/web/ctrl/algo/AlgorithmResultController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public String showPlot(
101101
String username = appUser.getUsername();
102102
List<String> categoryNames = Arrays.asList("Runtime Parameters", "Dataset", "Filters", "FGS Parameters", "Run Options", "Algorithm Parameters", "Data Validations");
103103
model.addAttribute("categories", algorithmResultService.extractDataCategories(fileName, username, categoryNames));
104+
model.addAttribute("isPag", algorithmResultService.isPagResult(fileName, username));
104105

105106
return PLOT_VIEW;
106107
}

src/main/java/edu/pitt/dbmi/ccd/web/service/algo/AlgorithmResultService.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
import java.util.LinkedList;
3636
import java.util.List;
3737
import java.util.Map;
38+
import java.util.Scanner;
3839
import java.util.Set;
3940
import java.util.regex.Pattern;
4041
import java.util.stream.Collectors;
@@ -172,6 +173,23 @@ public List<ResultFileInfo> listResultFileInfo(final String username) {
172173
return Arrays.asList(array);
173174
}
174175

176+
public boolean isPagResult(final String fileName, final String username) {
177+
boolean isPag = false;
178+
179+
Path file = Paths.get(workspace, username, resultFolder, algorithmResultFolder, fileName);
180+
try (Scanner scanner = new Scanner(Files.newBufferedReader(file))) {
181+
scanner.nextLine(); // skip the first line
182+
String line = scanner.nextLine();
183+
if (line != null) {
184+
isPag = line.trim().contains("GFCI");
185+
}
186+
} catch (IOException exception) {
187+
LOGGER.error(String.format("Unable to read file '%s'.", fileName), exception);
188+
}
189+
190+
return isPag;
191+
}
192+
175193
public Map<String, Map<String, String>> extractDataCategories(final String fileName, final String username, final List<String> categoryNames) {
176194
Map<String, Map<String, String>> info = new LinkedHashMap<>();
177195
categoryNames.forEach(key -> {

src/main/resources/banner.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

2-
██████╗ █████╗ ██╗ ██╗███████╗ █████╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██████╗ ██████╗
3-
██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██║ ██║ ██║██╔════╝██╔══██╗ ███║ ╚════██╗ ╚════██╗
4-
██║ ███████║██║ ██║███████╗███████║██║ ██║ █╗ ██║█████╗ ██████╔╝ ╚██║ █████╔╝ █████╔╝
5-
██║ ██╔══██║██║ ██║╚════██║██╔══██║██║ ██║███╗██║██╔══╝ ██╔══██╗ ██║ ╚═══██╗ ██╔═══
6-
╚██████╗██║ ██║╚██████╔╝███████║██║ ██║███████╗ ╚███╔███╔╝███████╗██████╔╝ ██║██╗██████╔╝██╗███████╗
7-
╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═╝╚═╝╚═════╝ ╚═╝╚══════╝
2+
██████╗ █████╗ ██╗ ██╗███████╗ █████╗ ██╗ ██╗ ██╗███████╗██████╗ ██╗ ██████╗ ██╗ ██╗
3+
██╔════╝██╔══██╗██║ ██║██╔════╝██╔══██╗██║ ██║ ██║██╔════╝██╔══██╗ ███║ ╚════██╗██║ ██║
4+
██║ ███████║██║ ██║███████╗███████║██║ ██║ █╗ ██║█████╗ ██████╔╝ ╚██║ █████╔╝███████║
5+
██║ ██╔══██║██║ ██║╚════██║██╔══██║██║ ██║███╗██║██╔══╝ ██╔══██╗ ██║ ╚═══██╗════██║
6+
╚██████╗██║ ██║╚██████╔╝███████║██║ ██║███████╗ ╚███╔███╔╝███████╗██████╔╝ ██║██╗██████╔╝██╗ ██║
7+
╚═════╝╚═╝ ╚═╝ ╚═════╝ ╚══════╝╚═╝ ╚═╝╚══════╝ ╚══╝╚══╝ ╚══════╝╚═════╝ ╚═╝╚═╝╚═════╝ ╚═╝═╝

src/main/resources/ccd.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ ccd.email.admin.sendto=${spring.mail.username}
4444
ccd.acct.reg.activ.required=false
4545

4646
# LABELS
47-
ccd.app.title=Causal Web v1.3.2
47+
ccd.app.title=Causal Web v1.3.4
4848
ccd.app.copyright=University of Pittsburgh and Carnegie Mellon University
4949

5050
ccd.app.agreement=TERMS AND CONDITIONS&#10;&#10;\
1.42 KB
Loading
1.33 KB
Loading
1.44 KB
Loading
1.46 KB
Loading

0 commit comments

Comments
 (0)