-
Notifications
You must be signed in to change notification settings - Fork 594
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
Improving docs across core strategies #2957
Comments
|
I had been thinking this as well, but wasn't sure if restructuring the page itself was on the table. I think this is a great idea and that it makes it easier to get a bird's eye view of all the strategies |
Anything that doesn't break URLs is on the table 😁 (I've wanted to restructure to follow the four kinds of documentation for years, but doing it well - including redirects - is a lot of work and not at the top of my todo list. I'd be delighted if someone volunteered to do it though!) |
That is what I was worried about when I suggested expanding the TOC rather than rearrange the strats. Rearranging strategies into scalars, collections, etc. would break URLs, right? E.g. in the tutorial I link to https://hypothesis.readthedocs.io/en/latest/data.html#hypothesis.strategies.fixed_dictionaries |
Yeah, we can rearrange them on the page and add sidebar-linkable subheadings though (which also preserves ctrl-f searchability). |
FWIW, this format of documentation is very easy to use for libraries that are essentially just a big collection of utility functions: https://ramdajs.com/docs/ The |
While working on a tutorial for pycon, I found that a substantial part of my materials was simply explaining what the various strategies do... which is what docstrings are for, but I think that ours fall short.
I am a fan of NumPy-style docs where each function's parameters are clearly described – alongside their type annotations – and an example section follows. Among these qualities, I think including an examples section for each docstring has the biggest bang for its buck.
One issue with this is that the Core Strategies page may end up being pretty lengthy. Perhaps expanding the TOC to include the strategies would make it easier for users to navigate. These would be collapsable, so this wouldn't blow up the navigation pane.
The text was updated successfully, but these errors were encountered: