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

Rename some internals for clarity #4166

Open
Zac-HD opened this issue Nov 10, 2024 · 0 comments
Open

Rename some internals for clarity #4166

Zac-HD opened this issue Nov 10, 2024 · 0 comments
Labels
internals Stuff that only Hypothesis devs should ever see legibility make errors helpful and Hypothesis grokable

Comments

@Zac-HD
Copy link
Member

Zac-HD commented Nov 10, 2024

Naming things is famously, uh, less easy than we might hope. This issue tracks two renames I'd like to do at some point:

  1. Rename the conjecture.data.Example class to Span, as suggested in Experimental changes for Crosshair support #4164. The word "example" is pretty badly overloaded in our codebase, and so using a short and distinct word should help - I think it's also more indicative of what this subsystem does. We'll wait for the IR changes to settle down first though.

  2. Rename the "primary" and "secondary" database keys to indicate that they store minimal and non-minimal failing examples respectively. This has caused confusion before, see e.g. Add fast path for replaying already shrunk test cases #4155, and should smooth out interoperability with e.g. HypoFuzz. I'm inclined to come up with canonical names + keys for covering examples (including un/shrunk, and location-vs-set-of-locations), and likely provide a helper function to compute said keys.

@Zac-HD Zac-HD added legibility make errors helpful and Hypothesis grokable internals Stuff that only Hypothesis devs should ever see labels Nov 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
internals Stuff that only Hypothesis devs should ever see legibility make errors helpful and Hypothesis grokable
Projects
None yet
Development

No branches or pull requests

1 participant