Skip to content

Commit

Permalink
macrobase-lib 0.1 (stanford-futuredata#192)
Browse files Browse the repository at this point in the history
* Initial DataFrame code

* Change ItemsetEncoder to encode columns

* Add get column method for dataframes

* Adding select and filter to dataframe

* Initial test based on seen usage

* Initial refactor of BatchSummarize, FPGrowth, FPGrowthEmerging etc.

* dataframe CSV loader

* fixing dependencies

* dataframe csv loader

* updating supervisedtest

* Move ItemsetEncoder to summarizer

* percentile classifier and unsupervised csv test

* support for building source and javadoc jars

`mvn verify` will now build two associated jars:
one for sources and one for javadocs, which we can upload
to maven to make it easier to use the library

* Addressed some of Peter's comments
- renamed core -> runtime
- changed groupId in pom.xml
- Rename EncodedItemsetResult->ItemsetResult, ItemsetResult->AttributeSet, ItemsetEncoder->AttributeEncoder
- Throw MacrobaseException instead of RuntimeException
- Renamed all filter methods in DataFrame to filter()
- Removed Apriori and dead code
CSVParser and DataFrame not finished

* Minor tweaks in filter API

* Removing unstable csv parser

* Add getRows() in DataFrame; enable attr combinations by default

* improving test coverage

* changing loadrows to a constructor

Trying to make dataframes as immutable as possible

* core=>runtime renaming clean up

* Rename modules

* More javadoc comments

* pgp plugin

* Changed exception in DataFrame

* test coverage, bugfix for summarizer

* Add deploy plugins to lib module
You can upload the SNAPSHOT module right now by 'mvn clean deploy'!

* independent maven package

* adding full package namespace
  • Loading branch information
edgan8 authored and kexinrong committed Mar 25, 2017
1 parent 485162a commit fdfd2bb
Show file tree
Hide file tree
Showing 156 changed files with 3,972 additions and 44 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: java
jdk: oraclejdk8
install: mvn install -DskipTests=true -Dgpg.skip=true -Dmaven.javadoc.skip=true -B -V
notifications:
slack: stanford-futuredata:qmO6Keu8ifOyXHsmSQ97CeLH
after_success:
Expand Down
10 changes: 5 additions & 5 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
Expand All @@ -12,17 +12,17 @@

<dependencies>
<dependency>
<groupId>macrobase</groupId>
<artifactId>macrobase-core</artifactId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-legacy</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-frontend</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-contrib</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
Expand Down
2 changes: 1 addition & 1 deletion bin/batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
conf_file=${1:-"conf/batch.yaml"}

set -x
java ${JAVA_OPTS} -cp "core/target/classes:frontend/target/classes:frontend/src/main/resources/:contrib/target/classes:assembly/target/*:$CLASSPATH" macrobase.MacroBase pipeline $conf_file
java ${JAVA_OPTS} -cp "legacy/target/classes:frontend/target/classes:frontend/src/main/resources/:contrib/target/classes:assembly/target/*:$CLASSPATH" macrobase.MacroBase pipeline $conf_file
2 changes: 1 addition & 1 deletion bin/server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ conf_file=${1:-"conf/macrobase.yaml"}

set -x

java ${JAVA_OPTS} -cp "core/target/classes:frontend/target/classes:frontend/src/main/resources/:contrib/target/classes:assembly/target/*:$CLASSPATH" macrobase.runtime.MacroBaseServer server $conf_file
java ${JAVA_OPTS} -cp "legacy/target/classes:frontend/target/classes:frontend/src/main/resources/:contrib/target/classes:assembly/target/*:$CLASSPATH" macrobase.runtime.MacroBaseServer server $conf_file
2 changes: 1 addition & 1 deletion bin/streaming.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
conf_file=${1:-"conf/streaming.yaml"}

set -x
java ${JAVA_OPTS} -cp "core/target/classes:frontend/target/classes:frontend/src/main/resources/:contrib/target/classes:assembly/target/*:$CLASSPATH" macrobase.MacroBase pipeline $conf_file
java ${JAVA_OPTS} -cp "legacy/target/classes:frontend/target/classes:frontend/src/main/resources/:contrib/target/classes:assembly/target/*:$CLASSPATH" macrobase.MacroBase pipeline $conf_file
8 changes: 4 additions & 4 deletions contrib/pom.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-contrib</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<name>macrobase-contrib</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>macrobase</groupId>
<artifactId>macrobase-core</artifactId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-legacy</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
<dependency>
Expand Down
8 changes: 4 additions & 4 deletions frontend/pom.xml
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-frontend</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<name>macrobase-frontend</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>

<dependencies>
<dependency>
<groupId>macrobase</groupId>
<artifactId>macrobase-core</artifactId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-legacy</artifactId>
<version>0.1-SNAPSHOT</version>
</dependency>
</dependencies>
Expand Down
28 changes: 24 additions & 4 deletions core/pom.xml → legacy/pom.xml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>macrobase</groupId>
<artifactId>macrobase-core</artifactId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-legacy</artifactId>
<packaging>jar</packaging>
<version>0.1-SNAPSHOT</version>
<name>macrobase-core</name>
<name>macrobase-legacy</name>
<url>http://maven.apache.org</url>
<parent>
<groupId>macrobase</groupId>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
Expand Down Expand Up @@ -61,6 +61,26 @@
<version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-core</artifactId>
<version>${dropwizard.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-assets</artifactId>
<version>${dropwizard.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-logging</artifactId>
<version>${dropwizard.version}</version>
</dependency>
<dependency>
<groupId>io.dropwizard</groupId>
<artifactId>dropwizard-db</artifactId>
<version>${dropwizard.version}</version>
</dependency>
</dependencies>

<build>
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
147 changes: 147 additions & 0 deletions lib/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>edu.stanford.futuredata</groupId>
<artifactId>macrobase-lib</artifactId>
<version>0.1-SNAPSHOT</version>
<name>macrobase</name>
<url>https://github.com/stanford-futuredata/macrobase</url>
<description>
MacroBase is an anomaly detection engine designed to prioritize human attention
in large-scale datasets and data streams.
macrobase-lib provides operators for standalone API usage of classifiers and summarizers.
</description>
<licenses>
<license>
<name>Apache License, Version 2.0</name>
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<name>Peter Bailis</name>
<email>[email protected]</email>
<organization>Stanford</organization>
<organizationUrl>http://www.bailis.org</organizationUrl>
</developer>
</developers>
<scm>
<connection>scm:git:git://github.com/stanford-futuredata/macrobase.git</connection>
<developerConnection>scm:git:ssh://github.com/stanford-futuredata/macrobase.git</developerConnection>
<url>https://github.com/stanford-futuredata/macrobase</url>
</scm>



<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>21.0</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-math3</artifactId>
<version>3.6</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-csv</artifactId>
<version>1.2</version>
</dependency>
</dependencies>

<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<profiles>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.0.1</version>
<executions>
<execution>
<id>attach-sources</id>
<phase>verify</phase>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.4</version>
<executions>
<execution>
<id>attach-javadocs</id>
<phase>verify</phase>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<id>sign-artifacts</id>
<phase>deploy</phase>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.7</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>

</project>
Loading

0 comments on commit fdfd2bb

Please sign in to comment.