Skip to content

UV + Precommit + a CLI Entry Point #110

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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

dvankampen
Copy link

@dvankampen dvankampen commented May 19, 2025

this PR is a bit conflated as it introduces a handful of things. I am of course open to discussing splitting it up however we see fit.

  1. migrated to uv for build and develop
  2. Update the github workflow to leverage uv as well instead of pip and pip-tools
  3. adds a .pre-commit-config.yaml with a few basic hooks, to address the build failure of .pre-commit.ci (as tends to be the case, this changed a lot of things)
  4. adding in a command line interface (hypothesisjson)
  5. added a test for said interface as well

The work is not yet quite complete, but it is mature enough to need some input. For instance:

  1. how do you see using seed and num arguments detailed on New feature: command-line interface #106 ?
  2. Should we be calling example()? Right now it raises a nonInteractiveWarning, so I think not. Open to suggestions on generation otherwise.

@dvankampen dvankampen changed the title UV + a CLI Entry Point UV + Precommit + a CLI Entry Point May 19, 2025
@dvankampen dvankampen marked this pull request as ready for review May 19, 2025 20:26
@Zac-HD
Copy link
Member

Zac-HD commented May 19, 2025

Thanks Dave! I'm really looking forward to getting this out to our users 😁

After we talked at the sprints; I think my suggestion is to split this up into a sequence of PRs:

  1. just the CI and build changes
  2. the CLI, as a standalone app (e.g. hypothesis-jsonschema SCHEMA ... rather than hypothesis json SCHEMA ...). I can come back to integrate this into Hypothesis later
  3. then on to the larger refactoring.
  • how do you see using seed and num arguments detailed on New feature: command-line interface #106 ?
  • Should we be calling example()? Right now it raises a nonInteractiveWarning, so I think not. Open to suggestions on generation otherwise.

--seed as an argument to @hypothesis.seed(seed_value); --num as an argument to @settings(..., max_examples=num). Instead of using .example(), we should define a test with @given(...) and use that.

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.

2 participants