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
Add inheritance diagram to API reference #695
Changes from 6 commits
2f810f9
fe4154f
7b0d406
6d071d8
ee4f2be
75fe4d0
01c027b
173f217
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
div.graphviz { | ||
overflow: auto; | ||
max-width: 620px; | ||
max-height: 30px; | ||
text-align: center; | ||
} | ||
|
||
img.inheritance { | ||
max-width: none; | ||
max-height: 30px; | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,8 @@ | |
|
||
.. currentmodule:: {{ module }} | ||
|
||
.. inheritance-diagram:: {{ objname }} | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Which elements use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I guess I'm realizing I like that we have There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @dsherry its just every other class thats not pipeline/estimator/transformer. I made the other There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, ok. |
||
|
||
.. autoclass:: {{ objname }} | ||
{% block methods %} | ||
{% if methods %} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,6 +53,8 @@ | |
'sphinx.ext.napoleon', | ||
'sphinx.ext.viewcode', | ||
'sphinx.ext.extlinks', | ||
'sphinx.ext.graphviz', | ||
'sphinx.ext.inheritance_diagram' | ||
] | ||
|
||
# Add any paths that contain templates here, relative to this directory. | ||
|
@@ -208,6 +210,8 @@ | |
nbsphinx_execute = 'always' | ||
nbsphinx_timeout = 600 # sphinx defaults each cell to 30 seconds so we need to override here | ||
|
||
inheritance_graph_attrs = dict(rankdir="LR", size='"1000, 333"', | ||
fontsize=30, labelfontsize=30, ratio='compress', dpi=960) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Interesting. Is there doc on what parameters this module supports? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah! Its just the graphviz parameters. https://www.graphviz.org/doc/info/attrs.html There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We can play with them more later to make things prettier 😄 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nice |
||
|
||
class AccessorLevelDocumenter(Documenter): | ||
""" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why set specific pixel values for these things as opposed to percentages?
I mean, I guess I understand why the height is fixed at a pixel value. But I wonder if making it slightly more would be helpful. When I scroll to the right on my mac, the scroll bar covers half the image.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The real answer is: I couldn't get it to work with percentages lol. I wanted to use 100% of the div (max-height: 100%) but it never worked for me. Yeah I can bump the height value!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. Weird! That's ok.