Skip to content

Commit

Permalink
update inheritance diagrams (#1248)
Browse files Browse the repository at this point in the history
* update inheritance diagrams

* update release notes

* fix layout

* fix release notes

* fix docs

Co-authored-by: bchen1116 <bryan.chen@alteryx.com>
  • Loading branch information
bchen1116 and bchen1116 committed Oct 1, 2020
1 parent d04dba7 commit 8cdfe14
Show file tree
Hide file tree
Showing 11 changed files with 45 additions and 26 deletions.
9 changes: 1 addition & 8 deletions docs/source/_static/style.css
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
div.graphviz {
overflow: auto;
max-width: 620px;
max-height: 50px;
text-align: center;
text-align: left;
}

img.inheritance {
max-width: none;
max-height: 30px;
}
7 changes: 5 additions & 2 deletions docs/source/_templates/class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}
{% block methods %}
{% if methods %}
Expand All @@ -18,3 +16,8 @@
{%- endfor %}
{% endif %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
7 changes: 5 additions & 2 deletions docs/source/_templates/class_with_properties.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}
{% block methods %}
{% if methods %}
Expand All @@ -29,3 +27,8 @@
~{{ name }}.{{ item }}
{%- endfor %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
7 changes: 5 additions & 2 deletions docs/source/_templates/data_check_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}
{% set class_attributes = ['name'] %}

Expand Down Expand Up @@ -41,3 +39,8 @@
{%- endfor %}
{% endif %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
7 changes: 5 additions & 2 deletions docs/source/_templates/data_check_message.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}
{% set class_attributes = ['message_type'] %}
{% set special_methods = ['__str__', '__eq__'] %}
Expand Down Expand Up @@ -34,3 +32,8 @@
{%- endfor %}
{% endif %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
7 changes: 5 additions & 2 deletions docs/source/_templates/estimator_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}
{% set class_attributes = ['name', 'model_family', 'hyperparameter_ranges', 'supported_problem_types',
'default_parameters'] %}
Expand Down Expand Up @@ -43,3 +41,8 @@
{%- endfor %}
{% endif %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
7 changes: 5 additions & 2 deletions docs/source/_templates/pipeline_base_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}
{% set class_attributes = ['name', 'custom_name', 'summary', 'component_graph', 'problem_type',
'model_family', 'hyperparameters', 'custom_hyperparameters',
Expand Down Expand Up @@ -45,3 +43,8 @@
{%- endfor %}
{% endif %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
7 changes: 5 additions & 2 deletions docs/source/_templates/pipeline_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}
{% set class_attributes = ['name', 'custom_name', 'summary', 'component_graph', 'problem_type',
'model_family', 'hyperparameters', 'custom_hyperparameters',
Expand Down Expand Up @@ -50,3 +48,8 @@
{%- endfor %}
{% endif %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
7 changes: 5 additions & 2 deletions docs/source/_templates/transformer_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

.. currentmodule:: {{ module }}

.. inheritance-diagram:: {{ objname }}

.. autoclass:: {{ objname }}

{% set class_attributes = ['name', 'model_family', 'hyperparameter_ranges', 'default_parameters'] %}
Expand Down Expand Up @@ -42,3 +40,8 @@
{%- endfor %}
{% endif %}
{% endblock %}

Class Inheritance
"""""""""""""""""

.. inheritance-diagram:: {{ objname }}
5 changes: 3 additions & 2 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,9 @@
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)
inheritance_graph_attrs = dict(rankdir="TB", dpi=192.0, ranksep=0.02)
inheritance_node_attrs = dict(fontsize=6, height=0.15, width=5, fixedsize=True)
inheritance_edge_attrs = dict(arrowsize=0.1)

class AccessorLevelDocumenter(Documenter):
"""
Expand Down
1 change: 1 addition & 0 deletions docs/source/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Release Notes
* Documentation Changes
* Fixed and updated code blocks in Release Notes :pr:`1243`
* Added DecisionTree estimators to API Reference :pr:`1246`
* Changed class inheritance display to flow vertically :pr:`1248`
* Testing Changes


Expand Down

0 comments on commit 8cdfe14

Please sign in to comment.