From 311d071770ea621711edf6020c9ab8de7758011a Mon Sep 17 00:00:00 2001 From: areese-stripe <45765932+areese-stripe@users.noreply.github.com> Date: Thu, 31 Jan 2019 14:14:58 -0500 Subject: [PATCH] Generated new Bazel BUILD files and hand-corrected core's BUILD (#322) --- WORKSPACE | 32 ++++++++++++++++++++++++++++++-- rainier-benchmark/BUILD | 5 ++++- rainier-cats/BUILD | 2 ++ rainier-core/BUILD | 32 +++++++++++++++++++++++--------- rainier-docs/BUILD | 3 +++ rainier-example/BUILD | 6 ++++++ rainier-plot/BUILD | 2 ++ rainier-scalacheck/BUILD | 2 ++ rainier-tests/BUILD | 6 +++++- 9 files changed, 77 insertions(+), 13 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 0e800f2bc..6727bcfd9 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -36,7 +36,7 @@ bind( ) scala_maven_import_external( name = 'com_cibo_evilplot_2_12', - artifact = 'com.cibo:evilplot_2.12:0.2.0', + artifact = 'com.cibo:evilplot_2.12:0.6.0', licenses = [], server_urls = [ 'https://repo1.maven.org/maven2/', @@ -48,6 +48,34 @@ bind( name = 'jar/com/cibo/evilplot_2_12', actual = '@com_cibo_evilplot_2_12//jar' ) +scala_maven_import_external( + name = 'com_google_code_findbugs_jsr305', + artifact = 'com.google.code.findbugs:jsr305:3.0.1', + licenses = [], + server_urls = [ + 'https://repo1.maven.org/maven2/', + 'https://dl.bintray.com/cibotech/public/', + 'http://dl.bintray.com/tpolecat/maven', + ] +) +bind( + name = 'jar/com/google/code/findbugs/jsr305', + actual = '@com_google_code_findbugs_jsr305//jar' +) +scala_maven_import_external( + name = 'com_google_flogger_flogger', + artifact = 'com.google.flogger:flogger:0.3.1', + licenses = [], + server_urls = [ + 'https://repo1.maven.org/maven2/', + 'https://dl.bintray.com/cibotech/public/', + 'http://dl.bintray.com/tpolecat/maven', + ] +) +bind( + name = 'jar/com/google/flogger/flogger', + actual = '@com_google_flogger_flogger//jar' +) scala_maven_import_external( name = 'io_circe_circe_core_2_12', artifact = 'io.circe:circe-core_2.12:0.9.0', @@ -260,7 +288,7 @@ bind( ) scala_maven_import_external( name = 'org_scala_lang_scala_reflect', - artifact = 'org.scala-lang:scala-reflect:2.12.4', + artifact = 'org.scala-lang:scala-reflect:2.12.8', licenses = [], server_urls = [ 'https://repo1.maven.org/maven2/', diff --git a/rainier-benchmark/BUILD b/rainier-benchmark/BUILD index ddc2eae48..0bf7d771c 100644 --- a/rainier-benchmark/BUILD +++ b/rainier-benchmark/BUILD @@ -8,6 +8,8 @@ load( scala_library( name = 'rainierBenchmark', deps = [ + '//external:jar/com/google/code/findbugs/jsr305', + '//external:jar/com/google/flogger/flogger', '//external:jar/net/sf/jopt/simple/jopt_simple', '//external:jar/org/apache/commons/commons_math3', '//external:jar/org/openjdk/jmh/jmh_core', @@ -24,6 +26,7 @@ scala_library( '//visibility:public', ], srcs = [ - 'src/main/scala/com/stripe/rainier/bench/RealBenchmark.scala', + 'src/main/scala/com/stripe/rainier/bench/SBCBenchmark.scala', + 'src/main/scala/com/stripe/rainier/bench/RegressionBenchmark.scala', ] ) \ No newline at end of file diff --git a/rainier-cats/BUILD b/rainier-cats/BUILD index f6dfc1b98..d56e3dc0f 100644 --- a/rainier-cats/BUILD +++ b/rainier-cats/BUILD @@ -8,6 +8,8 @@ load( scala_library( name = 'rainierCats', deps = [ + '//external:jar/com/google/code/findbugs/jsr305', + '//external:jar/com/google/flogger/flogger', '//external:jar/org/scala/lang/scala_reflect', '//external:jar/org/typelevel/cats_core_2_12', '//external:jar/org/typelevel/cats_kernel_2_12', diff --git a/rainier-core/BUILD b/rainier-core/BUILD index 11d717baf..56fc1b1e7 100644 --- a/rainier-core/BUILD +++ b/rainier-core/BUILD @@ -10,64 +10,78 @@ scala_library( deps = [ '//.rainier-shaded-asm:asmShaded', '//.rainier-shaded-asm:asmTreeShaded', + '//external:jar/com/google/flogger/flogger', + + ], + runtime_deps = [ + '//external:jar/com/google/flogger/flogger_system_backend', + '//external:jar/com/google/code/findbugs/jsr305', ], - runtime_deps = [], exports = [], visibility = [ '//visibility:public', ], srcs = [ - 'src/main/scala/com/stripe/rainier/unused.scala', 'src/main/scala/com/stripe/rainier/core/Discrete.scala', 'src/main/scala/com/stripe/rainier/core/RandomVariable.scala', 'src/main/scala/com/stripe/rainier/core/Combinatorics.scala', 'src/main/scala/com/stripe/rainier/core/Continuous.scala', + 'src/main/scala/com/stripe/rainier/core/Log.scala', 'src/main/scala/com/stripe/rainier/core/Generator.scala', 'src/main/scala/com/stripe/rainier/core/Injection.scala', 'src/main/scala/com/stripe/rainier/core/Predictor.scala', - 'src/main/scala/com/stripe/rainier/core/Mapping.scala', 'src/main/scala/com/stripe/rainier/core/Support.scala', 'src/main/scala/com/stripe/rainier/core/Distribution.scala', 'src/main/scala/com/stripe/rainier/core/Categorical.scala', - 'src/main/scala/com/stripe/rainier/core/Placeholder.scala', 'src/main/scala/com/stripe/rainier/core/SBC.scala', 'src/main/scala/com/stripe/rainier/core/Likelihood.scala', 'src/main/scala/com/stripe/rainier/ir/ExprMethodGenerator.scala', - 'src/main/scala/com/stripe/rainier/ir/ApplyClassGenerator.scala', + 'src/main/scala/com/stripe/rainier/ir/OutputClassGenerator.scala', 'src/main/scala/com/stripe/rainier/ir/VarType.scala', 'src/main/scala/com/stripe/rainier/ir/Ops.scala', + 'src/main/scala/com/stripe/rainier/ir/OutputMethodGenerator.scala', + 'src/main/scala/com/stripe/rainier/ir/Log.scala', + 'src/main/scala/com/stripe/rainier/ir/IRViz.scala', 'src/main/scala/com/stripe/rainier/ir/CompiledFunction.scala', 'src/main/scala/com/stripe/rainier/ir/GeneratedClassLoader.scala', + 'src/main/scala/com/stripe/rainier/ir/GraphViz.scala', 'src/main/scala/com/stripe/rainier/ir/ExprClassGenerator.scala', 'src/main/scala/com/stripe/rainier/ir/MethodGenerator.scala', - 'src/main/scala/com/stripe/rainier/ir/ApplyMethodGenerator.scala', 'src/main/scala/com/stripe/rainier/ir/ClassGenerator.scala', 'src/main/scala/com/stripe/rainier/ir/IR.scala', - 'src/main/scala/com/stripe/rainier/ir/Tracer.scala', + 'src/main/scala/com/stripe/rainier/ir/DataFunction.scala', 'src/main/scala/com/stripe/rainier/ir/Packer.scala', 'src/main/scala/com/stripe/rainier/repl/DensityPlot.scala', 'src/main/scala/com/stripe/rainier/repl/package.scala', 'src/main/scala/com/stripe/rainier/compute/PartialEvaluator.scala', + 'src/main/scala/com/stripe/rainier/compute/Coefficients.scala', 'src/main/scala/com/stripe/rainier/compute/Evaluator.scala', + 'src/main/scala/com/stripe/rainier/compute/Log.scala', 'src/main/scala/com/stripe/rainier/compute/Target.scala', 'src/main/scala/com/stripe/rainier/compute/Recording.scala', 'src/main/scala/com/stripe/rainier/compute/Translator.scala', 'src/main/scala/com/stripe/rainier/compute/Real.scala', + 'src/main/scala/com/stripe/rainier/compute/RealViz.scala', + 'src/main/scala/com/stripe/rainier/compute/Encoder.scala', + 'src/main/scala/com/stripe/rainier/compute/ToMap.scala', 'src/main/scala/com/stripe/rainier/compute/LogLineOps.scala', 'src/main/scala/com/stripe/rainier/compute/RealOps.scala', - 'src/main/scala/com/stripe/rainier/compute/Context.scala', 'src/main/scala/com/stripe/rainier/compute/Compiler.scala', 'src/main/scala/com/stripe/rainier/compute/Gradient.scala', 'src/main/scala/com/stripe/rainier/compute/LineOps.scala', - 'src/main/scala/com/stripe/rainier/compute/ToMap.scala', 'src/main/scala/com/stripe/rainier/compute/ToReal.scala', 'src/main/scala/com/stripe/rainier/sampler/DualAvg.scala', + 'src/main/scala/com/stripe/rainier/sampler/DensityFunction.scala', 'src/main/scala/com/stripe/rainier/sampler/Walkers.scala', + 'src/main/scala/com/stripe/rainier/sampler/Log.scala', + 'src/main/scala/com/stripe/rainier/sampler/Ehmc.scala', 'src/main/scala/com/stripe/rainier/sampler/MAP.scala', 'src/main/scala/com/stripe/rainier/sampler/LeapFrog.scala', 'src/main/scala/com/stripe/rainier/sampler/WalkersChain.scala', 'src/main/scala/com/stripe/rainier/sampler/RNG.scala', 'src/main/scala/com/stripe/rainier/sampler/Sampler.scala', 'src/main/scala/com/stripe/rainier/sampler/HMC.scala', + 'src/main/scala/com/stripe/rainier/unused.scala', + 'src/main/scala/com/stripe/rainier/log/Logger.scala', ] ) \ No newline at end of file diff --git a/rainier-docs/BUILD b/rainier-docs/BUILD index 036dde70a..b9102ccc0 100644 --- a/rainier-docs/BUILD +++ b/rainier-docs/BUILD @@ -8,7 +8,10 @@ load( scala_library( name = 'rainierDocs', deps = [ + '//external:jar/com/google/code/findbugs/jsr305', + '//external:jar/com/google/flogger/flogger', '//rainier-core:rainierCore', + '//rainier-trace:rainierTrace', ], runtime_deps = [], exports = [], diff --git a/rainier-example/BUILD b/rainier-example/BUILD index 4ddc0bd99..7dee4f19d 100644 --- a/rainier-example/BUILD +++ b/rainier-example/BUILD @@ -10,6 +10,8 @@ scala_library( deps = [ '//external:jar/com/chuusai/shapeless_2_12', '//external:jar/com/cibo/evilplot_2_12', + '//external:jar/com/google/code/findbugs/jsr305', + '//external:jar/com/google/flogger/flogger', '//external:jar/io/circe/circe_core_2_12', '//external:jar/io/circe/circe_generic_2_12', '//external:jar/io/circe/circe_generic_extras_2_12', @@ -34,11 +36,15 @@ scala_library( ], srcs = [ 'src/main/scala/com/stripe/rainier/example/FitSparse.scala', + 'src/main/scala/com/stripe/rainier/example/LookupNormal.scala', 'src/main/scala/com/stripe/rainier/example/DLM.scala', 'src/main/scala/com/stripe/rainier/example/FitHLL.scala', 'src/main/scala/com/stripe/rainier/example/Anova.scala', 'src/main/scala/com/stripe/rainier/example/Funnel.scala', 'src/main/scala/com/stripe/rainier/example/FitNormal.scala', + 'src/main/scala/com/stripe/rainier/example/stan/EightSchools.scala', + 'src/main/scala/com/stripe/rainier/example/stan/ARK.scala', + 'src/main/scala/com/stripe/rainier/example/stan/LowDimGaussMix.scala', 'src/main/scala/com/stripe/rainier/example/BatchNormal.scala', 'src/main/scala/com/stripe/rainier/example/SBCNormal.scala', 'src/main/scala/com/stripe/rainier/example/LogReg.scala', diff --git a/rainier-plot/BUILD b/rainier-plot/BUILD index 559941296..9638d8b2f 100644 --- a/rainier-plot/BUILD +++ b/rainier-plot/BUILD @@ -10,6 +10,8 @@ scala_library( deps = [ '//external:jar/com/chuusai/shapeless_2_12', '//external:jar/com/cibo/evilplot_2_12', + '//external:jar/com/google/code/findbugs/jsr305', + '//external:jar/com/google/flogger/flogger', '//external:jar/io/circe/circe_core_2_12', '//external:jar/io/circe/circe_generic_2_12', '//external:jar/io/circe/circe_generic_extras_2_12', diff --git a/rainier-scalacheck/BUILD b/rainier-scalacheck/BUILD index b2cb721d1..e90caf5c0 100644 --- a/rainier-scalacheck/BUILD +++ b/rainier-scalacheck/BUILD @@ -8,6 +8,8 @@ load( scala_library( name = 'rainierScalacheck', deps = [ + '//external:jar/com/google/code/findbugs/jsr305', + '//external:jar/com/google/flogger/flogger', '//external:jar/org/scala/lang/scala_reflect', '//external:jar/org/scala/sbt/test_interface', '//external:jar/org/scalacheck/scalacheck_2_12', diff --git a/rainier-tests/BUILD b/rainier-tests/BUILD index 8d02aa0cb..94b60a7e1 100644 --- a/rainier-tests/BUILD +++ b/rainier-tests/BUILD @@ -8,6 +8,8 @@ load( scala_library( name = 'rainierTests', deps = [ + '//external:jar/com/google/code/findbugs/jsr305', + '//external:jar/com/google/flogger/flogger', '//external:jar/org/scala/lang/modules/scala_xml_2_12', '//external:jar/org/scala/lang/scala_reflect', '//external:jar/org/scala/sbt/test_interface', @@ -34,5 +36,7 @@ scala_library( visibility = [ '//visibility:public', ], - srcs = [] + srcs = [ + 'src/main/scala/com/stripe/rainier/core/SBCModel.scala', + ] ) \ No newline at end of file