sphinx-themes.org icon indicating copy to clipboard operation
sphinx-themes.org copied to clipboard

Consider using something other than urllib.parse to demonstrate API docs? Plus dummy examples

Open smheidrich opened this issue 1 year ago • 5 comments

The API docs for urllib.parse included in the theme demos don't feature a single method, only functions and classes without methods, so IMHO it's kind of a bad example to show what typical API docs will look like. Would you be open to using another module for the API docs demo and/or maybe adding some dummy class examples to that page manually?

The latter option would also be good because another thing that differentiates themes is how well they deal with overly long package/module or class/function names, e.g. Alabaster vs Insipid:

image showing overly long class name leading to horizontal scrollbar in Alabaster, which looks bad   image showing overly long class name leading to mid-word break in Insipid, which looks fine

As such names are rare in Python's standard library, the only (?) way to get this to show would probably be dummy examples. Although maybe they should be on a separate page so people aren't put off themes just because of this edge case.

Thoughts?

smheidrich avatar Mar 29 '23 22:03 smheidrich

Also urllib.parse isn't good due to incorrect arguments rendering (well, maybe rendering is correct, but docstrings are not). You can see it on above Insipid screenshot.

Look at qs: percent-encoded query string to be parsed string, qs is not bold. Next string keep_blank_values: flag indicating whether blank values in is bold, but that's not right behavior, only parameter name should be bold.

andrei-korshikov avatar Aug 19 '23 09:08 andrei-korshikov

If someone knows of an existing package to exercise this, I'll happily reuse that. Absent that, I'd also be OK with adapting the demo documentation to use a custom .py file to run autodoc on.

pradyunsg avatar Aug 20 '23 02:08 pradyunsg