All Projects → japgolly → Nyaya

japgolly / Nyaya

Licence: lgpl-2.1
Random Data Generation and/or Property Testing in Scala & Scala.JS.

Programming Languages

scala
5932 projects
scalajs
39 projects

Projects that are alternatives of or similar to Nyaya

Zio Logging
Simple logging for ZIO apps, with correlation, context & pluggable backends out of the box.
Stars: ✭ 85 (-48.48%)
Mutual labels:  functional-programming, fp
Metalang99
A functional language for C99 preprocessor metaprogramming
Stars: ✭ 152 (-7.88%)
Mutual labels:  functional-programming, fp
Pattern Matching Ts
⚡ Pattern Matching in Typescript
Stars: ✭ 107 (-35.15%)
Mutual labels:  functional-programming, fp
Funland
Type classes for interoperability of common algebraic structures in JavaScript, TypeScript and Flow
Stars: ✭ 46 (-72.12%)
Mutual labels:  functional-programming, fp
Returns
Make your functions return something meaningful, typed, and safe!
Stars: ✭ 2,015 (+1121.21%)
Mutual labels:  functional-programming, fp
Rambda
Faster and smaller alternative to Ramda
Stars: ✭ 1,066 (+546.06%)
Mutual labels:  functional-programming, fp
Clear Config
Scala FP configuration library with a focus on runtime clarity
Stars: ✭ 108 (-34.55%)
Mutual labels:  functional-programming, fp
D4s
Dynamo DB Database Done Scala-way
Stars: ✭ 27 (-83.64%)
Mutual labels:  functional-programming, fp
Fs2
Compositional, streaming I/O library for Scala
Stars: ✭ 1,998 (+1110.91%)
Mutual labels:  functional-programming, fp
Test State
Scala Test-State.
Stars: ✭ 119 (-27.88%)
Mutual labels:  functional-programming, fp
Stm4cats
STM monad for cats-effect
Stars: ✭ 35 (-78.79%)
Mutual labels:  functional-programming, fp
Monix
Asynchronous, Reactive Programming for Scala and Scala.js.
Stars: ✭ 1,819 (+1002.42%)
Mutual labels:  functional-programming, fp
Flawless
WIP Delightful, purely functional testing no-framework. Don't even try to use it at work!
Stars: ✭ 33 (-80%)
Mutual labels:  functional-programming, fp
Request Compose
Composable HTTP Client
Stars: ✭ 80 (-51.52%)
Mutual labels:  functional-programming, fp
Bugz
🐛 Composable User Agent Detection using Ramda
Stars: ✭ 15 (-90.91%)
Mutual labels:  functional-programming, fp
Functionaljava
Functional programming in Java
Stars: ✭ 1,472 (+792.12%)
Mutual labels:  functional-programming, property-based-testing
Funfix
Functional Programming Library for JavaScript, TypeScript and Flow ✨⚡️
Stars: ✭ 596 (+261.21%)
Mutual labels:  functional-programming, fp
Frameless
Expressive types for Spark.
Stars: ✭ 717 (+334.55%)
Mutual labels:  functional-programming, fp
Scalajs React
Facebook's React on Scala.JS
Stars: ✭ 1,524 (+823.64%)
Mutual labels:  functional-programming, fp
Sup
Composable, purely functional healthchecks in Scala.
Stars: ✭ 138 (-16.36%)
Mutual labels:  functional-programming, fp

Nyaya

Nyaya is a Scala/Scala.JS library to:

  • Test properties using random data.
  • Prove properties with (reasonably-sized) finite domains.
  • Assert properties in real data.
  • Generate random data.
  • Ensure uniqueness in random data.

It is:

  • Fast. Probably the fastest Scala random data gen / prop tester. (Benchmarks coming soon…)
  • Has a nice, fluent API for generating random data. (examples)
scala> import nyaya.gen._
import nyaya.gen._

scala> val g = Gen.int mapTo Gen.boolean.option
g: nyaya.gen.Gen[Map[Int,Option[Boolean]]] = Gen(<function1>)

scala> g.samples().take(1).foreach(println)
Map(609117252 -> None, -339 -> Some(true), 1684851879 -> Some(false), 78379 -> None)

SBT setup

// Property expression, evaluation, assertion.
libraryDependencies += "com.github.japgolly.nyaya" %%% "nyaya-prop" % "0.9.2"

// Random data generation.
libraryDependencies += "com.github.japgolly.nyaya" %%% "nyaya-gen" % "0.9.2"

// Property testing with random data.
// Property proving.
libraryDependencies += "com.github.japgolly.nyaya" %%% "nyaya-test" % "0.9.2" % Test

Doc


Requires:

  • Scala 2.12+
  • Scala.JS 0.6.32+ (optional)

What does Nyaya mean?

See:


Support

If you like what I do —my OSS libraries, my contributions to other OSS libs, my programming blog— and you'd like to support me, more content, more lib maintenance, please become a patron! I do all my OSS work unpaid so showing your support will make a big difference.


Licence

Copyright (C) 2014-2020 David Barri

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].