Realistic sample value generators for Scala.
This project's a work-in-progress, and it's settling on design patterns and essential datasets to provide. Until those are stabilized, this project will not accept pull-requests.
Target | Scala 2.12 | Scala 2.13 | Scala 3 |
---|---|---|---|
JVM | ✅ | ✅ | ✅ |
JavaScript | ❔ | ❔ | ❔ |
Add both this project's resolver and library dependencies.
Most projects will want to obtain the ScalaCheck Gen
and Arbitrary
instances:
resolvers += "Ahlers Consulting" at "https://artifacts.ahlers.consulting/maven2"
libraryDependencies += "ahlers.faker" %% "faker-scalatest" % "0.2.0-SNAPSHOT" % Test
For those interested only in the data:
resolvers += "Ahlers Consulting" at "https://artifacts.ahlers.consulting/maven2"
libraryDependencies += "ahlers.faker" %% "faker-datasets" % "0.2.0-SNAPSHOT" % Test ::
TBD.
TBD.
This library tested on and supported on these platforms.
JDK | macOS | Linux | Windows |
---|---|---|---|
8 | ✅ | ✅ | ✅ |
9 | ❔ | ❔ | ❔ |
11 | ✅ | ✅ | ✅ |
12 | ❔ | ❔ | ❔ |
13 | ❔ | ❔ | ❔ |
14 | ❔ | ❔ | ❔ |
15 | ✅ | ✅ | ✅ |
Various parts (e.g., name, homepage, locality) of businesses from these sources:
Made available as component parts (local, domain, and comment) with strict validation according to applicable IETF standards (e.g., RFC 5322). Synthesized using this library's person name and company generators.
As name prefix, given name, middle name, family name, nickname, and name suffix from these sources:
- United States Census Bureau: Frequently Occurring Surnames from Census 1990
- United States Census Bureau: Frequently Occurring Surnames from the Census 2000
- Magazin für Computertechnik: 40 000 Namen
This module provides what are, essentially, small ETL pipelines with the aim of reducing complexity, payload, and dependencies in dataset modules, used by this same project to ship for consumers a set of concise, trivially-parsed formats.
Most consumers of these libraries will not use this library of plugins; the preprocessing is made available to document how upstream sources are obtained and modified, and make available additional output formats should consumers wish to repurpose their output. For example, power users might want to use different output formats (planned are JSON and YAML) in different ways.
Over time, this is expected to grow in to a larger and more elaborate corpus of sources and normalizations. These upstream sources often provide greater detail than is used by this library. Also, over time, greater detail will be made available in the output of generators.
While arbitrary value generation is useful, testing often profits from realistic samples. This library aims to provide generators for email addresses, geographical locations, person names, phone numbers, universal resource identifiers (URI), and more.
It takes cues from these similar projects for other languages:
And means to fill gaps left by those for Scala which haven't seen recent activity:
Because this project preprocesses upstream sources, it's able to be largely free of extraneous dependencies in modules intended for end users. Confined to the [Plugins][#plugins] module, noteworthy dependencies include:
- The answer by lpiepiora to Add plugins under a same project in sbt on Stack Overflow was helpful in factoring out resource generators and using them as plugins as part of this same project.