Skip to content

Commit 84709a9

Browse files
committed
Fixed README and add Travis-CI
1 parent 46fe607 commit 84709a9

16 files changed

+702
-32
lines changed

.travis.yml

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
language: java
2+
addons:
3+
mariadb: '10.0'
4+
jdk:
5+
- oraclejdk8
6+
before_script:
7+
- mysql -e "use mysql; update user set password=PASSWORD('123456') where User='root'; flush privileges;" -uroot
8+
- mysql -uroot -p123456 < testsql/unielwin_course.sql
9+
- mysql -uroot -p123456 < testsql/unielwin_prof.sql
10+
- mysql -uroot -p123456 < testsql/unielwin_RA.sql
11+
- mysql -uroot -p123456 < testsql/unielwin_registration.sql
12+
- mysql -uroot -p123456 < testsql/unielwin_student.sql
13+
- mysql -uroot -p123456 < testsql/Mutagenesis_std_Atom.sql
14+
- mysql -uroot -p123456 < testsql/Mutagenesis_std_bond.sql
15+
- mysql -uroot -p123456 < testsql/Mutagenesis_std_Mole.sql
16+
- mysql -uroot -p123456 < testsql/Mutagenesis_std_moleatm.sql
17+
script:
18+
- cd jar
19+
- java -jar RunBB.jar > jar.txt
20+
- tail jar.txt
21+
- ls -lh
22+
- tail sort_merge.csv
23+
- tail Bif_unielwin.xml
24+
- tail dag_.txt
25+
- cd ../src
26+
- javac -cp ".:./lib/*" Config.java BZScriptRunner.java MakeSetup.java
27+
- javac -cp ".:./lib/*" RunBB.java
28+
- javac -cp ".:./lib/*" MakeTargetSetup.java
29+
- javac -cp ".:./lib/*" FunctorWrapper.java
30+
- mkdir src
31+
- mv config.cfg src/
32+
- mv scripts src/
33+
- java -cp ".:./lib/*" MakeSetup > a.txt
34+
- java -cp ".:./lib/*" RunBB > b.txt
35+
- java -cp ".:./lib/*" MakeTargetSetup > c.txt
36+
- nohup java -cp ".:./lib/*" FunctorWrapper > d.txt &
37+
- sleep 5m
38+
- ls -lh d.txt
39+
- sleep 5m
40+
- ls -lh d.txt
41+
- sleep 5m
42+
- ls -lh d.txt
43+
- sleep 5m
44+
- ls -lh d.txt
45+
- sleep 5m
46+
- ls -lh d.txt
47+
- sleep 5m
48+
- ls -lh d.txt
49+
- sleep 5m
50+
- ls -lh d.txt
51+
- sleep 5m
52+
- ls -lh d.txt
53+
- sleep 5m
54+
- ls -lh d.txt
55+
- sleep 5m
56+
- ls -lh d.txt
57+
- sleep 5m
58+
- ls -lh d.txt
59+
- sleep 5m
60+
- ls -lh d.txt
61+
- sleep 5m
62+
- ls -lh d.txt
63+
- sleep 5m
64+
- ls -lh d.txt
65+
- sleep 5m
66+
- ls -lh d.txt
67+
- sleep 5m
68+
- ls -lh d.txt
69+
- sleep 5m
70+
- ls -lh d.txt
71+
- sleep 5m
72+
- ls -lh d.txt
73+
- sleep 5m
74+
- ls -lh d.txt
75+
- sleep 5m
76+
- ls -lh d.txt
77+
- sleep 5m
78+
- ls -lh d.txt
79+
- sleep 5m
80+
- ls -lh d.txt
81+
- sleep 5m
82+
- ls -lh d.txt
83+
- sleep 5m
84+
- ls -lh d.txt
85+
- ls -lh
86+
- tail a.txt
87+
- tail b.txt
88+
- tail c.txt
89+
- tail d.txt
90+
- tail dag_.txt
91+
after_script:
92+
- mysql -e "show databases;" -uroot -p123456
93+
- mysql -e "use unielwin_BN; show tables;" -uroot -p123456
94+
- mysql -e "use unielwin_CT; show tables;" -uroot -p123456
95+
- mysql -e "use Mutagenesis_std_target_final_CT; show tables;" -uroot -p123456
96+
- mysql -e "use Mutagenesis_std_target_final; show tables;" -uroot -p123456
97+
- mysql -e "use Mutagenesis_std_target_CT; show tables;" -uroot -p123456
98+
- mysql -e "use Mutagenesis_std_target_BN; show tables;" -uroot -p123456
99+
- mysql -e "use Mutagenesis_std_target; show tables;" -uroot -p123456

README.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,26 @@
11
# BayesBase
2+
[![Build Status](https://travis-ci.org/sfu-cl-lab/BayesBase.svg?branch=master)](https://travis-ci.org/sfu-cl-lab/BayesBase)
23
The source code repository for the Bayes Base system. Most of the code are classes for CMU's Tetrad system. We may also add datasets if we get around to it.
34
For more information about this project, visit our [project website](http://www.cs.sfu.ca/~oschulte/BayesBase/BayesBase.html)
45
##How to Use
6+
First you should import data into your database. We provide two sets of example datasets in `testsql` folder. Then you can either run `.jar` or compile the source yourself.
57
###Run .jar
68
+ Modify `jar/src/config.cfg` with your own configuration according to format explained [here](http://www.cs.sfu.ca/~oschulte/BayesBase/options.html)
79
+ In `jar` folder, run `java -jar RunBB.jar`
10+
811
###Compile & Run
9-
+ Go into `src` folder and modify `config.cfg`
12+
+ Go into `src/cfg` folder and modify `subsetctcomputation.cfg`
1013
+ `javac -cp ".:./lib/*" Config.java BZScriptRunner.java MakeSetup.java`
11-
+ `java -cp ".:./lib/*" MakeSetup`
1214
+ `javac -cp ".:./lib/*" RunBB.java`
15+
+ `mkdir src`
16+
+ `mv scripts src/`
17+
+ `java -cp ".:./lib/*" MakeSetup`
1318
+ `java -cp ".:./lib/*" RunBB`
14-
+ `javac -cp ".:./lib/*" MakeTargetSetup.java`
15-
+ `java -cp ".:./lib/*" MakeTargetSetup`
16-
+ `javac -cp ".:./lib/*" FunctorWrapper.java`
17-
+ `java -cp ".:./lib/*" FunctorWrapper`
19+
+ Optionally set up the target database and run FunctorWrapper
20+
+ `javac -cp ".:./lib/*" MakeTargetSetup.java`
21+
+ `javac -cp ".:./lib/*" FunctorWrapper.java`
22+
+ `java -cp ".:./lib/*" MakeTargetSetup`
23+
+ `java -cp ".:./lib/*" FunctorWrapper`
24+
25+
## Project Specification
26+
Please visit our [project website](http://www.cs.sfu.ca/~oschulte/BayesBase/BayesBase.html)

jar/src/config.cfg

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
dbname = 1
2-
dbusername = 1
3-
dbpassword = 1
4-
dbaddress = mysql://xxx.sfu.ca
1+
dbname = unielwin
2+
dbusername = root
3+
dbpassword = 123456
4+
dbaddress = mysql://127.0.0.1
55
AutomaticSetup = 1
66
LinkCorrelations = 1
77
ComputeKLD = 0
8-
Continuous = 0
8+
Continuous = 0

src/cfg/fmtconfig.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
Address = mysql://xx.sfu.ca
2-
User = 1
3-
Password = 1
1+
Address = mysql://127.0.0.1
2+
User = root
3+
Password = 123456
44
SetupDBName = unielwin_fmt_setup
55
DataDBName = unielwin_fmt
66
OutDBName = unielwin_fmt_CT

src/cfg/scorecomputation.cfg

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
dbaddress = mysql://xxx.sfu.ca
2-
dbusername = 1
3-
dbpassword = 1
1+
dbaddress = mysql://127.0.0.1
2+
dbusername = root
3+
dbpassword = 123456
44
dbschema = unielwin_BN
55
dbcounts = unielwin_db
66
dbcondprob = unielwin_db

src/cfg/subsetctcomputation.cfg

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
dbaddress = mysql://xxx.sfu.ca
2-
dbusername = 1
3-
dbpassword = 1
4-
dbBNschema = Financial_std_Training2_BN
5-
dbDataSchema = Financial_std_Training2
6-
dbOutputSchema = Financial_std_Training2_db
1+
dbaddress = mysql://127.0.0.1
2+
dbusername = root
3+
dbpassword = 123456
4+
dbBNschema = Mutagenesis_std_BN
5+
dbDataSchema = Mutagenesis_std
6+
dbOutputSchema = Mutagenesis_std_db
77
pathBayesNet = Path_BayesNets
88

99
LinkAnalysis = 1
@@ -12,18 +12,18 @@ Continuous = 0
1212
Grounded = 0
1313

1414
/* real data for FunctorWrapper, cross validation: Financial_std_Training2*/
15-
dbname = Financial_std_Training2
15+
dbname = Mutagenesis_std
1616
AutomaticSetup = 1
1717
LinkCorrelations = 1
1818
ComputeKLD = 0
1919

20-
dbschema = Financial_std_Training2_BN
21-
dbcounts = Financial_std_Training2_db
22-
dbcondprob = Financial_std_Training2_db
20+
dbschema = Mutagenesis_std_BN
21+
dbcounts = Mutagenesis_std_db
22+
dbcondprob = Mutagenesis_std_db
2323

2424
/* FunctorWrapper should be 0; For TestScoreComputation should be 1, or the program will compute the parameters twice*/
2525
UseLocal_CT = 0
2626

2727
/*For Propositionalization, generating the subCT tables based on each family configuration, add one option to control the spliting; Sep 11, 2014, zqian */
28-
CrossValidation = 1
28+
CrossValidation = 0
2929

src/config.cfg

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
dbname = Hepatitis_std
2-
dbusername = 1
3-
dbpassword = 1
4-
dbaddress = mysql://xxx.sfu.ca
1+
dbname = Mutagenesis_std
2+
dbusername = root
3+
dbpassword = 123456
4+
dbaddress = mysql://127.0.0.1
55
AutomaticSetup = 0
66
LinkCorrelations = 1
77
ComputeKLD = 0

testsql/Mutagenesis_std_Atom.sql

Lines changed: 62 additions & 0 deletions
Large diffs are not rendered by default.

testsql/Mutagenesis_std_Mole.sql

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
CREATE DATABASE IF NOT EXISTS `Mutagenesis_std` /*!40100 DEFAULT CHARACTER SET latin1 */;
2+
USE `Mutagenesis_std`;
3+
-- MySQL dump 10.13 Distrib 5.1.69, for redhat-linux-gnu (x86_64)
4+
--
5+
-- Host: kripke.cs.sfu.ca Database: Mutagenesis_std
6+
-- ------------------------------------------------------
7+
-- Server version 5.0.95
8+
9+
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10+
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11+
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12+
/*!40101 SET NAMES utf8 */;
13+
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
14+
/*!40103 SET TIME_ZONE='+00:00' */;
15+
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
16+
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
17+
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
18+
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19+
20+
--
21+
-- Not dumping tablespaces as no INFORMATION_SCHEMA.FILES table on this server
22+
--
23+
24+
--
25+
-- Table structure for table `Mole`
26+
--
27+
28+
DROP TABLE IF EXISTS `Mole`;
29+
/*!40101 SET @saved_cs_client = @@character_set_client */;
30+
/*!40101 SET character_set_client = utf8 */;
31+
CREATE TABLE `Mole` (
32+
`m_id` smallint(8) NOT NULL,
33+
`ind1` varchar(45) default NULL,
34+
`inda` varchar(45) default NULL,
35+
`lumo` varchar(45) default NULL,
36+
`logp` varchar(45) default NULL,
37+
`label` varchar(45) default NULL,
38+
PRIMARY KEY USING BTREE (`m_id`),
39+
KEY `Mole_ind1` USING HASH (`ind1`),
40+
KEY `Mole_inda` USING HASH (`inda`),
41+
KEY `Mole_lumo` USING HASH (`lumo`),
42+
KEY `Mole_logp` USING HASH (`logp`),
43+
KEY `Mole_label` USING HASH (`label`)
44+
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
45+
/*!40101 SET character_set_client = @saved_cs_client */;
46+
47+
--
48+
-- Dumping data for table `Mole`
49+
--
50+
51+
LOCK TABLES `Mole` WRITE;
52+
/*!40000 ALTER TABLE `Mole` DISABLE KEYS */;
53+
INSERT INTO `Mole` VALUES (1,'1','0','7','5','1'),(2,'0','0','7','1','2'),(3,'0','0','7','2','2'),(4,'1','0','6','5','1'),(5,'0','0','6','2','2'),(6,'1','0','1','5','1'),(7,'0','0','8','5','2'),(8,'1','0','7','4','1'),(9,'0','0','8','2','2'),(10,'1','0','7','5','1'),(11,'1','0','7','5','1'),(12,'1','0','6','4','1'),(13,'1','0','4','5','1'),(14,'0','0','7','2','2'),(15,'1','0','6','5','1'),(16,'1','0','4','5','1'),(17,'0','0','9','1','2'),(18,'1','0','5','3','1'),(19,'0','0','7','2','2'),(20,'1','0','6','4','1'),(21,'0','0','6','4','1'),(22,'1','0','6','6','1'),(23,'1','1','4','6','1'),(24,'1','0','6','8','1'),(25,'1','0','7','4','1'),(26,'0','0','5','2','1'),(27,'1','0','6','7','1'),(28,'1','0','6','5','1'),(29,'1','0','2','3','1'),(30,'1','1','5','6','1'),(31,'1','0','5','5','1'),(32,'0','0','3','3','1'),(33,'1','0','6','5','1'),(34,'0','0','7','4','2'),(35,'1','0','7','3','1'),(36,'0','0','7','4','2'),(37,'0','0','7','5','1'),(38,'0','0','7','4','2'),(39,'0','0','7','2','2'),(40,'0','0','7','4','2'),(41,'1','0','6','6','1'),(42,'0','0','7','2','2'),(43,'1','0','6','5','1'),(44,'1','0','7','5','1'),(45,'0','0','4','1','1'),(46,'1','0','6','8','1'),(47,'1','0','5','6','1'),(48,'1','0','6','5','1'),(49,'1','0','2','2','1'),(50,'0','0','5','3','1'),(51,'1','0','4','7','1'),(52,'1','0','4','7','1'),(53,'1','0','4','4','1'),(54,'1','0','7','7','1'),(55,'0','0','7','4','2'),(56,'1','0','4','3','1'),(57,'0','0','4','4','1'),(58,'1','0','5','3','1'),(59,'1','1','5','6','1'),(60,'0','0','4','2','1'),(61,'1','0','6','5','1'),(62,'0','0','8','1','2'),(63,'0','0','2','3','1'),(64,'1','0','4','3','1'),(65,'0','0','5','3','2'),(66,'0','0','8','3','2'),(67,'1','0','6','5','1'),(68,'1','0','6','7','1'),(69,'1','0','5','4','1'),(70,'0','0','6','0','2'),(71,'1','0','5','7','1'),(72,'1','0','7','4','1'),(73,'0','0','9','3','2'),(74,'1','0','6','7','1'),(75,'0','0','5','4','1'),(76,'0','0','8','2','2'),(77,'0','0','8','3','2'),(78,'0','0','7','5','2'),(79,'1','0','7','6','1'),(80,'1','0','7','5','1'),(81,'0','0','5','1','1'),(82,'1','0','3','5','1'),(83,'1','0','8','4','1'),(84,'0','0','7','3','2'),(85,'1','1','5','6','1'),(86,'1','1','5','6','1'),(87,'1','0','7','4','1'),(88,'0','0','6','1','2'),(89,'0','0','8','2','2'),(90,'1','0','6','7','1'),(91,'1','0','5','3','1'),(92,'1','0','7','6','1'),(93,'1','0','6','7','1'),(94,'1','0','6','5','1'),(95,'0','0','4','3','1'),(96,'1','0','2','5','1'),(97,'1','0','7','5','1'),(98,'0','0','6','2','2'),(99,'1','0','4','3','1'),(100,'0','0','8','3','2'),(101,'1','0','6','7','1'),(102,'1','0','1','3','1'),(103,'1','0','7','5','1'),(104,'1','0','6','7','1'),(105,'1','0','6','2','1'),(106,'1','0','6','5','1'),(107,'1','0','2','5','1'),(108,'1','0','6','5','1'),(109,'1','0','4','7','1'),(110,'0','0','5','3','2'),(111,'0','0','6','2','2'),(112,'1','0','7','4','1'),(113,'0','0','7','2','2'),(114,'0','0','8','3','2'),(115,'0','0','8','3','1'),(116,'0','0','7','2','2'),(117,'0','0','5','4','1'),(118,'1','0','6','8','1'),(119,'0','0','5','4','2'),(120,'0','0','8','2','2'),(121,'1','0','3','5','1'),(122,'1','0','6','6','1'),(123,'0','0','8','5','2'),(124,'0','0','6','2','2'),(125,'1','0','7','6','1'),(126,'1','0','3','2','1'),(127,'0','0','4','4','1'),(128,'1','0','5','4','1'),(129,'0','0','6','1','2'),(130,'0','0','8','2','2'),(131,'0','0','6','3','2'),(132,'0','0','7','2','2'),(133,'1','0','7','9','2'),(134,'1','0','5','6','1'),(135,'0','0','6','3','2'),(136,'1','0','6','5','1'),(137,'1','0','4','5','1'),(138,'0','0','8','2','2'),(139,'0','0','8','3','2'),(140,'0','0','6','3','1'),(141,'0','0','7','3','2'),(142,'1','0','7','8','2'),(143,'0','0','8','3','2'),(144,'0','0','7','3','2'),(145,'0','0','7','3','1'),(146,'0','0','8','3','1'),(147,'0','0','8','2','2'),(148,'1','0','4','4','1'),(149,'1','0','2','2','1'),(150,'0','0','8','0','2'),(151,'0','0','7','2','1'),(152,'1','0','4','5','1'),(153,'1','0','8','4','1'),(154,'0','0','7','2','2'),(155,'0','0','6','2','2'),(156,'0','0','8','2','2'),(157,'1','0','6','5','1'),(158,'1','0','7','3','1'),(159,'1','0','6','5','1'),(160,'0','0','6','3','2'),(161,'1','0','4','7','1'),(162,'0','0','3','3','1'),(166,'1','0','6','5','1'),(167,'1','0','4','5','1'),(168,'0','0','8','2','2'),(169,'0','0','4','1','1'),(170,'1','0','5','3','1'),(171,'0','0','3','3','1'),(172,'0','0','7','2','1'),(173,'0','0','4','4','1'),(174,'1','0','4','5','1'),(175,'1','0','6','9','2'),(176,'0','0','7','3','1'),(177,'1','0','3','2','1'),(178,'0','0','7','2','1'),(179,'0','0','5','3','2'),(180,'1','0','4','7','1'),(181,'0','0','9','0','2'),(182,'0','0','7','2','2'),(183,'1','0','4','5','1'),(184,'1','0','5','5','1'),(185,'0','0','5','2','2'),(186,'0','0','9','2','2'),(187,'1','0','7','6','1'),(188,'1','0','8','4','2');
54+
/*!40000 ALTER TABLE `Mole` ENABLE KEYS */;
55+
UNLOCK TABLES;
56+
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
57+
58+
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
59+
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
60+
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
61+
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
62+
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
63+
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
64+
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
65+
66+
-- Dump completed on 2013-08-29 15:44:12

testsql/Mutagenesis_std_bond.sql

Lines changed: 63 additions & 0 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)