Repository: incubator-predictionio Updated Branches: refs/heads/livedoc 3d1b777d0 -> 205c5a73b
[PIO-44] Fix API doc generation Project: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/commit/205c5a73 Tree: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/tree/205c5a73 Diff: http://git-wip-us.apache.org/repos/asf/incubator-predictionio/diff/205c5a73 Branch: refs/heads/livedoc Commit: 205c5a73bea66e3b81531c5b4a54f3fdf45aded1 Parents: 3d1b777 Author: Donald Szeto <[email protected]> Authored: Mon Jan 23 16:51:40 2017 -0800 Committer: Donald Szeto <[email protected]> Committed: Mon Jan 23 16:51:40 2017 -0800 ---------------------------------------------------------------------- build.sbt | 166 ++++++++++--------- .../predictionio/annotation/DeveloperApi.java | 37 +++++ .../predictionio/annotation/Experimental.java | 38 +++++ .../predictionio/annotation/DeveloperApi.java | 37 ----- .../predictionio/annotation/Experimental.java | 38 ----- .../predictionio/data/storage/DataMap.scala | 5 +- docs/scaladoc/rootdoc.txt | 2 +- project/build.properties | 2 +- project/unidoc.sbt | 2 +- 9 files changed, 166 insertions(+), 161 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/build.sbt ---------------------------------------------------------------------- diff --git a/build.sbt b/build.sbt index bc2f254..eba8438 100644 --- a/build.sbt +++ b/build.sbt @@ -40,7 +40,7 @@ json4sVersion in ThisBuild := "3.2.10" sparkVersion in ThisBuild := "1.4.0" -lazy val pioBuildInfoSettings = buildInfoSettings ++ Seq( +val pioBuildInfoSettings = buildInfoSettings ++ Seq( sourceGenerators in Compile <+= buildInfo, buildInfoKeys := Seq[BuildInfoKey]( name, @@ -50,104 +50,108 @@ lazy val pioBuildInfoSettings = buildInfoSettings ++ Seq( sparkVersion), buildInfoPackage := "org.apache.predictionio.core") -lazy val conf = file(".") / "conf" +val conf = file(".") / "conf" -lazy val root = project in file(".") aggregate( - common, - core, - data, - tools, - e2) +val commonSettings = Seq( + autoAPIMappings := true) -lazy val common = (project in file("common")). +val common = (project in file("common")). + settings(commonSettings: _*). + settings(genjavadocSettings: _*). settings(unmanagedClasspath in Test += conf) -lazy val core = (project in file("core")). - dependsOn(data). +val data = (project in file("data")). + dependsOn(common). + settings(commonSettings: _*). settings(genjavadocSettings: _*). - settings(pioBuildInfoSettings: _*). - enablePlugins(SbtTwirl). settings(unmanagedClasspath in Test += conf) -lazy val data = (project in file("data")). - dependsOn(common). +val core = (project in file("core")). + dependsOn(data). + settings(commonSettings: _*). settings(genjavadocSettings: _*). + settings(pioBuildInfoSettings: _*). + enablePlugins(SbtTwirl). settings(unmanagedClasspath in Test += conf) -lazy val tools = (project in file("tools")). +val tools = (project in file("tools")). dependsOn(core). dependsOn(data). + settings(commonSettings: _*). + settings(genjavadocSettings: _*). enablePlugins(SbtTwirl). settings(unmanagedClasspath in Test += conf) -lazy val e2 = (project in file("e2")). +val e2 = (project in file("e2")). + settings(commonSettings: _*). settings(genjavadocSettings: _*). settings(unmanagedClasspath in Test += conf) -scalaJavaUnidocSettings - -// scalaUnidocSettings - -unidocAllSources in (JavaUnidoc, unidoc) := { - (unidocAllSources in (JavaUnidoc, unidoc)).value - .map(_.filterNot(_.getName.contains("$"))) -} - -scalacOptions in (ScalaUnidoc, unidoc) ++= Seq( - "-groups", - "-skip-packages", - Seq( - "akka", - "breeze", - "html", - "org.apache.predictionio.annotation", - "org.apache.predictionio.controller.html", - "org.apache.predictionio.data.api", - "org.apache.predictionio.data.view", - "org.apache.predictionio.workflow", - "org.apache.predictionio.tools", - "org", - "scalikejdbc").mkString(":"), - "-doc-title", - "PredictionIO Scala API", - "-doc-version", - version.value, - "-doc-root-content", - "docs/scaladoc/rootdoc.txt") - -javacOptions in (JavaUnidoc, unidoc) := Seq( - "-subpackages", - "org.apache.predictionio", - "-exclude", - Seq( - "org.apache.predictionio.controller.html", - "org.apache.predictionio.data.api", - "org.apache.predictionio.data.view", - "org.apache.predictionio.data.webhooks.*", - "org.apache.predictionio.workflow", - "org.apache.predictionio.tools", - "org.apache.hadoop").mkString(":"), - "-windowtitle", - "PredictionIO Javadoc " + version.value, - "-group", - "Java Controllers", - Seq( - "org.apache.predictionio.controller.java", - "org.apache.predictionio.data.store.java").mkString(":"), - "-group", - "Scala Base Classes", - Seq( - "org.apache.predictionio.controller", - "org.apache.predictionio.core", - "org.apache.predictionio.data.storage", - "org.apache.predictionio.data.storage.*", - "org.apache.predictionio.data.store").mkString(":"), - "-overview", - "docs/javadoc/javadoc-overview.html", - "-noqualifier", - "java.lang") - -lazy val pioUnidoc = taskKey[Unit]("Builds PredictionIO ScalaDoc and Javadoc") +val root = (project in file(".")). + settings(commonSettings: _*). + // settings(scalaJavaUnidocSettings: _*). + settings(unidocSettings: _*). + settings( + scalacOptions in (ScalaUnidoc, unidoc) ++= Seq( + "-groups", + "-skip-packages", + Seq( + "akka", + "org.apache.predictionio.annotation", + "org.apache.predictionio.authentication", + "org.apache.predictionio.configuration", + "org.apache.predictionio.controller.html", + "org.apache.predictionio.controller.java", + "org.apache.predictionio.data.api", + "org.apache.predictionio.data.view", + "org.apache.predictionio.tools", + "scalikejdbc").mkString(":"), + "-doc-title", + "PredictionIO Scala API", + "-doc-version", + version.value, + "-doc-root-content", + "docs/scaladoc/rootdoc.txt")). + settings( + javacOptions in (JavaUnidoc, unidoc) := Seq( + "-subpackages", + "org.apache.predictionio", + "-exclude", + Seq( + "org.apache.predictionio.controller.html", + "org.apache.predictionio.data.api", + "org.apache.predictionio.data.view", + "org.apache.predictionio.data.webhooks.*", + "org.apache.predictionio.workflow", + "org.apache.predictionio.tools", + "org.apache.hadoop").mkString(":"), + "-windowtitle", + "PredictionIO Javadoc " + version.value, + "-group", + "Java Controllers", + Seq( + "org.apache.predictionio.controller.java", + "org.apache.predictionio.data.store.java").mkString(":"), + "-group", + "Scala Base Classes", + Seq( + "org.apache.predictionio.controller", + "org.apache.predictionio.core", + "org.apache.predictionio.data.storage", + "org.apache.predictionio.data.storage.*", + "org.apache.predictionio.data.store").mkString(":"), + "-overview", + "docs/javadoc/javadoc-overview.html", + "-noqualifier", + "java.lang")). + aggregate( + common, + core, + data, + tools, + e2) + +val pioUnidoc = taskKey[Unit]("Builds PredictionIO ScalaDoc") pioUnidoc := { (unidoc in Compile).value http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/common/src/main/java/org/apache/predictionio/annotation/DeveloperApi.java ---------------------------------------------------------------------- diff --git a/common/src/main/java/org/apache/predictionio/annotation/DeveloperApi.java b/common/src/main/java/org/apache/predictionio/annotation/DeveloperApi.java new file mode 100644 index 0000000..39b6064 --- /dev/null +++ b/common/src/main/java/org/apache/predictionio/annotation/DeveloperApi.java @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.apache.predictionio.annotation; + +import java.lang.annotation.*; + +/** + * A lower-level, unstable API intended for developers. + * + * Developer API's might change or be removed in minor versions of Spark. + * + * NOTE: If there exists a Scaladoc comment that immediately precedes this + * annotation, the first line of the comment must be ":: DeveloperApi ::" with + * no trailing blank line. This is because of the known issue that Scaladoc + * displays only either the annotation or the comment, whichever comes first. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, + ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, + ElementType.PACKAGE}) +public @interface DeveloperApi {} http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/common/src/main/java/org/apache/predictionio/annotation/Experimental.java ---------------------------------------------------------------------- diff --git a/common/src/main/java/org/apache/predictionio/annotation/Experimental.java b/common/src/main/java/org/apache/predictionio/annotation/Experimental.java new file mode 100644 index 0000000..4f10eb2 --- /dev/null +++ b/common/src/main/java/org/apache/predictionio/annotation/Experimental.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +package org.apache.predictionio.annotation; + +import java.lang.annotation.*; + +/** + * An experimental user-facing API. + * + * Experimental API's might change or be removed, or be adopted as first-class + * API's. + * + * NOTE: If there exists a Scaladoc comment that immediately precedes this + * annotation, the first line of the comment must be ":: Experimental ::" with + * no trailing blank line. This is because of the known issue that Scaladoc + * displays only either the annotation or the comment, whichever comes first. + */ +@Retention(RetentionPolicy.RUNTIME) +@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, + ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, + ElementType.PACKAGE}) +public @interface Experimental {} http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/common/src/main/scala/org/apache/predictionio/annotation/DeveloperApi.java ---------------------------------------------------------------------- diff --git a/common/src/main/scala/org/apache/predictionio/annotation/DeveloperApi.java b/common/src/main/scala/org/apache/predictionio/annotation/DeveloperApi.java deleted file mode 100644 index 39b6064..0000000 --- a/common/src/main/scala/org/apache/predictionio/annotation/DeveloperApi.java +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.apache.predictionio.annotation; - -import java.lang.annotation.*; - -/** - * A lower-level, unstable API intended for developers. - * - * Developer API's might change or be removed in minor versions of Spark. - * - * NOTE: If there exists a Scaladoc comment that immediately precedes this - * annotation, the first line of the comment must be ":: DeveloperApi ::" with - * no trailing blank line. This is because of the known issue that Scaladoc - * displays only either the annotation or the comment, whichever comes first. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, - ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, - ElementType.PACKAGE}) -public @interface DeveloperApi {} http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/common/src/main/scala/org/apache/predictionio/annotation/Experimental.java ---------------------------------------------------------------------- diff --git a/common/src/main/scala/org/apache/predictionio/annotation/Experimental.java b/common/src/main/scala/org/apache/predictionio/annotation/Experimental.java deleted file mode 100644 index 4f10eb2..0000000 --- a/common/src/main/scala/org/apache/predictionio/annotation/Experimental.java +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -package org.apache.predictionio.annotation; - -import java.lang.annotation.*; - -/** - * An experimental user-facing API. - * - * Experimental API's might change or be removed, or be adopted as first-class - * API's. - * - * NOTE: If there exists a Scaladoc comment that immediately precedes this - * annotation, the first line of the comment must be ":: Experimental ::" with - * no trailing blank line. This is because of the known issue that Scaladoc - * displays only either the annotation or the comment, whichever comes first. - */ -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, - ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, - ElementType.PACKAGE}) -public @interface Experimental {} http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/data/src/main/scala/org/apache/predictionio/data/storage/DataMap.scala ---------------------------------------------------------------------- diff --git a/data/src/main/scala/org/apache/predictionio/data/storage/DataMap.scala b/data/src/main/scala/org/apache/predictionio/data/storage/DataMap.scala index 666f3bb..2eca6cc 100644 --- a/data/src/main/scala/org/apache/predictionio/data/storage/DataMap.scala +++ b/data/src/main/scala/org/apache/predictionio/data/storage/DataMap.scala @@ -35,8 +35,9 @@ case class DataMapException(msg: String, cause: Exception) /** A DataMap stores properties of the event or entity. Internally it is a Map * whose keys are property names and values are corresponding JSON values - * respectively. Use the [[get]] method to retrieve the value of a mandatory - * property or use [[getOpt]] to retrieve the value of an optional property. + * respectively. Use the [[get[T](name: String,clazz: Class[T])]] method to + * retrieve the value of a mandatory property or use [[getOpt]] to retrieve the + * value of an optional property. * * @param fields Map of property name to JValue * @group Event Data http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/docs/scaladoc/rootdoc.txt ---------------------------------------------------------------------- diff --git a/docs/scaladoc/rootdoc.txt b/docs/scaladoc/rootdoc.txt index 00db0ed..3b45317 100644 --- a/docs/scaladoc/rootdoc.txt +++ b/docs/scaladoc/rootdoc.txt @@ -1,4 +1,4 @@ -This is the API documentation of PredictionIO. +This is the API documentation of Apache PredictionIO (incubating). == Package Structure == http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/project/build.properties ---------------------------------------------------------------------- diff --git a/project/build.properties b/project/build.properties index 748703f..27e88aa 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.7 +sbt.version=0.13.13 http://git-wip-us.apache.org/repos/asf/incubator-predictionio/blob/205c5a73/project/unidoc.sbt ---------------------------------------------------------------------- diff --git a/project/unidoc.sbt b/project/unidoc.sbt index 0605421..7700b32 100644 --- a/project/unidoc.sbt +++ b/project/unidoc.sbt @@ -1 +1 @@ -addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.2") +addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.3.3")
