diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 2376f376..cf545091 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -80,11 +80,11 @@ jobs:
- name: Make target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
- run: mkdir -p modules/scalacheck/native/target modules/framework-cats/native/target modules/framework/jvm/target modules/core/native/target modules/framework/native/target modules/core/js/target modules/framework/js/target modules/core/jvm/target modules/core-cats/native/target modules/discipline/native/target modules/core-cats/js/target modules/framework-cats/js/target modules/framework-cats/jvm/target modules/discipline/js/target modules/scalacheck/jvm/target modules/discipline/jvm/target modules/core-cats/jvm/target modules/scalacheck/js/target project/target
+ run: mkdir -p modules/scalacheck/native/target modules/framework-cats/native/target modules/framework/jvm/target modules/docs/jvm/target modules/core/native/target modules/framework/native/target modules/core/js/target modules/framework/js/target modules/core/jvm/target modules/core-cats/native/target modules/discipline/native/target modules/core-cats/js/target modules/framework-cats/js/target modules/framework-cats/jvm/target modules/discipline/js/target modules/scalacheck/jvm/target modules/discipline/jvm/target modules/core-cats/jvm/target modules/scalacheck/js/target project/target
- name: Compress target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
- run: tar cf targets.tar modules/scalacheck/native/target modules/framework-cats/native/target modules/framework/jvm/target modules/core/native/target modules/framework/native/target modules/core/js/target modules/framework/js/target modules/core/jvm/target modules/core-cats/native/target modules/discipline/native/target modules/core-cats/js/target modules/framework-cats/js/target modules/framework-cats/jvm/target modules/discipline/js/target modules/scalacheck/jvm/target modules/discipline/jvm/target modules/core-cats/jvm/target modules/scalacheck/js/target project/target
+ run: tar cf targets.tar modules/scalacheck/native/target modules/framework-cats/native/target modules/framework/jvm/target modules/docs/jvm/target modules/core/native/target modules/framework/native/target modules/core/js/target modules/framework/js/target modules/core/jvm/target modules/core-cats/native/target modules/discipline/native/target modules/core-cats/js/target modules/framework-cats/js/target modules/framework-cats/jvm/target modules/discipline/js/target modules/scalacheck/jvm/target modules/discipline/jvm/target modules/core-cats/jvm/target modules/scalacheck/js/target project/target
- name: Upload target directories
if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main')
@@ -265,5 +265,42 @@ jobs:
- name: Submit Dependencies
uses: scalacenter/sbt-dependency-submission@v2
with:
- modules-ignore: rootjs_2.12 rootjs_2.13 rootjs_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3
+ modules-ignore: rootjs_2.12 rootjs_2.13 rootjs_3 weaver-docs_2.12 weaver-docs_2.13 weaver-docs_3 rootjvm_2.12 rootjvm_2.13 rootjvm_3 rootnative_2.12 rootnative_2.13 rootnative_3
configs-ignore: test scala-tool scala-doc-tool test-internal
+
+ site:
+ name: Generate Site
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ java: [temurin@11]
+ runs-on: ${{ matrix.os }}
+ steps:
+ - name: Checkout current branch (full)
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+
+ - name: Setup Java (temurin@11)
+ id: setup-java-temurin-11
+ if: matrix.java == 'temurin@11'
+ uses: actions/setup-java@v4
+ with:
+ distribution: temurin
+ java-version: 11
+ cache: sbt
+
+ - name: sbt update
+ if: matrix.java == 'temurin@11' && steps.setup-java-temurin-11.outputs.cache-hit == 'false'
+ run: sbt +update
+
+ - name: Generate site
+ run: sbt docs/tlSite
+
+ - name: Publish site
+ if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
+ uses: peaceiris/actions-gh-pages@v3.9.3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: site/target/docs/site
+ keep_files: true
diff --git a/build.sbt b/build.sbt
index 206c98bf..92d996b1 100644
--- a/build.sbt
+++ b/build.sbt
@@ -1,3 +1,13 @@
+import laika.helium.config.TextLink
+import laika.helium.config.ReleaseInfo
+import laika.helium.config.HeliumIcon
+import laika.helium.config.IconLink
+import laika.helium.config.LinkGroup
+import laika.helium.config.VersionMenu
+import laika.ast.Path.Root
+import laika.ast.Image
+import laika.config.LinkValidation
+import org.typelevel.sbt.site.TypelevelSiteSettings
import sbt.librarymanagement.Configurations.ScalaDocTool
// https://typelevel.org/sbt-typelevel/faq.html#what-is-a-base-version-anyway
@@ -16,12 +26,15 @@ ThisBuild / tlCiHeaderCheck := false
// publish to s01.oss.sonatype.org (set to true to publish to oss.sonatype.org instead)
ThisBuild / tlSonatypeUseLegacyHost := false
+// enable the sbt-typelevel-site laika documentation
+ThisBuild / tlSitePublishBranch := Some("main")
+
// use JDK 11
ThisBuild / githubWorkflowJavaVersions := Seq(JavaSpec.temurin("11"))
-val scala212 = "2.12.17"
-val scala213 = "2.13.10"
-ThisBuild / crossScalaVersions := Seq(scala212, scala213, "3.3.1")
+val scala212 = "2.12.18"
+val scala213 = "2.13.12"
+ThisBuild / crossScalaVersions := Seq(scala212, scala213, "3.3.3")
ThisBuild / scalaVersion := scala213 // the default Scala
val Version = new {
@@ -38,6 +51,8 @@ val Version = new {
val scalajsStubs = "1.1.0"
val testInterface = "1.0"
val scalacCompatAnnotation = "0.1.4"
+ val http4s = "0.23.26"
+ val http4sBlaze = "0.23.16"
}
lazy val root = tlCrossRootProject.aggregate(core,
@@ -151,3 +166,66 @@ lazy val discipline = crossProject(JVMPlatform, JSPlatform, NativePlatform)
"org.typelevel" %%% "cats-laws" % Version.catsLaws % Test
)
)
+
+lazy val docsOutput = crossProject(JVMPlatform)
+ .in(file("modules/docs"))
+ .dependsOn(core, framework, coreCats, cats, scalacheck, discipline)
+ .settings(
+ moduleName := "docs",
+ name := "output for documentation",
+ watchSources += (ThisBuild / baseDirectory).value / "docs",
+ libraryDependencies ++= Seq(
+ "org.http4s" %% "http4s-dsl" % Version.http4s,
+ "org.http4s" %% "http4s-blaze-server" % Version.http4sBlaze,
+ "org.http4s" %% "http4s-blaze-client" % Version.http4sBlaze,
+ "com.lihaoyi" %% "fansi" % "0.2.7",
+ "org.typelevel" %% "cats-kernel-laws" % Version.catsLaws
+ )
+ )
+
+lazy val docs = project
+ .in(file("site"))
+ .enablePlugins(TypelevelSitePlugin)
+ .dependsOn(
+ core.jvm,
+ framework.jvm,
+ coreCats.jvm,
+ cats.jvm,
+ scalacheck.jvm,
+ discipline.jvm,
+ docsOutput.jvm)
+ .settings(
+ moduleName := "weaver-docs",
+ name := "Weaver documentation",
+ watchSources += (ThisBuild / baseDirectory).value / "docs",
+ libraryDependencies ++= Seq(
+ "org.http4s" %% "http4s-dsl" % Version.http4s,
+ "org.http4s" %% "http4s-blaze-server" % Version.http4sBlaze,
+ "org.http4s" %% "http4s-blaze-client" % Version.http4sBlaze,
+ "org.typelevel" %% "cats-laws" % Version.catsLaws
+ ),
+ tlSiteHelium ~= (_.site.internalCSS(Root / "assets")
+ .site.landingPage(
+ logo = Some(Image.internal(Root / "assets/logo.png")),
+ title = Some("Weaver"),
+ subtitle = Some("A test framework that runs everything in parallel."),
+ latestReleases = Seq(
+ ReleaseInfo("Upcoming Stable Release", "1.0.0")
+ ),
+ license = Some("Apache2"),
+ titleLinks = Seq(
+ VersionMenu.create(unversionedLabel = "Getting Started"),
+ LinkGroup.create(
+ IconLink.external("https://github.com/typelevel/weaver-test",
+ HeliumIcon.github),
+ IconLink.external("https://discord.gg/XF3CXcMzqD", HeliumIcon.chat)
+ )
+ ),
+ documentationLinks = Seq(
+ TextLink.internal(Root / "overview/installation.md", "Installation"),
+ TextLink.internal(Root / "features/expectations.md",
+ "Expectations (Assertions)")
+ )
+ )),
+ laikaConfig ~= (_.withRawContent)
+ )
diff --git a/docs/assets/custom.css b/docs/assets/custom.css
new file mode 100644
index 00000000..93f4bbfd
--- /dev/null
+++ b/docs/assets/custom.css
@@ -0,0 +1,11 @@
+div.terminal {
+ color: white;
+ background-color: black;
+}
+
+div.terminal pre {
+ background-color: black;
+ color: white;
+ padding: 20px;
+ overflow: auto
+}
diff --git a/docs/assets/logo.png b/docs/assets/logo.png
new file mode 100644
index 00000000..39a88567
Binary files /dev/null and b/docs/assets/logo.png differ
diff --git a/docs/directory.conf b/docs/directory.conf
new file mode 100644
index 00000000..197e9fe0
--- /dev/null
+++ b/docs/directory.conf
@@ -0,0 +1,6 @@
+laika.navigationOrder = [
+ overview,
+ features,
+ samples,
+ faqs
+]
diff --git a/docs/faqs/directory.conf b/docs/faqs/directory.conf
new file mode 100644
index 00000000..e90830b4
--- /dev/null
+++ b/docs/faqs/directory.conf
@@ -0,0 +1,5 @@
+laika.title = Frequently Asked Questions
+laika.navigationOrder = [
+ ide_faqs.md,
+ other_effects.md
+]
diff --git a/docs/faqs.md b/docs/faqs/ide_faqs.md
similarity index 90%
rename from docs/faqs.md
rename to docs/faqs/ide_faqs.md
index 842a731f..17dfb686 100644
--- a/docs/faqs.md
+++ b/docs/faqs/ide_faqs.md
@@ -1,13 +1,11 @@
----
-id: faqs
-title: Frequently Asked Questions
----
+IDE Support?
+==========================
-## How do I get weaver working with IntelliJ / vscode / neovim ?
+## How do I get weaver working with IntelliJ / vscode / neovim?
Weaver provides a JUnit runner that IDEs pick up automatically. On IntelliJ the suite should have the normal button to run the tests, and Metals should provide a code lens.
-## How do I ignore individual tests ?
+## How do I ignore individual tests?
An `.ignore` extension method is provided on strings, and can be used when declaring tests. All tests that are tagged with `.ignore` will be ignored in the test suite, including any that are tagged with `.only`.
diff --git a/docs/other_effects.md b/docs/faqs/other_effects.md
similarity index 95%
rename from docs/other_effects.md
rename to docs/faqs/other_effects.md
index ca2d42f3..c554838e 100644
--- a/docs/other_effects.md
+++ b/docs/faqs/other_effects.md
@@ -1,8 +1,5 @@
----
-id: other_effects
-
-title: Other effects
----
+What happened to ZIO / Monix / MonixBIO ?
+=============
Starting with version 0.8.0, Weaver no longer offers out-of-the-box support for other effect types
than cats-effect.
diff --git a/docs/features/directory.conf b/docs/features/directory.conf
new file mode 100644
index 00000000..744f56e8
--- /dev/null
+++ b/docs/features/directory.conf
@@ -0,0 +1,15 @@
+laika.title = Features
+laika.navigationOrder = [
+ expectations.md,
+ tracing_failures.md,
+ resources.md,
+ global_resources.md,
+ logging.md,
+ tagging.md,
+ scalacheck.md,
+ discipline.md,
+ parallelism.md,
+ funsuite.md,
+ filtering.md,
+ specs2.md
+]
diff --git a/docs/discipline.md b/docs/features/discipline.md
similarity index 94%
rename from docs/discipline.md
rename to docs/features/discipline.md
index 66423cee..cfea9351 100644
--- a/docs/discipline.md
+++ b/docs/features/discipline.md
@@ -1,7 +1,5 @@
----
-id: discipline
-title: Discipline integration
----
+Discipline integration
+======================
Weaver comes with basic [Discipline](https://github.com/typelevel/discipline) integration, allowing property-based law testing.
diff --git a/docs/expectations.md b/docs/features/expectations.md
similarity index 88%
rename from docs/expectations.md
rename to docs/features/expectations.md
index 1047bd61..b3196e0a 100644
--- a/docs/expectations.md
+++ b/docs/features/expectations.md
@@ -1,7 +1,5 @@
----
-id: expectations
-title: Expectations (assertions)
----
+Expectations (assertions)
+=========================
Expectations are pure, composable values. This forces developers to separate the test's checks from the scenario, which is generally cleaner/clearer.
@@ -142,7 +140,7 @@ object ExpectationsSuite extends SimpleIOSuite {
expect(1 != 2) and expect(2 != 1) or expect(2 != 3)
}
- pureTest("And/Or composition (failure") {
+ pureTest("And/Or composition (failure)") {
(expect(1 != 2) and expect(2 == 1)) or expect(2 == 3)
}
@@ -228,31 +226,8 @@ object ExpectationsSuite extends SimpleIOSuite {
}
```
-```scala mdoc:passthrough
-println(weaver.docs.Output.runSuites(ExpectationsSuite))
-```
-
-## Tracing locations of failed expectations
-
-As of 0.5.0, failed expectations carry a `NonEmptyList[SourceLocation]`, which can be used to manually trace the callsites that lead to a failure.
-
-By default, the very location where the expectation is created is captured, but the `traced` method can be use to add additional locations to the expectation.
-
-```scala mdoc
-object TracingSuite extends SimpleIOSuite {
-
- pureTest("Tracing example") {
- foo
- }
-
- def foo(implicit loc : SourceLocation) = bar().traced(loc).traced(here)
-
- def bar() = baz().traced(here)
-
- def baz() = expect(1 != 1)
-}
-```
+## Example suite report
```scala mdoc:passthrough
-println(weaver.docs.Output.runSuites(TracingSuite))
+println(weaver.docs.Output.runSuites(ExpectationsSuite))
```
diff --git a/docs/filtering.md b/docs/features/filtering.md
similarity index 88%
rename from docs/filtering.md
rename to docs/features/filtering.md
index 143aa33f..7bc3e36e 100644
--- a/docs/filtering.md
+++ b/docs/features/filtering.md
@@ -1,7 +1,5 @@
----
-id: filtering
-title: Filtering tests
----
+Filtering tests
+===============
When using the IOSuite variants, the user can call `sbt`'s test command as such:
@@ -13,4 +11,4 @@ This filter will prevent the execution of any test that doesn't contain the stri
```
fooPackage.FooSuite.foo
-```
\ No newline at end of file
+```
diff --git a/docs/funsuite.md b/docs/features/funsuite.md
similarity index 94%
rename from docs/funsuite.md
rename to docs/features/funsuite.md
index 7bb53084..b273870f 100644
--- a/docs/funsuite.md
+++ b/docs/features/funsuite.md
@@ -1,7 +1,5 @@
----
-id: funsuite
-title: Pure tests
----
+Pure tests
+==========
If your tests do not require any capability provided by effect-types, you can use a simplified interface `FunSuite`,
which comes with a single `test` method and does not allow effectful tests.
diff --git a/docs/global_resources.md b/docs/features/global_resources.md
similarity index 98%
rename from docs/global_resources.md
rename to docs/features/global_resources.md
index f0bdfdf6..6676c089 100644
--- a/docs/global_resources.md
+++ b/docs/features/global_resources.md
@@ -1,7 +1,5 @@
----
-id: global_resources
-title: Sharing resources across suites
----
+Sharing resources across suites
+===============================
## A word of warning
diff --git a/docs/logging.md b/docs/features/logging.md
similarity index 95%
rename from docs/logging.md
rename to docs/features/logging.md
index 1ee6c14e..28039cbc 100644
--- a/docs/logging.md
+++ b/docs/features/logging.md
@@ -1,7 +1,5 @@
----
-id: logging
-title: Logging information
----
+Logging information
+===================
Weaver provides each individual test with a lazy-logger. The log statements only get reported if the test is unsuccessful. Because tests in weaver run in parallel by default, this makes it easier to tie printed information to the test it originated from.
diff --git a/docs/parallelism.md b/docs/features/parallelism.md
similarity index 95%
rename from docs/parallelism.md
rename to docs/features/parallelism.md
index 51359f44..1a170f9d 100644
--- a/docs/parallelism.md
+++ b/docs/features/parallelism.md
@@ -1,7 +1,5 @@
----
-id: parallelism
-title: Configuring parallelism
----
+Configuring parallelism
+=======================
## Parallelism within suites
diff --git a/docs/resources.md b/docs/features/resources.md
similarity index 97%
rename from docs/resources.md
rename to docs/features/resources.md
index e7c98f98..2e06e75a 100644
--- a/docs/resources.md
+++ b/docs/features/resources.md
@@ -1,7 +1,5 @@
----
-id: resources
-title: Sharing resources
----
+Sharing resources
+=================
Resources can be shared across tests, this is done by implementing a method that returns [cats.effect.Resource](https://typelevel.org/cats-effect/datatypes/resource.html).
diff --git a/docs/scalacheck.md b/docs/features/scalacheck.md
similarity index 97%
rename from docs/scalacheck.md
rename to docs/features/scalacheck.md
index b3c4a5a1..38a352bd 100644
--- a/docs/scalacheck.md
+++ b/docs/features/scalacheck.md
@@ -1,7 +1,5 @@
----
-id: scalacheck
-title: ScalaCheck integration
----
+ScalaCheck integration
+======================
Weaver comes with basic [ScalaCheck](https://www.scalacheck.org/) integration, allowing for property-based testing.
diff --git a/docs/specs2.md b/docs/features/specs2.md
similarity index 81%
rename from docs/specs2.md
rename to docs/features/specs2.md
index 420b957d..ba69c509 100644
--- a/docs/specs2.md
+++ b/docs/features/specs2.md
@@ -1,6 +1,4 @@
----
-id: specs2
-title: specs2 (discontinued)
----
+specs2 (discontinued)
+=====================
The specs2-matchers integration has been dropped in weaver 0.8.0. If you want to test CE code with specs2 UX, please consider using [cats-effect-testing](https://github.com/typelevel/cats-effect-testing).
diff --git a/docs/tagging.md b/docs/features/tagging.md
similarity index 91%
rename from docs/tagging.md
rename to docs/features/tagging.md
index 1a3f7295..d12df735 100644
--- a/docs/tagging.md
+++ b/docs/features/tagging.md
@@ -1,7 +1,5 @@
----
-id: tagging
-title: Tagging
----
+Tagging
+=======
Weaver provides some constructs to dynamically tag tests as `ignored` or `cancelled` :
@@ -33,6 +31,6 @@ object TaggingSuite extends SimpleIOSuite {
}
```
-```scala mdoc:passthrough
+```scala mdoc:passthrough
println(weaver.docs.Output.runSuites(TaggingSuite))
```
diff --git a/docs/features/tracing_failures.md b/docs/features/tracing_failures.md
new file mode 100644
index 00000000..9223adbc
--- /dev/null
+++ b/docs/features/tracing_failures.md
@@ -0,0 +1,30 @@
+Tracing Failures
+================
+
+# Tracing locations of failed expectations
+
+As of 0.5.0, failed expectations carry a `NonEmptyList[SourceLocation]`, which can be used to manually trace the callsites that lead to a failure.
+
+By default, the very location where the expectation is created is captured, but the `traced` method can be use to add additional locations to the expectation.
+
+
+```scala mdoc
+import weaver._
+
+object TracingSuite extends SimpleIOSuite {
+
+ pureTest("Tracing example") {
+ foo
+ }
+
+ def foo(implicit loc : SourceLocation) = bar().traced(loc).traced(here)
+
+ def bar() = baz().traced(here)
+
+ def baz() = expect(1 != 1)
+}
+```
+
+```scala mdoc:passthrough
+println(weaver.docs.Output.runSuites(TracingSuite))
+```
diff --git a/docs/installation.md b/docs/installation.md
deleted file mode 100644
index d8899736..00000000
--- a/docs/installation.md
+++ /dev/null
@@ -1,30 +0,0 @@
----
-id: installation
-title: Installation
----
-
-The artifacts below are available for **Scala JVM, Scala.js, Scala-native**.
-
-```scala mdoc:passthrough
-import weaver.docs._
-
-import BuildMatrix._
-
-val effectsTable = Table
- .create("Effect types", effects)
- .render(artifactsCE3Version)
-
-val integrationsTable = Table
- .create("Integrations", integrations)
- .render(artifactsCE3Version)
-
-println(effectsTable)
-println(integrationsTable)
-```
-
-Weaver offers effect-type specific test frameworks. The Build setup depends on
-the effect-type library you've elected to use (or test against).
-
-Refer yourself to the library specific pages to get the correct configuration.
-
-- [cats](cats_effect_usage.md)
diff --git a/docs/overview/directory.conf b/docs/overview/directory.conf
new file mode 100644
index 00000000..cb8903a9
--- /dev/null
+++ b/docs/overview/directory.conf
@@ -0,0 +1,5 @@
+laika.title = Overview
+laika.navigationOrder = [
+ installation.md,
+ motivation.md
+]
diff --git a/docs/cats_effect_usage.md b/docs/overview/installation.md
similarity index 96%
rename from docs/cats_effect_usage.md
rename to docs/overview/installation.md
index ddb43e52..de317b83 100644
--- a/docs/cats_effect_usage.md
+++ b/docs/overview/installation.md
@@ -1,9 +1,5 @@
----
-id: cats
-title: Cats-effect usage
----
-
-## Installation
+Installation
+============
You'll need to install the following dependencies to test your programs against `cats.effect.IO`
diff --git a/docs/motivation.md b/docs/overview/motivation.md
similarity index 97%
rename from docs/motivation.md
rename to docs/overview/motivation.md
index 745e14ab..e3dd5579 100644
--- a/docs/motivation.md
+++ b/docs/overview/motivation.md
@@ -1,7 +1,5 @@
----
-id: motivation
-title: Motivation
----
+Motivation
+==========
## A test framework for integration tests
diff --git a/docs/samples/directory.conf b/docs/samples/directory.conf
new file mode 100644
index 00000000..54b50d83
--- /dev/null
+++ b/docs/samples/directory.conf
@@ -0,0 +1,6 @@
+laika.title = Sample reports
+laika.navigationOrder = [
+ multiple_suites_success.md,
+ multiple_suites_failures.md,
+ multiple_suites_logging.md
+]
diff --git a/docs/multiple_suites_failures.md b/docs/samples/multiple_suites_failures.md
similarity index 93%
rename from docs/multiple_suites_failures.md
rename to docs/samples/multiple_suites_failures.md
index 38776181..f66f234c 100644
--- a/docs/multiple_suites_failures.md
+++ b/docs/samples/multiple_suites_failures.md
@@ -1,7 +1,5 @@
----
-id: multiple_suites_failures
-title: Failures
----
+Failures
+========
Weaver aggregates failures from all tests to output them after all the tests have finished
diff --git a/docs/multiple_suites_logging.md b/docs/samples/multiple_suites_logging.md
similarity index 96%
rename from docs/multiple_suites_logging.md
rename to docs/samples/multiple_suites_logging.md
index 3137ba00..ff7e25ed 100644
--- a/docs/multiple_suites_logging.md
+++ b/docs/samples/multiple_suites_logging.md
@@ -1,7 +1,5 @@
----
-id: multiple_suites_logging
-title: Logging
----
+Logging
+=======
Weaver only outputs the logs for tests that failed - the logs are neatly collected alongside the failure information and reported after all the tests have run.
diff --git a/docs/multiple_suites_success.md b/docs/samples/multiple_suites_success.md
similarity index 93%
rename from docs/multiple_suites_success.md
rename to docs/samples/multiple_suites_success.md
index 873c9924..d5a9e3a0 100644
--- a/docs/multiple_suites_success.md
+++ b/docs/samples/multiple_suites_success.md
@@ -1,7 +1,5 @@
----
-id: multiple_suites_success
-title: Successes
----
+Successes
+=========
Start with importing the following :
diff --git a/modules/docs/shared/src/main/scala/main/scala/weaver/MatrixRendering.scala b/modules/docs/shared/src/main/scala/main/scala/weaver/MatrixRendering.scala
deleted file mode 100644
index d65e83b3..00000000
--- a/modules/docs/shared/src/main/scala/main/scala/weaver/MatrixRendering.scala
+++ /dev/null
@@ -1,104 +0,0 @@
-package weaver.docs
-
-case class Artifact(
- name: String,
- jvm: Boolean,
- js: Boolean,
- scalaVersion: String,
- version: String
-)
-
-case class Cell(
- jvm: Seq[String],
- js: Seq[String],
- version: String
-)
-
-case class Row(
- name: String,
- ce: Option[Cell]
-)
-
-case class Table(
- name: String,
- rows: Vector[Row]
-) {
- def _row(l: Seq[String], header: Boolean = false): String = {
- val base = l.mkString("|", "|", "|")
-
- if (header) base + "\n" + _row(l.map(_ => "---"), false)
- else base + "\n"
- }
-
- def _cell(c: Option[Cell]): String = {
- c match {
- case Some(c) =>
- val allVersions = (c.jvm.toSet ++ c.js.toSet).map {
- case ver if ver.startsWith("2.") =>
- ver.split("\\.").take(2).mkString(".")
- case other => other
- }.toList.sorted
-
- if (c.jvm.nonEmpty && c.js.nonEmpty)
- s"✅ Scala ${allVersions.mkString(", ")}"
- else
- "❌"
- case None => "❌"
- }
- }
-
- def render(version: String) = {
- val sb = new StringBuilder
- sb.append(_row(
- Seq(
- name,
- s"Cats Effect 3
Weaver version: `$version`"
- ),
- header = true
- ))
-
- rows.map { case Row(name, ce) =>
- sb.append(_row(Seq(name, _cell(ce))))
- }
- sb.result()
- }
-}
-
-object Table {
- def row_name(artif: String) = artif match {
- case "cats" => "Cats-Effect"
- case "scalacheck" => "ScalaCheck"
- case "discipline" => "Discipline law testing"
- case _ => throw new RuntimeException("Not another effect type!")
- }
-
- def artifactsToCell(artifacts: List[Artifact]): Option[Cell] = {
- artifacts.map(_.version).distinct.headOption.map { version =>
- val jvmVersions = artifacts.filter(_.jvm).map(_.scalaVersion)
- val jsVersions = artifacts.filter(_.js).map(_.scalaVersion)
-
- Cell(
- jvm = jvmVersions,
- js = jsVersions,
- version = version
- )
- }
- }
-
- def create(name: String, artifacts: List[Artifact]): Table = {
-
- val grouped = artifacts.groupBy(_.name)
-
- val rows = grouped.map {
- case (name, artifacts) =>
- val rowName = row_name(name)
-
- Row(rowName, artifactsToCell(artifacts))
- }
-
- Table(
- name,
- rows.toVector.sortBy(_.name)
- )
- }
-}
diff --git a/modules/docs/shared/src/main/scala/main/scala/weaver/Output.scala b/modules/docs/shared/src/main/scala/main/scala/weaver/Output.scala
index 81138bd8..b8228b79 100644
--- a/modules/docs/shared/src/main/scala/main/scala/weaver/Output.scala
+++ b/modules/docs/shared/src/main/scala/main/scala/weaver/Output.scala
@@ -19,8 +19,8 @@ object Output {
def runSuites(s: Suite[IO]*): String = {
import cats.effect.unsafe.implicits.global
- val header = "
"
- val footer = "
" + val footer = "
This project is maintained by a dedicated group of people.
-This project is used by many folks
-Are you using this project?
- - Add your company - -New versions of this project are released every so often.
-{latestVersion} | -
- {/* You are supposed to change this href where appropriate
- Example: href=" |
- - Release Notes - | -
---|
- This is the latest version of the project that was published to maven. Milestones - and release-candidates versions should not be considered stable -
-Here you can find previous versions of the documentation.
-{version} | -
- {/* You are supposed to change this href where appropriate
- Example: href=" |
- - - Release Notes - - | -
---|
- You can find past versions of this project on{' '} - GitHub. -
-