Skip to content

Commit

Permalink
Merge pull request #4160 from armanbilge/topic/sbt-typelevel
Browse files Browse the repository at this point in the history
Migrate to sbt-typelevel
  • Loading branch information
armanbilge authored Apr 10, 2022
2 parents abd3fe6 + 0bda83a commit 708cbab
Show file tree
Hide file tree
Showing 917 changed files with 17,925 additions and 2,604 deletions.
416 changes: 324 additions & 92 deletions .github/workflows/ci.yml

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ fileOverride {
"glob:**/src/{main,test}/scala-2.12/**" {
runner.dialect = scala212source3
}
"glob:**/src/{main,test}/scala-3.x/**" {
"glob:**/src/{main,test}/scala-3/**" {
runner.dialect = scala3
}
}
Expand Down
31 changes: 6 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ skip these steps and jump straight to submitting a pull request.

1. [Find something that belongs in cats](#find-something-that-belongs-in-cats)
2. [Let us know you are working on it](#let-us-know-you-are-working-on-it)
3. [Build the project](#build-project)
3. [Build the project](#build-the-project)
4. [Implement your contribution](#write-code)
5. [Write tests](#write-tests)
6. [Write documentation](#contributing-documentation)
Expand Down Expand Up @@ -133,7 +133,7 @@ builds:

### Write code

[See guidelines](https://typelevel.org/cats/guidelines.html).
[See guidelines](guidelines.md).

### Attributions

Expand All @@ -151,11 +151,11 @@ for law checking, and imports all syntax and standard instances for convenience.
[Discipline](https://github.com/typelevel/discipline), is the name of the test and will be output to the
console as part of the test execution. By convention:
- When checking laws, this parameter generally takes a form that describes the data type being tested.
For example the name *"Validated[String, Int]"* might be used when testing a type class instance
For example the name `"Validated[String, Int]"` might be used when testing a type class instance
that the `Validated` data type supports.
- An exception to this is serializability tests, where the type class name is also included in the name.
For example, in the case of `Validated`, the serializability test would take the form,
*"Applicative[Validated[String, Int]]"*, to indicate that this test is verifying that the `Applicative`
`"Applicative[Validated[String, Int]]"`, to indicate that this test is verifying that the `Applicative`
type class instance for the `Validated` data type is serializable.
- This convention helps to ensure clear and easy to understand output, with minimal duplication in the output.
- It is also a goal that, for every combination of data type and supported type class instance:
Expand Down Expand Up @@ -187,9 +187,6 @@ As a side note, the latter command uses [sbt-mima](https://github.com/lightbend/
### source for the documentation
The documentation for this website is stored alongside the source, in the [docs subproject](https://github.com/typelevel/cats/tree/main/docs).

* The source for the tut compiled pages is in `docs/src/main/mdoc`
* The menu structure for these pages is in `docs/src/main/resources/microsite/data/menu.yml`

### Generating the Site

The microsite generation requires a specific scala version that might
Expand All @@ -199,27 +196,11 @@ workflow to discover the proper version:
command](https://github.com/typelevel/cats/blob/main/.github/workflows/ci.yml#L281)

At the moment the command is:
`sbt ++2.12.15 docs/makeMicrosite`
`sbt ++2.12.15 docs/tlSite`

### Previewing the site

1. Install jekyll locally. Depending on your platform, you might do this with:

`yum install jekyll`

`apt-get install ruby-full; gem install jekyll`

`gem install jekyll`

Or just dropping into a `nix-shell` if you are using the [Nix Cats development environment](#nix-cats-development-environment).

2. In a shell, navigate to the generated site directory in `cats-docs/target/site`

3. Start jekyll with `jekyll serve -b /cats`

4. Navigate to http://localhost:4000/cats/ in your browser

5. Make changes to your site, and run `sbt docs/makeMicrosite` to regenerate the site. The changes should be reflected as soon as you run `makeMicrosite`.
Run `docs/tlSitePreview` in the sbt console. This will start a preview server at http://localhost:4242/ that will automatically refresh as you make edits.

### Compiler verified documentation

Expand Down
34 changes: 17 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
Cats is a library which provides abstractions for functional programming in the [Scala programming language](https://scala-lang.org).

Scala supports both object-oriented and functional programming, and this is reflected in the hybrid approach of the
standard library. Cats strives to provide functional programming abstractions that are core, [binary compatible](http://typelevel.org/cats/#binary-compatibility-and-versioning), [modular](http://typelevel.org/cats/motivations#modularity), [approachable](http://typelevel.org/cats/motivations#approachability) and [efficient](http://typelevel.org//cats/motivations#efficiency). A broader goal of Cats is to provide a foundation for an [ecosystem of pure, typeful libraries](https://typelevel.org/cats/#ecosystem) to support functional programming in Scala applications.
standard library. Cats strives to provide functional programming abstractions that are core, [binary compatible](#binary-compatibility-and-versioning), [modular](https://typelevel.org/cats/motivations.html#modularity), [approachable](https://typelevel.org/cats/motivations.html#approachability) and [efficient](https://typelevel.org/cats/motivations.html#efficiency). A broader goal of Cats is to provide a foundation for an [ecosystem of pure, typeful libraries](https://typelevel.org/cats/typelevelEcosystem.html) to support functional programming in Scala applications.

For more detail about Cats' motivations, go [here](http://typelevel.org/cats/motivations).
For more detail about Cats' motivations, go [here](https://typelevel.org/cats/motivations.html).

### Why "cats"?

Expand All @@ -26,7 +26,7 @@ Regardless, you do not need to know anything about category theory to use Cats.
### Code Contributors

This project exists thanks to [all the people who contribute](https://github.com/typelevel/cats/graphs/contributors). We welcome contributions to Cats and would love for you to help build
Cats. See our [contributor guide](https://typelevel.org/cats/contributing.html) for more
Cats. See our [contributor guide](CONTRIBUTING.md) for more
information about how you can get involved as a developer. If you are looking for something to start with, [here is a beginner friendly list](https://github.com/typelevel/cats/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22).

### Financial Contributors
Expand All @@ -36,31 +36,31 @@ information about how you can get involved as a developer. If you are looking fo
<h4>Platinum Sponsors</h4>
<a href="https://opencollective.com/typelevel/contribute/platinum-sposor-12420/checkout">Platinum sponsorship</a> starts at $950 USD/month.
<div id="platinum-sponsors">
<noscript>Platinum Sponsors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Platinum Sponsors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Gold Sponsors</h4>
<a href="https://opencollective.com/typelevel/contribute/gold-sponsor-12419/checkout">Gold Sponsorship</a> starts at $420 USD/month.
<div id="gold-sponsors">
<noscript>Gold Sponsors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Gold Sponsors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Silver Sponsors</h4>
<a href="https://opencollective.com/typelevel/contribute/silver-sponsor-11780/checkout">Silver Sponsorship</a> starts at $180 USD/month.
<div id="silver-sponsors">
<noscript>Silver Sponsors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Silver Sponsors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Backers</h4>
Become a <a href="https://opencollective.com/typelevel/contribute/backer-11779/checkout">Backer</a> with a recurring donation of just $5 USD/month.
<div id="backers">
<noscript>Backers appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Backers appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<h4>Other contributors</h4>
We thankfully accept <a href="https://opencollective.com/typelevel/donate">one-time and recurring</a> contributions as well.
<div id="other-contributors">
<noscript>Other contributors appear here at <a href="https://typelevel.org/cats/">https://typelevel.org/cats</a></noscript>
<noscript>Other contributors appear here at <a href="">https://typelevel.org/cats</a></noscript>
</div>

<script src="/cats/js/sponsors.js"></script>
Expand Down Expand Up @@ -120,13 +120,13 @@ Links:

1. Website: [typelevel.org/cats/](https://typelevel.org/cats/)
2. ScalaDoc: [typelevel.org/cats/api/](https://typelevel.org/cats/api/)
3. Type classes: [typelevel.org/cats/typeclasses](https://typelevel.org/cats/typeclasses.html)
4. Data types: [typelevel.org/cats/datatypes.html](https://typelevel.org/cats/datatypes.html)
5. Algebra overview: [typelevel.org/cats/algebra.html](https://typelevel.org/cats/algebra.html)
6. Glossary: [typelevel.org/cats/nomenclature.html](https://typelevel.org/cats/nomenclature.html)
7. Resources for Learners: [typelevel.org/cats/resources_for_learners.html](https://typelevel.org/cats/resources_for_learners.html)
8. FAQ: [typelevel.org/cats/faq.html](https://typelevel.org/cats/faq.html)
9. The Typelevel Ecosystem: [typelevel.org/cats/typelevelEcosystem.html](https://typelevel.org/cats/typelevelEcosystem.html)
3. Type classes: [typelevel.org/cats/typeclasses](https://typelevel.org/cats/typeclasses.md)
4. Data types: [typelevel.org/cats/datatypes.html](https://typelevel.org/cats/datatypes.md)
5. Algebra overview: [typelevel.org/cats/algebra.html](https://typelevel.org/cats/algebra.md)
6. Glossary: [typelevel.org/cats/nomenclature.html](https://typelevel.org/cats/nomenclature.md)
7. Resources for Learners: [typelevel.org/cats/resources_for_learners.html](https://typelevel.org/cats/resources_for_learners.md)
8. FAQ: [typelevel.org/cats/faq.html](https://typelevel.org/cats/faq.md)
9. The Typelevel Ecosystem: [typelevel.org/cats/typelevelEcosystem.html](https://typelevel.org/cats/typelevelEcosystem.md)

### Community

Expand Down Expand Up @@ -202,7 +202,7 @@ Here's a (non-exhaustive) list of companies that use Cats in production. Don't s
- [Code Dx](https://codedx.com/)
- [Codecentric](https://codecentric.de)
- [Colisweb](https://www.colisweb.com/)
- [CompStak](compstak.com)
- [CompStak](https://compstak.com)
- [Coya](https://coya.com/)
- [Datum Brain](https://datumbrain.com/)
- [Disney](https://disney.com/)
Expand Down Expand Up @@ -335,7 +335,7 @@ relax this to a single sign-off. More detail in the [process document](https://g

All code is available to you under the MIT license, available at
http://opensource.org/licenses/mit-license.php and also in the
[COPYING](COPYING) file. The design is informed by many other
[COPYING](https://github.com/typelevel/cats/blob/main/COPYING) file. The design is informed by many other
projects, in particular [Scalaz](https://github.com/scalaz/scalaz).

Copyright the maintainers, 2015-2022.
21 changes: 21 additions & 0 deletions algebra-core/src/main/scala/algebra/Priority.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2015 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package algebra

import scala.annotation.nowarn
Expand Down
21 changes: 21 additions & 0 deletions algebra-core/src/main/scala/algebra/instances/StaticMethods.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2015 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package algebra.instances

import scala.annotation.tailrec
Expand Down
21 changes: 21 additions & 0 deletions algebra-core/src/main/scala/algebra/instances/all.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2015 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package algebra
package instances

Expand Down
21 changes: 21 additions & 0 deletions algebra-core/src/main/scala/algebra/instances/array.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2015 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package algebra
package instances

Expand Down
21 changes: 21 additions & 0 deletions algebra-core/src/main/scala/algebra/instances/bigDecimal.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2015 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package algebra
package instances

Expand Down
21 changes: 21 additions & 0 deletions algebra-core/src/main/scala/algebra/instances/bigInt.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2015 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package algebra
package instances

Expand Down
21 changes: 21 additions & 0 deletions algebra-core/src/main/scala/algebra/instances/bitSet.scala
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
/*
* Copyright (c) 2015 Typelevel
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

package algebra
package instances

Expand Down
Loading

0 comments on commit 708cbab

Please sign in to comment.