Skip to content

Commit

Permalink
Move under higherkindness package (#46)
Browse files Browse the repository at this point in the history
* Move every package under higherkindness
* Update docs
* Update README properly
Close #18
  • Loading branch information
JesusMtnez committed Dec 12, 2018
1 parent 747066f commit b8ee3ab
Show file tree
Hide file tree
Showing 22 changed files with 68 additions and 88 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

[comment]: # (Start Badges)

[![Build Status](https://travis-ci.org/higherkindness/skeuomorph.svg?branch=master)](https://travis-ci.org/higherkindness/skeuomorph) [![codecov.io](http://codecov.io/github/higherkindness/skeuomorph/coverage.svg?branch=master)](http://codecov.io/github/higherkindness/skeuomorph?branch=master) [![Maven Central](https://img.shields.io/badge/maven%20central-0.0.2-green.svg)](https://oss.sonatype.org/#nexus-search;gav~io.higherkindness~skeuomorph*) [![Latest version](https://img.shields.io/badge/skeuomorph-0.0.2-green.svg)](https://index.scala-lang.org/higherkindness/skeuomorph) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/higherkindness/skeuomorph/master/LICENSE) [![Join the chat at https://gitter.im/higherkindness/skeuomorph](https://badges.gitter.im/higherkindness/skeuomorph.svg)](https://gitter.im/higherkindness/skeuomorph?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub Issues](https://img.shields.io/github/issues/higherkindness/skeuomorph.svg)](https://github.com/higherkindness/skeuomorph/issues)
[![Build Status](https://travis-ci.org/frees-io/skeuomorph.svg?branch=master)](https://travis-ci.org/frees-io/skeuomorph) [![codecov.io](http://codecov.io/github/frees-io/skeuomorph/coverage.svg?branch=master)](http://codecov.io/github/frees-io/skeuomorph?branch=master) [![Maven Central](https://img.shields.io/badge/maven%20central-0.0.1-green.svg)](https://oss.sonatype.org/#nexus-search;gav~io.frees~skeuomorph*) [![Latest version](https://img.shields.io/badge/skeuomorph-0.0.1-green.svg)](https://index.scala-lang.org/frees-io/skeuomorph) [![License](https://img.shields.io/badge/license-Apache%202-blue.svg)](https://raw.githubusercontent.com/frees-io/skeuomorph/master/LICENSE) [![Join the chat at https://gitter.im/frees-io/skeuomorph](https://badges.gitter.im/frees-io/skeuomorph.svg)](https://gitter.im/frees-io/skeuomorph?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![GitHub Issues](https://img.shields.io/github/issues/frees-io/skeuomorph.svg)](https://github.com/frees-io/skeuomorph/issues)

[comment]: # (End Badges)

Expand Down Expand Up @@ -35,7 +35,7 @@ You can install skeuomorph as follows:
[comment]: # (Start Replace)

```scala
libraryDependencies += "io.higherkindness" %% "skeuomorph" % "0.0.2"
libraryDependencies += "io.higherkindness" %% "skeuomorph" % "0.0.1"
```

[comment]: # (End Replace)
Expand All @@ -46,10 +46,10 @@ libraryDependencies += "io.higherkindness" %% "skeuomorph" % "0.0.2"

```scala
import org.apache.avro._
import skeuomorph.mu.Transform.transformAvro
import skeuomorph.mu.MuF
import skeuomorph.mu.print
import skeuomorph.avro.AvroF.fromAvro
import higherkindness.skeuomorph.mu.Transform.transformAvro
import higherkindness.skeuomorph.mu.MuF
import higherkindness.skeuomorph.mu.print
import higherkindness.skeuomorph.avro.AvroF.fromAvro
import qq.droste._
import qq.droste.data._
import qq.droste.data.Mu._
Expand Down Expand Up @@ -121,4 +121,4 @@ Skeuomorph is designed and developed by 47 Degrees

Copyright (C) 2018 47 Degrees. <http://47deg.com>

[comment]: # (End Copyright)
[comment]: # (End Copyright)
4 changes: 2 additions & 2 deletions docs/src/main/tut/optimizations.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ import qq.droste._
import qq.droste.data._
import qq.droste.implicits._
import skeuomorph.mu._
import skeuomorph.mu.MuF._
import higherkindness.skeuomorph.mu._
import higherkindness.skeuomorph.mu.MuF._
```

We found that when we wanted to render a schema to its string
Expand Down
8 changes: 4 additions & 4 deletions readme/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ libraryDependencies += "io.higherkindness" %% "skeuomorph" % "0.0.1"

```tut:silent
import org.apache.avro._
import skeuomorph.mu.Transform.transformAvro
import skeuomorph.mu.MuF
import skeuomorph.mu.print
import skeuomorph.avro.AvroF.fromAvro
import higherkindness.skeuomorph.mu.Transform.transformAvro
import higherkindness.skeuomorph.mu.MuF
import higherkindness.skeuomorph.mu.print
import higherkindness.skeuomorph.avro.AvroF.fromAvro
import qq.droste._
import qq.droste.data._
import qq.droste.data.Mu._
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/Printer.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package skeuomorph
package higherkindness.skeuomorph

import catz.contrib.Decidable
import cats.syntax.compose._
Expand Down
17 changes: 8 additions & 9 deletions src/main/scala/avro/Protocol.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@
* limitations under the License.
*/

package skeuomorph
package avro
package higherkindness.skeuomorph.avro

import org.apache.avro.Schema
import org.apache.avro.{Protocol => AvroProtocol}
import scala.collection.JavaConverters._

import cats.syntax.option._
import cats.data.NonEmptyList
import cats.syntax.option._
import higherkindness.skeuomorph.mu
import higherkindness.skeuomorph.mu.{MuF, SerializationType}
import io.circe.Json
import org.apache.avro.{Schema, Protocol => AvroProtocol}
import qq.droste._
import qq.droste.syntax.all._
import mu.{MuF, SerializationType}
import io.circe.Json

import scala.collection.JavaConverters._

final case class Protocol[A](
name: String,
Expand Down
9 changes: 4 additions & 5 deletions src/main/scala/avro/schema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@
* limitations under the License.
*/

package skeuomorph
package avro

import scala.collection.JavaConverters._
package higherkindness.skeuomorph.avro

import cats.Functor
import cats.data.NonEmptyList
import qq.droste.{Algebra, Coalgebra}
import io.circe.Json
import org.apache.avro.Schema
import org.apache.avro.Schema.Type
import qq.droste.{Algebra, Coalgebra}

import scala.collection.JavaConverters._

sealed trait AvroF[A]
object AvroF {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

package skeuomorph
package catz
package contrib
package higherkindness.skeuomorph.catz.contrib

import cats.ContravariantMonoidal

Expand Down
4 changes: 1 addition & 3 deletions src/main/scala/catz/contrib/Decidable.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,7 @@
* limitations under the License.
*/

package skeuomorph
package catz
package contrib
package higherkindness.skeuomorph.catz.contrib

import cats.ContravariantMonoidal

Expand Down
7 changes: 3 additions & 4 deletions src/main/scala/mu/Optimize.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
* limitations under the License.
*/

package skeuomorph
package mu
package higherkindness.skeuomorph.mu

import qq.droste._
import MuF._
import cats.data.NonEmptyList
import higherkindness.skeuomorph.mu.MuF._
import qq.droste._

/**
* Optimize object contains transformations in same schema
Expand Down
7 changes: 3 additions & 4 deletions src/main/scala/mu/Transform.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
* limitations under the License.
*/

package skeuomorph
package mu
package higherkindness.skeuomorph.mu

import higherkindness.skeuomorph.avro.AvroF
import higherkindness.skeuomorph.protobuf.ProtobufF
import qq.droste.Trans
import protobuf.ProtobufF
import avro.AvroF

object Transform {

Expand Down
19 changes: 9 additions & 10 deletions src/main/scala/mu/print.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@
* limitations under the License.
*/

package skeuomorph
package mu
package higherkindness.skeuomorph.mu

import Optimize.namedTypes
import cats.instances.function._
import cats.syntax.compose._

import higherkindness.skeuomorph.Printer
import higherkindness.skeuomorph.Printer._
import higherkindness.skeuomorph.catz.contrib.ContravariantMonoidalSyntax._
import higherkindness.skeuomorph.catz.contrib.Decidable._
import higherkindness.skeuomorph.mu.MuF._
import higherkindness.skeuomorph.mu.Optimize.namedTypes
import higherkindness.skeuomorph.mu.SerializationType._
import qq.droste._
import MuF._
import catz.contrib.ContravariantMonoidalSyntax._
import catz.contrib.Decidable._
import Printer._
import SerializationType._

object print {

Expand Down Expand Up @@ -71,7 +70,7 @@ object print {
*/
def protoTuple[T](
proto: Protocol[T]
): ((((Option[String], List[(String, String)]), String), List[T]), List[skeuomorph.mu.Service[T]]) =
): ((((Option[String], List[(String, String)]), String), List[T]), List[higherkindness.skeuomorph.mu.Service[T]]) =
proto match {
case Protocol(name, pkg, options, declarations, services) =>
((((pkg, options), name), declarations), services)
Expand Down
11 changes: 5 additions & 6 deletions src/main/scala/mu/protocol.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@
* limitations under the License.
*/

package skeuomorph
package mu

import avro.AvroF
import Transform.transformAvro
package higherkindness.skeuomorph.mu

import higherkindness.skeuomorph.avro
import higherkindness.skeuomorph.avro.AvroF
import higherkindness.skeuomorph.mu.Transform.transformAvro
import qq.droste._

sealed trait SerializationType extends Product with Serializable
Expand All @@ -39,7 +38,7 @@ final case class Protocol[T](
object Protocol {

/**
* create a [[skeuomorph.mu.Service]] from a [[skeuomorph.avro.Protocol]]
* create a [[higherkindness.skeuomorph.mu.Service]] from a [[higherkindness.skeuomorph.avro.Protocol]]
*/
def fromAvroProtocol[T, U](proto: avro.Protocol[T])(implicit T: Basis[AvroF, T], U: Basis[MuF, U]): Protocol[U] = {

Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/mu/schema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* limitations under the License.
*/

package skeuomorph
package mu
package higherkindness.skeuomorph.mu

import cats.Functor
import cats.data.NonEmptyList
Expand Down
7 changes: 3 additions & 4 deletions src/main/scala/openapi/JsonEncoders.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,12 @@
* limitations under the License.
*/

package skeuomorph
package openapi
package higherkindness.skeuomorph.openapi

import schema._
import higherkindness.skeuomorph.openapi.schema._
import io.circe.{Encoder, Json}
import qq.droste._
import qq.droste.syntax.all._
import io.circe.{Encoder, Json}

object JsonEncoders {

Expand Down
4 changes: 1 addition & 3 deletions src/main/scala/openapi/JsonSchema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,10 @@
* limitations under the License.
*/

package skeuomorph
package openapi
package higherkindness.skeuomorph.openapi

import cats.Functor
import io.circe.Json

import qq.droste._
import qq.droste.data.Fix

Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/openapi/schema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* limitations under the License.
*/

package skeuomorph
package openapi
package higherkindness.skeuomorph.openapi

/**
* @see https://swagger.io/specification/
Expand Down
4 changes: 2 additions & 2 deletions src/main/scala/protobuf/print.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
* limitations under the License.
*/

package skeuomorph
package protobuf
package higherkindness.skeuomorph.protobuf

import higherkindness.skeuomorph.Printer
import qq.droste._

object print {
Expand Down
3 changes: 1 addition & 2 deletions src/main/scala/protobuf/schema.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
* limitations under the License.
*/

package skeuomorph
package protobuf
package higherkindness.skeuomorph.protobuf

import cats.Functor

Expand Down
2 changes: 1 addition & 1 deletion src/test/scala/PrinterSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package skeuomorph
package higherkindness.skeuomorph

import org.typelevel.discipline.specs2.Discipline
import cats.kernel.laws.discipline.{MonoidTests, SemigroupTests}
Expand Down
10 changes: 4 additions & 6 deletions src/test/scala/avro/AvroSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,15 @@
* limitations under the License.
*/

package skeuomorph
package avro
package higherkindness.skeuomorph.avro

import org.apache.avro.Schema
import scala.collection.JavaConverters._

import org.specs2._
import org.scalacheck._

import org.specs2._
import qq.droste._

import scala.collection.JavaConverters._

class AvroSpec extends Specification with ScalaCheck {

import instances._
Expand Down
5 changes: 2 additions & 3 deletions src/test/scala/instances.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,16 @@
* limitations under the License.
*/

package skeuomorph
package avro
package higherkindness.skeuomorph.avro

import cats.data.NonEmptyList
import cats.implicits._
import higherkindness.skeuomorph.mu.MuF
import org.apache.avro.Schema
import org.apache.avro.Schema.Type
import org.scalacheck._
import org.scalacheck.cats.implicits._
import qq.droste.Basis
import skeuomorph.mu.MuF

import scala.collection.JavaConverters._

Expand Down
9 changes: 4 additions & 5 deletions src/test/scala/mu/OptimizeSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,18 @@
* limitations under the License.
*/

package skeuomorph
package mu
package higherkindness.skeuomorph.mu

import org.scalacheck.Prop
import org.specs2.{ScalaCheck, Specification}
import qq.droste._
import qq.droste.data._
import skeuomorph.mu.MuF.TCoproduct
import skeuomorph.mu.Optimize._
import higherkindness.skeuomorph.mu.MuF.TCoproduct
import higherkindness.skeuomorph.mu.Optimize._

class OptimizeSpec extends Specification with ScalaCheck {

import skeuomorph.avro.instances._
import higherkindness.skeuomorph.avro.instances._

def is =
s2"""
Expand Down

0 comments on commit b8ee3ab

Please sign in to comment.