Skip to content

Commit 9e7709d

Browse files
committed
Moving DynaML to a multiple module structure 1) Root 2) core 3) pipes 4) examples
1 parent e67b4ea commit 9e7709d

File tree

125 files changed

+65
-149
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

125 files changed

+65
-149
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ build/*.jar
1212
.settings
1313
.cache
1414
target/*
15+
dynaml-core/target/*
16+
dynaml-examples/target/*
17+
dynaml-pipes/target/*
1518
.DS_Store
1619
release.properties
1720
*.log

build.sbt

Lines changed: 43 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import sbt._
22
import java.io.File
33

4+
import sbtbuildinfo.BuildInfoPlugin.autoImport._
5+
46
maintainer := "Mandar Chandorkar <[email protected]>"
57

68
packageSummary := "Scala Library/REPL for Machine Learning Research"
@@ -12,14 +14,13 @@ packageDescription := "DynaML is a scala library/repl for implementing and worki
1214

1315
val dataDirectory = settingKey[File]("The directory holding the data files for running example scripts")
1416

15-
lazy val commonSettings = Seq(
16-
name := "DynaML",
17+
val baseSettings = Seq(
1718
organization := "io.github.mandar2812",
18-
version := "v1.4-beta.7",
1919
scalaVersion in ThisBuild := "2.11.7",
20-
mainClass in Compile := Some("io.github.mandar2812.dynaml.DynaML"),
21-
fork in run := true,
22-
resolvers in ThisBuild ++= Seq("jzy3d-releases" at "http://maven.jzy3d.org/releases"),
20+
resolvers in ThisBuild ++= Seq("jzy3d-releases" at "http://maven.jzy3d.org/releases")
21+
)
22+
23+
lazy val commonSettings = Seq(
2324
libraryDependencies ++= Seq(
2425
"org.scala-lang" % "scala-compiler" % scalaVersion.value % "compile",
2526
"org.scala-lang" % "scala-library" % scalaVersion.value % "compile",
@@ -42,15 +43,41 @@ lazy val commonSettings = Seq(
4243
"com.quantifind" % "wisp_2.11" % "0.0.4" % "compile",
4344
"org.jzy3d" % "jzy3d-api" % "0.9.1" % "compile",
4445
"com.lihaoyi" % "ammonite-repl_2.11.7" % "0.5.8"
45-
),
46-
dataDirectory := new File("data/"),
47-
initialCommands in console := """io.github.mandar2812.dynaml.DynaML.run(banner="""" +
48-
target.value.getPath + """/universal/stage/conf/banner.txt");"""
46+
)
4947
)
5048

49+
lazy val pipes = (project in file("dynaml-pipes")).settings(baseSettings:_*)
50+
.settings(
51+
name := "dynaml-pipes",
52+
version := "1.0"
53+
)
54+
55+
lazy val core = (project in file("dynaml-core")).settings(baseSettings)
56+
.settings(commonSettings:_*)
57+
.enablePlugins(JavaAppPackaging, BuildInfoPlugin)
58+
.dependsOn(pipes)
59+
.settings(
60+
name := "dynaml-core",
61+
version := "v1.4-beta.7"
62+
)
63+
64+
lazy val examples = (project in file("dynaml-examples"))
65+
.settings(baseSettings:_*)
66+
.settings(commonSettings:_*)
67+
.settings(
68+
name := "dynaml-examples",
69+
version := "1.0"
70+
).dependsOn(pipes, core)
71+
5172
lazy val DynaML = (project in file(".")).enablePlugins(JavaAppPackaging, BuildInfoPlugin)
73+
.settings(baseSettings:_*)
5274
.settings(commonSettings: _*)
75+
.dependsOn(core, examples, pipes)
5376
.settings(
77+
//aggregate in update := false,
78+
name := "DynaML",
79+
version := "v1.4-beta.7",
80+
fork in run := true,
5481
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
5582
buildInfoPackage := "io.github.mandar2812.dynaml.repl",
5683
buildInfoUsePackageAsPath := true,
@@ -67,6 +94,10 @@ lazy val DynaML = (project in file(".")).enablePlugins(JavaAppPackaging, BuildIn
6794
// -J params will be added as jvm parameters
6895
"-J-Xmx2048m",
6996
"-J-Xms64m"
70-
)
71-
)
97+
),
98+
dataDirectory := new File("data/"),
99+
initialCommands in console := """io.github.mandar2812.dynaml.DynaML.run(banner="""" +
100+
target.value.getPath + """/universal/stage/conf/banner.txt");"""
101+
102+
)
72103

src/main/scala/io/github/mandar2812/dynaml/DynaMLPipe.scala renamed to dynaml-core/src/main/scala-2.11/io/github/mandar2812/dynaml/DynaMLPipe.scala

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,14 @@
1-
/*
2-
Licensed to the Apache Software Foundation (ASF) under one
3-
or more contributor license agreements. See the NOTICE file
4-
distributed with this work for additional information
5-
regarding copyright ownership. The ASF licenses this file
6-
to you under the Apache License, Version 2.0 (the
7-
"License"); you may not use this file except in compliance
8-
with the License. You may obtain a copy of the License at
9-
10-
http://www.apache.org/licenses/LICENSE-2.0
11-
12-
Unless required by applicable law or agreed to in writing,
13-
software distributed under the License is distributed on an
14-
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15-
KIND, either express or implied. See the License for the
16-
specific language governing permissions and limitations
17-
under the License.
18-
* */
191
package io.github.mandar2812.dynaml
202

3+
import scala.collection.mutable.{MutableList => ML}
214
import breeze.linalg.DenseVector
225
import io.github.mandar2812.dynaml.evaluation.RegressionMetrics
236
import io.github.mandar2812.dynaml.models.ParameterizedLearner
247
import io.github.mandar2812.dynaml.models.gp.AbstractGPRegressionModel
25-
import io.github.mandar2812.dynaml.optimization.{
26-
CoupledSimulatedAnnealing, GPMLOptimizer,
27-
GloballyOptWithGrad, GridSearch}
28-
import io.github.mandar2812.dynaml.pipes.{DataPipe, ParallelPipe, StreamDataPipe}
8+
import io.github.mandar2812.dynaml.optimization.{CoupledSimulatedAnnealing, GPMLOptimizer, GloballyOptWithGrad, GridSearch}
9+
import io.github.mandar2812.dynaml.pipes.{DataPipe, StreamDataPipe}
2910
import org.apache.log4j.Logger
3011

31-
import scala.collection.mutable.{MutableList => ML}
32-
3312
/**
3413
* @author mandar2812 datum 3/2/16.
3514
*
@@ -325,7 +304,7 @@ object DynaMLPipe {
325304
* Takes a base pipe and creates a parallel pipe by duplicating it.
326305
*
327306
* @param pipe The base data pipe
328-
* @return a [[ParallelPipe]] object.
307+
* @return a [[io.github.mandar2812.dynaml.pipes.ParallelPipe]] object.
329308
* */
330309
def duplicate[Source, Destination](pipe: DataPipe[Source, Destination]) =
331310
DataPipe(pipe, pipe)

0 commit comments

Comments
 (0)