diff --git a/build.sbt b/build.sbt index 619910e..fe48284 100644 --- a/build.sbt +++ b/build.sbt @@ -61,6 +61,12 @@ lazy val examples = .dependsOn(core) .settings( commonSettings, + /** + * YAML 1.2 parser + * [[https://bitbucket.org/asomov/snakeyaml-engine]] + * [[https://repo1.maven.org/maven2/org/snakeyaml/snakeyaml-engine/]] + */ + libraryDependencies += "org.snakeyaml" % "snakeyaml-engine" % "2.7", assembly / assemblyJarName := "examples-" + version.value + ".jar" ) @@ -72,6 +78,7 @@ lazy val root = .dependsOn(docs, core, examples) .settings( commonSettings, + assembly / mainClass := Some("soda.tiles.fairness.example.main.EntryPoint"), assembly / assemblyJarName := "tiles-" + version.value + ".jar" ) diff --git a/core/src/main/scala/soda/tiles/fairness/pipeline/Package.scala b/core/src/main/scala/soda/tiles/fairness/pipeline/Package.scala index 18c9e4e..34d35f2 100644 --- a/core/src/main/scala/soda/tiles/fairness/pipeline/Package.scala +++ b/core/src/main/scala/soda/tiles/fairness/pipeline/Package.scala @@ -28,14 +28,12 @@ import soda.tiles.fairness.tile.FalsePosTile import soda.tiles.fairness.tile.NeededPTile import soda.tiles.fairness.tile.PredictionPTile import soda.tiles.fairness.tile.ReceivedSigmaPTile -import soda.tiles.fairness.tile.ResultPTile import soda.tiles.fairness.tile.SigmaTile import soda.tiles.fairness.tile.UnzipPairFstTile import soda.tiles.fairness.tile.UnzipPairSndTile import soda.tiles.fairness.tile.UnzipTripleFstTile import soda.tiles.fairness.tile.UnzipTripleSndTile import soda.tiles.fairness.tile.UnzipTripleTrdTile -import soda.tiles.fairness.tile.WithPTile import soda.tiles.fairness.tile.ZipTile @@ -190,9 +188,9 @@ trait UnbiasednessPipeline lazy val prediction_p_tile = PredictionPTile .mk (p0_evaluation) - lazy val result_p_tile = ResultPTile .mk (p1_result) + lazy val result_p_tile = AttributePTile .mk (p1_result) - lazy val with_p_tile = WithPTile .mk (p2_with_p) + lazy val with_p_tile = AttributePTile .mk (p2_with_p) lazy val false_pos_tile = FalsePosTile .mk diff --git a/core/src/main/scala/soda/tiles/fairness/pipeline/Package.soda b/core/src/main/scala/soda/tiles/fairness/pipeline/Package.soda index dec3a92..bc16bef 100644 --- a/core/src/main/scala/soda/tiles/fairness/pipeline/Package.soda +++ b/core/src/main/scala/soda/tiles/fairness/pipeline/Package.soda @@ -29,13 +29,11 @@ import soda.tiles.fairness.tile.NeededPTile soda.tiles.fairness.tile.PredictionPTile soda.tiles.fairness.tile.ReceivedSigmaPTile - soda.tiles.fairness.tile.ResultPTile soda.tiles.fairness.tile.SigmaTile soda.tiles.fairness.tile.UnzipPairFstTile soda.tiles.fairness.tile.UnzipPairSndTile soda.tiles.fairness.tile.UnzipTripleFstTile soda.tiles.fairness.tile.UnzipTripleSndTile soda.tiles.fairness.tile.UnzipTripleTrdTile - soda.tiles.fairness.tile.WithPTile soda.tiles.fairness.tile.ZipTile diff --git a/core/src/main/scala/soda/tiles/fairness/pipeline/UnbiasednessPipeline.soda b/core/src/main/scala/soda/tiles/fairness/pipeline/UnbiasednessPipeline.soda index e3b5b4b..a8ddcad 100644 --- a/core/src/main/scala/soda/tiles/fairness/pipeline/UnbiasednessPipeline.soda +++ b/core/src/main/scala/soda/tiles/fairness/pipeline/UnbiasednessPipeline.soda @@ -37,9 +37,9 @@ class UnbiasednessPipeline prediction_p_tile = PredictionPTile .mk (p0_evaluation) - result_p_tile = ResultPTile .mk (p1_result) + result_p_tile = AttributePTile .mk (p1_result) - with_p_tile = WithPTile .mk (p2_with_p) + with_p_tile = AttributePTile .mk (p2_with_p) false_pos_tile = FalsePosTile .mk diff --git a/core/src/main/scala/soda/tiles/fairness/tile/Package.scala b/core/src/main/scala/soda/tiles/fairness/tile/Package.scala index f505588..2e38cf5 100644 --- a/core/src/main/scala/soda/tiles/fairness/tile/Package.scala +++ b/core/src/main/scala/soda/tiles/fairness/tile/Package.scala @@ -677,35 +677,6 @@ object ReceivedSigmaPTile { } -/* -directive lean -import Soda.tiles.fairness.tool.TileMessage -import Soda.tiles.fairness.tile.AttributePTile -*/ - -/** - * This tile is a particular case of an 'AttributePTile', where the attribute is the 'result'. - * This tile is used to contrast obtained results to predicted results. - */ - -trait ResultPTile -{ - - def p : Actor => Measure - - def apply (message : TileMessage [Seq [Actor] ] ) : TileMessage [Seq [Measure] ] = - AttributePTile .mk (p) .apply (message) - -} - -case class ResultPTile_ (p : Actor => Measure) extends ResultPTile - -object ResultPTile { - def mk (p : Actor => Measure) : ResultPTile = - ResultPTile_ (p) -} - - /* directive lean import Soda.tiles.fairness.tool.TileMessage @@ -912,34 +883,6 @@ object UnzipTripleTrdTile { } -/* -directive lean -import Soda.tiles.fairness.tool.TileMessage -import Soda.tiles.fairness.tile.AttributePTile -*/ - -/** - * This tile is a particular case of a 'AttributePTile', that projects given property. - */ - -trait WithPTile -{ - - def p : Actor => Measure - - def apply (message : TileMessage [Seq [Actor] ] ) : TileMessage [Seq [Measure] ] = - AttributePTile .mk (p) .apply (message) - -} - -case class WithPTile_ (p : Actor => Measure) extends WithPTile - -object WithPTile { - def mk (p : Actor => Measure) : WithPTile = - WithPTile_ (p) -} - - /* directive lean import Soda.tiles.fairness.tool.TileMessage diff --git a/core/src/main/scala/soda/tiles/fairness/tile/ResultPTile.soda b/core/src/main/scala/soda/tiles/fairness/tile/ResultPTile.soda deleted file mode 100644 index cea8cbd..0000000 --- a/core/src/main/scala/soda/tiles/fairness/tile/ResultPTile.soda +++ /dev/null @@ -1,20 +0,0 @@ - -directive lean -import Soda.tiles.fairness.tool.TileMessage -import Soda.tiles.fairness.tile.AttributePTile - - -/** - * This tile is a particular case of an 'AttributePTile', where the attribute is the 'result'. - * This tile is used to contrast obtained results to predicted results. - */ - -class ResultPTile - - abstract - p : Actor -> Measure - - apply (message : TileMessage [Seq [Actor] ] ) : TileMessage [Seq [Measure] ] = - AttributePTile .mk (p) .apply (message) - -end diff --git a/core/src/main/scala/soda/tiles/fairness/tile/WithPTile.soda b/core/src/main/scala/soda/tiles/fairness/tile/WithPTile.soda deleted file mode 100644 index eab4546..0000000 --- a/core/src/main/scala/soda/tiles/fairness/tile/WithPTile.soda +++ /dev/null @@ -1,20 +0,0 @@ - -directive lean -import Soda.tiles.fairness.tool.TileMessage -import Soda.tiles.fairness.tile.AttributePTile - - -/** - * This tile is a particular case of a 'AttributePTile', that projects given property. - */ - -class WithPTile - - abstract - p : Actor -> Measure - - apply (message : TileMessage [Seq [Actor] ] ) : TileMessage [Seq [Measure] ] = - AttributePTile .mk (p) .apply (message) - -end - diff --git a/docs/README.md b/docs/README.md index e632c03..cb5108b 100644 --- a/docs/README.md +++ b/docs/README.md @@ -108,8 +108,8 @@ are: [ResourceAllocationScenarioExample]: https://github.com/julianmendez/tiles/blob/master/core/src/test/scala/soda/tiles/fairness/pipeline/ResourceAllocationScenarioExample.soda [EqualityPipelineSpec]: https://github.com/julianmendez/tiles/blob/master/core/src/test/scala/soda/tiles/fairness/pipeline/EqualityPipelineSpec.soda [EquityPipelineSpec]: https://github.com/julianmendez/tiles/blob/master/core/src/test/scala/soda/tiles/fairness/pipeline/EquityPipelineSpec.soda -[ccs-example]: ccs_example.html -[scoring-example]: scoring_example.html +[ccs-example]: https://julianmendez.github.io/tiles/ccs_example.html +[scoring-example]: https://julianmendez.github.io/tiles/scoring_example.html