Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ci #1093

Merged
merged 5 commits into from
Oct 23, 2021
Merged

Fix ci #1093

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
run: sbt ++${{ matrix.scala }} test

- name: Build docs
run: sbt ++${{ matrix.scala }} doc
run: sbt ++${{ matrix.scala }} doc docs/mdoc

publish:
name: Publish Artifacts
Expand Down
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ ThisBuild / githubWorkflowBuild := Seq(
.Sbt(List("headerCheckAll", "scalafmtCheckAll", "scalafmtSbtCheck"), name = Some("Check headers+formatting")),
WorkflowStep.Sbt(List("Test/compile"), name = Some("Compile")),
WorkflowStep.Sbt(List("test"), name = Some("Run tests")),
WorkflowStep.Sbt(List("doc"), name = Some("Build docs"))
WorkflowStep.Sbt(List("doc", "docs/mdoc"), name = Some("Build docs"))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there any reason we shouldn't just run docs/makeMicrosite, since this is exactly what the publish workflow is doing? That way we can be sure it will work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, unless that needs jekyll doesn't it? So then this is fine.

)

inThisBuild(
Expand Down
2 changes: 1 addition & 1 deletion docs/src/main/mdoc/guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,7 @@ import spire.math.Real
import Real.{sin, cos}

// will return Real(1) no matter what value is provided
def circle(a: Real): Real = (cos(a).pow(2) + sin(a).pow(2)).sqrt()
def circle(a: Real): Real = sqrt(cos(a).pow(2) + sin(a).pow(2))
```

One interesting consequence of the design of computable real numbers
Expand Down
14 changes: 9 additions & 5 deletions docs/src/main/mdoc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ object LiteralsDemo {
val n1 = r"1/3"
val n2 = r"1599/115866" // simplified at compile-time to 13/942
}
```

```scala

object RadixDemo {
// support different radix literals
Expand Down Expand Up @@ -400,20 +403,21 @@ tail-recursive function, which will inline literal function arguments.
The macro can be nested in itself and compares favorably with other looping
constructs in Scala such as `for` and `while`:

```scala mdoc:silent
```scala mdoc:silent:nest
import spire.syntax.fastFor._

// print numbers 1 through 10
cfor(0)(_ < 10, _ + 1) { i =>
fastFor(0)(_ < 10, _ + 1) { i =>
println(i)
}

// naive sorting algorithm
def selectionSort(ns: Array[Int]) = {
val limit = ns.length -1
cfor(0)(_ < limit, _ + 1) { i =>
fastFor(0)(_ < limit, _ + 1) { i =>
var k = i
val n = ns(i)
cfor(i + 1)(_ <= limit, _ + 1) { j =>
fastFor(i + 1)(_ <= limit, _ + 1) { j =>
if (ns(j) < ns(k)) k = j
}
ns(i) = ns(k)
Expand Down Expand Up @@ -486,7 +490,7 @@ object DistDemo {
val rng = spire.random.rng.Cmwc5()

// produces a map with ~10-20 entries
implicit val nextmap = Dist.map[Int, Complex[Double]](10, 20)
implicit val nextmap: Dist[Map[Int, Complex[Double]]] = Dist.map[Int, Complex[Double]](10, 20)
val m = rng.next[Map[Int, Complex[Double]]]

// produces a double in [0.0, 1.0)
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.3")
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "1.9.1")
addSbtPlugin("org.scalastyle" %% "scalastyle-sbt-plugin" % "1.0.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.7.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.23")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.24")
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.2")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.1.0")
addSbtPlugin("com.47deg" % "sbt-microsites" % "1.3.3")
Expand Down