holoviz-dev / nbsite

Build a tested, sphinx-based website from notebooks
https://nbsite.holoviz.org
BSD 3-Clause "New" or "Revised" License
29 stars 13 forks source link

Improved formatting of parameters in reference docs #128

Closed philippjfr closed 5 years ago

philippjfr commented 5 years ago

The current formatting for parameters in Sphinx API reference documentation is downright terrible, e.g. see:

Screen Shot 2019-05-31 at 3 21 30 PM

Most of the attributes are either something no one really cares about OR it displays the default values which definitely no one cares about. This is an attempt to improve the formatting a bit and remove useless information. Admittedly this is a different theme so ignore the styling but the content is much more relevant using this new scheme:

Screen Shot 2019-05-31 at 3 23 09 PM

One of the main issues is that this hardcodes the parameter attributes someone might care about, which won't work for user defined parameters which might have additional attributes.

jbednar commented 5 years ago

Can it not instead hard-code the parameter attributes to suppress?

I'm curious why you say no one cares about the default values; isn't that the main thing most people care about? I.e., they look at the parameter, look at the value it has, and decide whether to change it? Maybe I'm misunderstanding what bit of the docs you're talking about.

philippjfr commented 5 years ago

Can it not instead hard-code the parameter attributes to suppress?

That seems like a good idea.

I'm curious why you say no one cares about the default values; isn't that the main thing most people care about?

We are talking about different default values, I'm talking about the default values of the parameter attributes like allow_None, precedence, compute_default_fn, etc., that probably wasn't clear.

jbednar commented 5 years ago

Ah, right; nobody cares about those. :-)

philippjfr commented 5 years ago

Going to merge.