scikit-learn-contrib/project-template

CSS broken somehow; rendering parameters doesn't work

Closed this issue · 5 comments

Also see discussion here:
https://github.com/scikit-learn-contrib/imbalanced-learn/blob/master/doc/conf.py#L320

https://sklearn-template.readthedocs.io/en/latest/generated/skltemplate.TemplateEstimator.html#skltemplate.TemplateEstimator

The parameters are not rendered correctly, they should look like this:
https://imbalanced-learn.org/stable/generated/imblearn.under_sampling.CondensedNearestNeighbour.html#imblearn.under_sampling.CondensedNearestNeighbour

image

or this:
http://contrib.scikit-learn.org/forest-confidence-interval/reference/forestci.html#calc-inbag

image

The imbalanced-learn docs have app.add_stylesheet("basic.css") in conf.py which would fix this for the template project, but that breaks the alignment in the API overview.

There seems to be some difference in how all the contrib projects are set up and some seem to work and some have glitches :-/ anyway, the current template doesn't render parameters properly.

For one that actually looks like the rest, see metric-learn:
http://contrib.scikit-learn.org/metric-learn/generated/metric_learn.LFDA.html#metric_learn.LFDA
It has a super simple conf.py but somehow renders correctly? I'm a bit baffled.

# Switch to old behavior with html4, for a good display of references,
# as described in https://github.com/sphinx-doc/sphinx/issues/6705
html4_writer = True

is the magic switch, I think.

hm ok that fixes the indentation but not the rendering of the parameter / type pair... ugh!

image

Fixed the CSS by using the latest tech stuff ;)
pydata-sphinx-theme is solving those.