Skip to content

Commit

Permalink
[DOC] Updating documentation (#89)
Browse files Browse the repository at this point in the history
* Updating readthedocs.yml

* Updating Sphinx version

* Updating docs theme version

* Fixing RandomForest docs

* Updating docs/conf.py
  • Loading branch information
naoise-h authored Aug 31, 2023
1 parent ffb11e3 commit dff17d0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 22 deletions.
2 changes: 1 addition & 1 deletion diffprivlib/models/forest.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class RandomForestClassifier(skRandomForestClassifier, DiffprivlibMixin): # pyl
Attributes
----------
base_estimator_ : DecisionTreeClassifier
estimator_ : DecisionTreeClassifier
The child estimator template used to create the collection of fitted sub-estimators.
estimators_ : list of DecisionTreeClassifier
Expand Down
24 changes: 7 additions & 17 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'
needs_sphinx = '5.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
Expand Down Expand Up @@ -101,18 +101,8 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'

if os.environ.get('READTHEDOCS') != 'True':
try:
import sphinx_rtd_theme
except ImportError:
pass # assume we have sphinx >= 1.3
else:
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]
html_theme = 'sphinx_rtd_theme'
# html_theme = 'classic'

html_theme = 'sphinx_rtd_theme'
print(html_theme)

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
Expand Down Expand Up @@ -179,10 +169,10 @@
# intersphinx configuration
intersphinx_mapping = {
'python': ('https://docs.python.org/3', None),
'numpy': ('https://docs.scipy.org/doc/numpy/', None),
'scipy': ('http://docs.scipy.org/doc/scipy/reference', None),
'matplotlib': ('https://matplotlib.org/', None),
'sklearn': ('http://scikit-learn.org/stable', None),
'numpy': ('https://numpy.org/doc/stable', None),
'scipy': ('https://docs.scipy.org/doc/scipy', None),
'matplotlib': ('https://matplotlib.org/stable', None),
'sklearn': ('https://scikit-learn.org/stable', None),
}


Expand Down
2 changes: 1 addition & 1 deletion docs/modules/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Tree-Based Models
.. autoclass:: RandomForestClassifier
:members:
:inherited-members:
:exclude-members: feature_importances_,n_features_
:exclude-members: feature_importances_,n_features_,base_estimator_

.. autoclass:: DecisionTreeClassifier
:members:
Expand Down
1 change: 0 additions & 1 deletion readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,3 @@ python:
path: .
extra_requirements:
- docs
system_packages: true
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ def get_version(file_path):
]

docs_require = [
'sphinx >= 1.4',
'sphinx_rtd_theme'
'sphinx >= 5.0',
'sphinx_rtd_theme >= 1.3'
]

setuptools.setup(
Expand Down

0 comments on commit dff17d0

Please sign in to comment.