diff options
| author | Amir M. Saeid <amir@glgdgt.com> | 2026-02-14 19:42:49 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-02-14 19:42:49 +0000 |
| commit | 64e4b269c53faa70551e41c6d77ccf17ef96a68e (patch) | |
| tree | 9f1328c54f8b39ba3c29bc07426fa5a8a169249c | |
| parent | 00925aa276bf4215bdf1ad11651fa4084e6bc676 (diff) | |
| parent | 671fc998f1fdfe0543cba86b8c1d541ce8578f49 (diff) | |
Merge pull request #1 from codiff/improve-docs
Improve build workflows
| -rw-r--r-- | .github/workflows/ci.yml | 4 | ||||
| -rw-r--r-- | build.sbt | 17 | ||||
| -rw-r--r-- | core/src/main/scala/com/codiff/fairstream/Fair.scala | 19 | ||||
| -rw-r--r-- | core/src/main/scala/com/codiff/fairstream/FairT.scala | 21 | ||||
| -rw-r--r-- | core/src/test/scala/com/codiff/fairstream/PythagoreanSuite.scala | 16 | ||||
| -rw-r--r-- | docs/directory.conf | 3 | ||||
| -rw-r--r-- | fs2/src/main/scala/com/codiff/fairstream/fs2/conversions.scala | 20 | ||||
| -rw-r--r-- | fs2/src/main/scala/com/codiff/fairstream/fs2/syntax.scala | 19 | ||||
| -rw-r--r-- | fs2/src/test/scala/com/codiff/fairstream/fs2/FairFs2Suite.scala | 20 |
9 files changed, 130 insertions, 9 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e29033a..5c6c0b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -83,11 +83,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 core/.js/target core/.jvm/target project/target + run: mkdir -p core/.js/target core/.jvm/target fs2/.js/target fs2/.jvm/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 core/.js/target core/.jvm/target project/target + run: tar cf targets.tar core/.js/target core/.jvm/target fs2/.js/target fs2/.jvm/target project/target - name: Upload target directories if: github.event_name != 'pull_request' && (startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/main') @@ -1,3 +1,7 @@ +import laika.helium.Helium +import laika.helium.config._ +import laika.ast.Path.Root + // https://typelevel.org/sbt-typelevel/faq.html#what-is-a-base-version-anyway ThisBuild / tlBaseVersion := "0.0" // your current series x.y @@ -45,4 +49,15 @@ lazy val fs2 = crossProject(JVMPlatform, JSPlatform) ) ) -lazy val docs = project.in(file("site")).enablePlugins(TypelevelSitePlugin) +lazy val docs = project + .in(file("site")) + .enablePlugins(TypelevelSitePlugin) + .settings( + tlFatalWarnings := false, + laikaTheme := Helium.defaults.site + .topNavigationBar( + homeLink = IconLink.internal(Root / "index.md", HeliumIcon.home) + ) + .build + ) + .dependsOn(core.jvm, fs2.jvm) diff --git a/core/src/main/scala/com/codiff/fairstream/Fair.scala b/core/src/main/scala/com/codiff/fairstream/Fair.scala index a665c72..586e296 100644 --- a/core/src/main/scala/com/codiff/fairstream/Fair.scala +++ b/core/src/main/scala/com/codiff/fairstream/Fair.scala @@ -1,6 +1,23 @@ +/* + * Copyright 2026 codiff + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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. + */ + package com.codiff.fairstream -import cats.{Alternative, Monad} +import cats.Alternative +import cats.Monad sealed trait Fair[+A] diff --git a/core/src/main/scala/com/codiff/fairstream/FairT.scala b/core/src/main/scala/com/codiff/fairstream/FairT.scala index f77e783..6090b78 100644 --- a/core/src/main/scala/com/codiff/fairstream/FairT.scala +++ b/core/src/main/scala/com/codiff/fairstream/FairT.scala @@ -1,6 +1,25 @@ +/* + * Copyright 2026 codiff + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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. + */ + package com.codiff.fairstream -import cats.{Alternative, Applicative, Monad, ~>} +import cats.Alternative +import cats.Applicative +import cats.Monad +import cats.~> sealed trait FairE[M[_], A] diff --git a/core/src/test/scala/com/codiff/fairstream/PythagoreanSuite.scala b/core/src/test/scala/com/codiff/fairstream/PythagoreanSuite.scala index e4cf406..97327fe 100644 --- a/core/src/test/scala/com/codiff/fairstream/PythagoreanSuite.scala +++ b/core/src/test/scala/com/codiff/fairstream/PythagoreanSuite.scala @@ -1,3 +1,19 @@ +/* + * Copyright 2026 codiff + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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. + */ + package com.codiff.fairstream import cats.Eval diff --git a/docs/directory.conf b/docs/directory.conf new file mode 100644 index 0000000..08f25e2 --- /dev/null +++ b/docs/directory.conf @@ -0,0 +1,3 @@ +laika.navigationOrder = [ + index.md +] diff --git a/fs2/src/main/scala/com/codiff/fairstream/fs2/conversions.scala b/fs2/src/main/scala/com/codiff/fairstream/fs2/conversions.scala index c100d64..3fd014c 100644 --- a/fs2/src/main/scala/com/codiff/fairstream/fs2/conversions.scala +++ b/fs2/src/main/scala/com/codiff/fairstream/fs2/conversions.scala @@ -1,7 +1,25 @@ +/* + * Copyright 2026 codiff + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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. + */ + package com.codiff.fairstream package fs2 -import _root_.fs2.{Pull, Pure, Stream} +import _root_.fs2.Pull +import _root_.fs2.Pure +import _root_.fs2.Stream object conversions { diff --git a/fs2/src/main/scala/com/codiff/fairstream/fs2/syntax.scala b/fs2/src/main/scala/com/codiff/fairstream/fs2/syntax.scala index b44fab7..d0d8b04 100644 --- a/fs2/src/main/scala/com/codiff/fairstream/fs2/syntax.scala +++ b/fs2/src/main/scala/com/codiff/fairstream/fs2/syntax.scala @@ -1,7 +1,24 @@ +/* + * Copyright 2026 codiff + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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. + */ + package com.codiff.fairstream package fs2 -import _root_.fs2.{Pure, Stream} +import _root_.fs2.Pure +import _root_.fs2.Stream object syntax { diff --git a/fs2/src/test/scala/com/codiff/fairstream/fs2/FairFs2Suite.scala b/fs2/src/test/scala/com/codiff/fairstream/fs2/FairFs2Suite.scala index c7b9269..6b2270a 100644 --- a/fs2/src/test/scala/com/codiff/fairstream/fs2/FairFs2Suite.scala +++ b/fs2/src/test/scala/com/codiff/fairstream/fs2/FairFs2Suite.scala @@ -1,12 +1,28 @@ +/* + * Copyright 2026 codiff + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * 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. + */ + package com.codiff.fairstream package fs2 -import scala.concurrent.duration._ - import cats.effect.IO import cats.syntax.all._ import munit.CatsEffectSuite +import scala.concurrent.duration._ + import syntax._ class FairFs2Suite extends CatsEffectSuite { |
