typelevel / typelevel/scalacheck

Generators library

Open
#456 5 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Scala
Stars
2k
Forks
393
Avg merge
6h 42m
Merged PRs (30d)
4

Description

It would be great if there was a library of reusable Generators / Arbitrary instances.

Over time we have noticed a certain set of generators that are project-independent and come in handy in when reused in various software projects. Just to give an idea what these include:

  • collections: short lists (pot. empty / non-empty), small sets (pot. empty / non-empty), (small) maps (pot. empty / non-empty), lists of distinct elements
  • numeric: positive / negative ints / longs / BigIntegers
  • date / datetime / locales
  • strings: no control chars, alpha (numeric) chars
  • file system: file paths (relative + absolute)
  • networking: HTTP / FTP / ... URIs / URLs (with / without credentials, ...)

I wonder if there's any interest in adding these to scalacheck (probably as a separate artifact, e.g. scalacheck-generators)? I could contribute such an initial set of generators.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No files, tests, or entry points are named. Start by reviewing the ScalaCheck project structure and its existing Generators and Arbitrary instances, then define the scope of a reusable library or separate scalacheck-generators artifact. Done would mean an agreed initial set of project-independent generators and a clear integration or packaging plan.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
testing-qa
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.