From 1d7f9e6c76592714af35f1f32ff4565e4d27f024 Mon Sep 17 00:00:00 2001 From: Juan Pedro Moreno Date: Thu, 23 Apr 2020 11:03:54 +0200 Subject: [PATCH] Updates Project --- AUTHORS.md | 19 +++++++++ CODE_OF_CONDUCT.md | 22 ++++++++++ CONTRIBUTING.md | 31 ++++++++++++++ LICENSE => LICENSE.md | 6 +-- NOTICE.md | 9 ++++ build.sbt | 36 +++------------- project/ProjectPlugin.scala | 41 +++++++++++++++++++ project/plugins.sbt | 15 ++++--- src/main/scala/pureconfiglib/Domain.scala | 2 +- .../scala/pureconfiglib/LoadingConfig.scala | 2 +- .../pureconfiglib/PureConfigLibrary.scala | 2 +- .../scala/pureconfiglib/SupportedTypes.scala | 2 +- .../pureconfiglib/LoadingConfigSpec.scala | 2 +- src/test/scala/pureconfiglib/TypesSpec.scala | 2 +- 14 files changed, 146 insertions(+), 45 deletions(-) create mode 100644 AUTHORS.md create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md rename LICENSE => LICENSE.md (99%) create mode 100644 NOTICE.md create mode 100644 project/ProjectPlugin.scala diff --git a/AUTHORS.md b/AUTHORS.md new file mode 100644 index 0000000..9c7e67f --- /dev/null +++ b/AUTHORS.md @@ -0,0 +1,19 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Authors + +## Maintainers + +The maintainers of the project are: + +- [![juanpedromoreno](https://avatars2.githubusercontent.com/u/4879373?v=4&s=20) **Juan Pedro Moreno (juanpedromoreno)**](https://github.com/juanpedromoreno) +- [![paualarco](https://avatars0.githubusercontent.com/u/33580722?v=4&s=20) **Pau Alarcón (paualarco)**](https://github.com/paualarco) + +## Contributors + +These are the people that have contributed to the _exercises-pureconfig_ project: + +- [![paualarco](https://avatars0.githubusercontent.com/u/33580722?v=4&s=20) **paualarco**](https://github.com/paualarco) +- [![juanpedromoreno](https://avatars2.githubusercontent.com/u/4879373?v=4&s=20) **juanpedromoreno**](https://github.com/juanpedromoreno) \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..1cf05d1 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,22 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Code of Conduct + +We are committed to providing a friendly, safe and welcoming +environment for all, regardless of level of experience, gender, gender +identity and expression, sexual orientation, disability, personal +appearance, body size, race, ethnicity, age, religion, nationality, or +other such characteristics. + +Everyone is expected to follow the +[Scala Code of Conduct](https://typelevel.org/code-of-conduct.html) when +discussing the project on the available communication channels. If you +are being harassed, please contact us immediately so that we can +support you. + +## Moderation + +For any questions, concerns, or moderation requests please contact a +[member of the project](AUTHORS.md#maintainers). \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..5cedba4 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +# Contributing + +Discussion around _exercises-pureconfig_ happens in the [GitHub issues](https://github.com/scala-exercises/exercises-pureconfig/issues) and [pull requests](https://github.com/scala-exercises/exercises-pureconfig/pulls). + +Feel free to open an issue if you notice a bug, have an idea for a feature, or have a question about +the code. Pull requests are also welcome. + +People are expected to follow the [Code of Conduct](CODE_OF_CONDUCT.md) when discussing _exercises-pureconfig_ on the Github page or other venues. + +If you are being harassed, please contact one of [us](AUTHORS.md#maintainers) immediately so that we can support you. In case you cannot get in touch with us please write an email to [47 Degrees](mailto:scala-exercises@47deg.com). + +## How can I help? + +_exercises-pureconfig_ follows a standard [fork and pull](https://help.github.com/articles/using-pull-requests/) model for contributions via GitHub pull requests. + +The process is simple: + + 1. Find something you want to work on + 2. Let us know you are working on it via GitHub issues/pull requests + 3. Implement your contribution + 4. Write tests + 5. Update the documentation + 6. Submit pull request + +You will be automatically included in the [AUTHORS.md](AUTHORS.md#contributors) file as contributor in the next release. + +If you encounter any confusion or frustration during the contribution process, please create a GitHub issue and we'll do our best to improve the process. \ No newline at end of file diff --git a/LICENSE b/LICENSE.md similarity index 99% rename from LICENSE rename to LICENSE.md index 8dada3e..22d4401 100644 --- a/LICENSE +++ b/LICENSE.md @@ -178,7 +178,7 @@ APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "{}" + boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright {yyyy} {name of copyright owner} + Copyright (C) 2020 47 Degrees Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -198,4 +198,4 @@ 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. + limitations under the License. \ No newline at end of file diff --git a/NOTICE.md b/NOTICE.md new file mode 100644 index 0000000..c67c3be --- /dev/null +++ b/NOTICE.md @@ -0,0 +1,9 @@ +[comment]: <> (Don't edit this file!) +[comment]: <> (It is automatically updated after every release of https://github.com/47degrees/.github) +[comment]: <> (If you want to suggest a change, please open a PR or issue in that repository) + +exercises-pureconfig + +Copyright (c) 2020 47 Degrees. All rights reserved. + +Licensed under Apache-2.0. See [LICENSE](LICENSE.md) for terms. \ No newline at end of file diff --git a/build.sbt b/build.sbt index c3b39d2..e6fffb6 100644 --- a/build.sbt +++ b/build.sbt @@ -1,38 +1,14 @@ addCommandAlias("ci-test", "scalafmtCheck; scalafmtSbtCheck; test") -addCommandAlias("ci-docs", "project-docs/mdoc") +addCommandAlias("ci-docs", "github; project-docs/mdoc; headerCreateAll") -val scalaExercisesV = "0.6.0-SNAPSHOT" - -def dep(artifactId: String) = "org.scala-exercises" %% artifactId % scalaExercisesV - -lazy val template = (project in file(".")) +lazy val exercises = (project in file(".")) .enablePlugins(ExerciseCompilerPlugin) - .settings( - organization := "org.scala-exercises", - name := "exercises-pureconfig", - scalaVersion := "2.13.1", - version := "0.0.1", - resolvers ++= Seq( - Resolver.sonatypeRepo("snapshots"), - Resolver.sonatypeRepo("releases") - ), - libraryDependencies ++= Seq( - dep("exercise-compiler"), - dep("definitions"), - %%("shapeless", "2.3.3"), - %%("scalatest", "3.1.1"), - %%("scalacheck", "1.14.3"), - "com.github.pureconfig" %% "pureconfig" % "0.12.2", - "com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % "1.2.4", - "org.scalatestplus" %% "scalatestplus-scalacheck" % "3.1.0.0-RC2" - ), - addCompilerPlugin("org.typelevel" %% "kind-projector" % "0.11.0" cross CrossVersion.full) - ) + .settings(exercisesSettings) lazy val `project-docs` = (project in file(".docs")) - .aggregate(template) - .dependsOn(template) - .settings(moduleName := "template-project-docs") + .aggregate(exercises) + .dependsOn(exercises) + .settings(moduleName := "exercises-project-docs") .settings(mdocIn := file(".docs")) .settings(mdocOut := file(".")) .settings(skip in publish := true) diff --git a/project/ProjectPlugin.scala b/project/ProjectPlugin.scala new file mode 100644 index 0000000..a420c24 --- /dev/null +++ b/project/ProjectPlugin.scala @@ -0,0 +1,41 @@ +import sbt.Keys._ +import sbt._ +import com.alejandrohdezma.sbt.github.SbtGithubPlugin + +object ProjectPlugin extends AutoPlugin { + + override def trigger: PluginTrigger = allRequirements + + override def requires: Plugins = plugins.JvmPlugin && SbtGithubPlugin + + object autoImport { + + val scalaExercisesV = "0.6.0-SNAPSHOT" + + def dep(artifactId: String) = "org.scala-exercises" %% artifactId % scalaExercisesV + + lazy val exercisesSettings = Seq( + libraryDependencies ++= Seq( + dep("exercise-compiler"), + dep("definitions"), + "com.chuusai" %% "shapeless" % "2.3.3", + "com.github.pureconfig" %% "pureconfig" % "0.12.2", + "com.github.alexarchambault" %% "scalacheck-shapeless_1.14" % "1.2.5", + "org.scalatest" %% "scalatest" % "3.1.1", + "org.scalatestplus" %% "scalacheck-1-14" % "3.1.1.1" + ) + ) + } + + override def projectSettings: Seq[Def.Setting[_]] = + Seq( + organization := "org.scala-exercises", + organizationName := "47 Degrees", + organizationHomepage := Some(url("https://47deg.com")), + scalaVersion := "2.13.1", + resolvers ++= Seq( + Resolver.sonatypeRepo("snapshots"), + Resolver.sonatypeRepo("releases") + ) + ) +} diff --git a/project/plugins.sbt b/project/plugins.sbt index ee04561..c2d9942 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,7 +1,10 @@ resolvers += Resolver.sonatypeRepo("snapshots") -addSbtPlugin("com.47deg" % "sbt-org-policies" % "0.13.3") -addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.6.0-SNAPSHOT") -addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") -addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5") -addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.3") -addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2") +addSbtPlugin("org.scala-exercises" % "sbt-exercise" % "0.6.0-SNAPSHOT") +addSbtPlugin("com.geirsson" % "sbt-ci-release" % "1.5.3") +addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.1.5") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.3.4") +addSbtPlugin("de.heikoseeberger" % "sbt-header" % "5.6.0") +addSbtPlugin("com.alejandrohdezma" %% "sbt-github" % "0.8.0") +addSbtPlugin("com.alejandrohdezma" % "sbt-github-header" % "0.8.0") +addSbtPlugin("com.alejandrohdezma" % "sbt-github-mdoc" % "0.8.0") +addSbtPlugin("com.alejandrohdezma" % "sbt-mdoc-toc" % "0.2") diff --git a/src/main/scala/pureconfiglib/Domain.scala b/src/main/scala/pureconfiglib/Domain.scala index d6dbe88..aeab194 100644 --- a/src/main/scala/pureconfiglib/Domain.scala +++ b/src/main/scala/pureconfiglib/Domain.scala @@ -1,5 +1,5 @@ /* - * Copyright 2020 47 Degrees, LLC. + * Copyright 2020 47 Degrees * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/scala/pureconfiglib/LoadingConfig.scala b/src/main/scala/pureconfiglib/LoadingConfig.scala index f51f3a9..4e1db81 100644 --- a/src/main/scala/pureconfiglib/LoadingConfig.scala +++ b/src/main/scala/pureconfiglib/LoadingConfig.scala @@ -1,5 +1,5 @@ /* - * Copyright 2020 47 Degrees, LLC. + * Copyright 2020 47 Degrees * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/scala/pureconfiglib/PureConfigLibrary.scala b/src/main/scala/pureconfiglib/PureConfigLibrary.scala index 635e1b5..2bc4e0b 100644 --- a/src/main/scala/pureconfiglib/PureConfigLibrary.scala +++ b/src/main/scala/pureconfiglib/PureConfigLibrary.scala @@ -1,5 +1,5 @@ /* - * Copyright 2020 47 Degrees, LLC. + * Copyright 2020 47 Degrees * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/main/scala/pureconfiglib/SupportedTypes.scala b/src/main/scala/pureconfiglib/SupportedTypes.scala index ce39e32..e06d711 100644 --- a/src/main/scala/pureconfiglib/SupportedTypes.scala +++ b/src/main/scala/pureconfiglib/SupportedTypes.scala @@ -1,5 +1,5 @@ /* - * Copyright 2020 47 Degrees, LLC. + * Copyright 2020 47 Degrees * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/scala/pureconfiglib/LoadingConfigSpec.scala b/src/test/scala/pureconfiglib/LoadingConfigSpec.scala index e9a9b3b..a8f51c6 100644 --- a/src/test/scala/pureconfiglib/LoadingConfigSpec.scala +++ b/src/test/scala/pureconfiglib/LoadingConfigSpec.scala @@ -1,5 +1,5 @@ /* - * Copyright 2020 47 Degrees, LLC. + * Copyright 2020 47 Degrees * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. diff --git a/src/test/scala/pureconfiglib/TypesSpec.scala b/src/test/scala/pureconfiglib/TypesSpec.scala index de0bd34..031ff33 100644 --- a/src/test/scala/pureconfiglib/TypesSpec.scala +++ b/src/test/scala/pureconfiglib/TypesSpec.scala @@ -1,5 +1,5 @@ /* - * Copyright 2020 47 Degrees, LLC. + * Copyright 2020 47 Degrees * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License.