Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

constrained-generators: Add monitoring capability to get a handle on test case distribution #4301

Merged
merged 3 commits into from Apr 30, 2024

Conversation

MaximilianAlgehed
Copy link
Collaborator

@MaximilianAlgehed MaximilianAlgehed commented Apr 26, 2024

distribution

Description

This PR introduces monitor :: ((forall a. Term fn a -> a) -> Property -> Property) -> Pred fn and monitorSpec :: Specification fn a --> a -> Property -> Property to constrained-generators to make it easier to get a grip on test case distribution in the generators.

closes #4217

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated. If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages. New section is never added with the code changes. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@MaximilianAlgehed MaximilianAlgehed changed the title add monitoring capability to start getting a handle on test case `constrained-generators: Add monitoring capability to get a handle on test case distribution Apr 26, 2024
@MaximilianAlgehed MaximilianAlgehed changed the title `constrained-generators: Add monitoring capability to get a handle on test case distribution constrained-generators: Add monitoring capability to get a handle on test case distribution Apr 26, 2024
Copy link
Contributor

@TimSheard TimSheard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So the most useful parts of the this PR are the tests, the demonstrate how the new feature is to be used. Might add one of these to the PR description.

@MaximilianAlgehed MaximilianAlgehed merged commit c73cad9 into master Apr 30, 2024
124 of 125 checks passed
@MaximilianAlgehed MaximilianAlgehed deleted the PR-constrained-monitoring branch April 30, 2024 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce distribution logging to constrained-generators
4 participants