diff --git a/docs/apireference.rst b/docs/apireference.rst index ea865c0e0..a1af74320 100644 --- a/docs/apireference.rst +++ b/docs/apireference.rst @@ -24,10 +24,6 @@ Classes """"""" .. autoclass:: xtgeo.RegularSurface - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -38,10 +34,6 @@ Classes """"""" .. autoclass:: xtgeo.Surfaces - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -69,10 +61,6 @@ Classes """"""" .. autoclass:: xtgeo.Points - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -92,10 +80,6 @@ Classes """"""" .. autoclass:: xtgeo.Polygons - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -117,10 +101,6 @@ Classes """"""" .. autoclass:: xtgeo.Well - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -131,10 +111,6 @@ Classes """"""" .. autoclass:: xtgeo.Wells - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -152,10 +128,6 @@ Classes """"""" .. autoclass:: xtgeo.BlockedWell - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -171,10 +143,6 @@ Classes """"""" .. autoclass:: xtgeo.BlockedWells - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -196,10 +164,6 @@ Classes """"""" .. autoclass:: xtgeo.Cube - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -220,10 +184,6 @@ Classes """"""" .. autoclass:: xtgeo.Grid - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -241,10 +201,6 @@ Classes """"""" .. autoclass:: xtgeo.GridProperty - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -255,10 +211,6 @@ Classes """"""" .. autoclass:: xtgeo.GridProperties - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -273,10 +225,6 @@ RoxUtils """""""" .. autoclass:: xtgeo.RoxUtils - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -287,10 +235,6 @@ MetadataRegularSurface """""""""""""""""""""" .. autoclass:: xtgeo.MetaDataRegularSurface - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -298,10 +242,6 @@ MetaDataRegularCube """"""""""""""""""" .. autoclass:: xtgeo.MetaDataRegularCube - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -309,10 +249,6 @@ MetaDataCPGeometry """""""""""""""""" .. autoclass:: xtgeo.MetaDataCPGeometry - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -320,10 +256,6 @@ MetaDataCPProperty """""""""""""""""" .. autoclass:: xtgeo.MetaDataCPProperty - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -331,10 +263,6 @@ MetaDataWell """""""""""" .. autoclass:: xtgeo.MetaDataWell - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -345,10 +273,6 @@ XSection """""""" .. autoclass:: xtgeo.plot.XSection - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -356,10 +280,6 @@ Map """ .. autoclass:: xtgeo.plot.Map - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: @@ -367,9 +287,5 @@ Grid3DSlice """"""""""" .. autoclass:: xtgeo.plot.Grid3DSlice - :members: - :show-inheritance: - :inherited-members: - :special-members: __init__ .. autoclasstoc:: diff --git a/docs/conf.py b/docs/conf.py index ccd295095..0e320d582 100755 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,9 +1,10 @@ # noqa # pylint: skip-file from datetime import date -import xtgeo from autoclasstoc import PublicMethods +import xtgeo + version = xtgeo.__version__ release = xtgeo.__version__ project = "xtgeo" @@ -11,21 +12,17 @@ copyright = "Equinor 2019 - " + str(current_year) + f" (XTGeo release {release})" extensions = [ + "autoclasstoc", "myst_parser", - "sphinx.ext.viewcode", "sphinx.ext.napoleon", + "sphinx.ext.viewcode", "sphinx.ext.mathjax", - "sphinx.ext.autodoc", "sphinx.ext.autosummary", - "sphinx_toolbox.more_autodoc.typehints", + "sphinx.ext.autodoc", "sphinx_toolbox.more_autosummary", - "autoclasstoc", + "sphinx_autodoc_typehints", ] -autosummary_generate = True - -autoclass_content = "both" - class RemainingPublicMethods(PublicMethods): # skip dunder methods @@ -33,13 +30,20 @@ def predicate(self, name, attr, meta): return super().predicate(name, attr, meta) and not name.startswith("__") +autoclass_content = "both" autoclasstoc_sections = [ "public-attrs", "public-methods", ] - -autodoc_typehints = "description" - +autosummary_generate = True +autodoc_default_options = { + "inherited-members": True, + "members": True, + "undoc-members": True, + "show-inheritance": True, + "special-members": "__init__", +} +autodoc_typehints = "none" napoleon_include_special_with_doc = False # The suffix of source filenames. @@ -48,7 +52,6 @@ def predicate(self, name, attr, meta): # The master toctree document. master_doc = "index" - templates_path = ["_templates"] exclude_patterns = ["_build"] pygments_style = "sphinx" diff --git a/pyproject.toml b/pyproject.toml index bfb2641ed..8cf364f11 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -85,12 +85,13 @@ dev = [ "pytest-xdist", ] docs = [ + "autoclasstoc", + "myst-parser", "pydocstyle", - "Sphinx", + "sphinx", + "sphinx-autodoc-typehints", "sphinx-rtd-theme", "sphinx-toolbox", - "autoclasstoc", - "myst-parser", ] [tool.black]