From faf36dbbbe5f7e4b7fdecb9ac466b47ad37089c2 Mon Sep 17 00:00:00 2001 From: Nicola Demo Date: Fri, 12 Dec 2025 12:27:09 +0100 Subject: [PATCH] fix documentation --- docs/source/ae.rst | 4 +-- docs/source/ann.rst | 4 +-- docs/source/code.rst | 5 +++- docs/source/conf.py | 29 ++++++++-------------- docs/source/database.rst | 2 -- docs/source/gpr.rst | 4 +-- docs/source/kneighbors_regressor.rst | 4 +-- docs/source/linear.rst | 4 +-- docs/source/neighbors_regressor.rst | 4 +-- docs/source/parameter.rst | 17 +++++++++++++ docs/source/pod.rst | 4 +-- docs/source/podae.rst | 4 +-- docs/source/radius_neighbors_regressor.rst | 4 +-- docs/source/rbf.rst | 4 +-- docs/source/snapshot.rst | 17 +++++++++++++ ezyrb/reduction/reduction.py | 8 ++++++ pyproject.toml | 2 +- 17 files changed, 78 insertions(+), 42 deletions(-) create mode 100644 docs/source/parameter.rst create mode 100644 docs/source/snapshot.rst diff --git a/docs/source/ae.rst b/docs/source/ae.rst index ad169418..9b74d2d8 100644 --- a/docs/source/ae.rst +++ b/docs/source/ae.rst @@ -1,9 +1,9 @@ AE ===================== -.. currentmodule:: ezyrb.ae +.. currentmodule:: ezyrb.reduction.ae -.. automodule:: ezyrb.ae +.. automodule:: ezyrb.reduction.ae .. autosummary:: :toctree: _summaries diff --git a/docs/source/ann.rst b/docs/source/ann.rst index cef6b381..23c455c6 100644 --- a/docs/source/ann.rst +++ b/docs/source/ann.rst @@ -1,9 +1,9 @@ ANN ===================== -.. currentmodule:: ezyrb.ann +.. currentmodule:: ezyrb.approximation.ann -.. automodule:: ezyrb.ann +.. automodule:: ezyrb.approximation.ann .. autosummary:: :toctree: _summaries diff --git a/docs/source/code.rst b/docs/source/code.rst index 844f9fd2..33d275b1 100644 --- a/docs/source/code.rst +++ b/docs/source/code.rst @@ -2,14 +2,17 @@ Code Documentation ================== .. toctree:: - :maxdepth: 2 + :maxdepth: 2 database + parameter + snapshot approximation linear rbf radius_neighbors_regressor kneighbors_regressor + neighbors_regressor gpr ann reduction diff --git a/docs/source/conf.py b/docs/source/conf.py index 3c2398dc..3c584b31 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -14,10 +14,7 @@ import sys import os -import shlex import sphinx -from sphinx.errors import VersionRequirementError -import sphinx_rtd_theme import time import importlib.metadata @@ -32,17 +29,11 @@ _DISTRIBUTION_METADATA = importlib.metadata.metadata("ezyrb") project = _DISTRIBUTION_METADATA["Name"] copyright = f'2016-{time.strftime("%Y")}, EZyRB contributors' -author = _DISTRIBUTION_METADATA["Author"] +author = _DISTRIBUTION_METADATA["Author-email"] # -- General configuration ------------------------------------------------ -# If your documentation needs a minimal Sphinx version, state it here. -needs_sphinx = '1.4' -if needs_sphinx > sphinx.__display_version__: - message = 'This project needs at least Sphinx v{0!s}'.format(needs_sphinx) - raise VersionRequirementError(message) - # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. @@ -56,14 +47,16 @@ 'sphinx.ext.todo', 'sphinx.ext.viewcode', 'sphinx.ext.coverage', - 'sphinx.ext.imgmath', 'sphinx.ext.ifconfig', + 'sphinx.ext.mathjax', ] -intersphinx_mapping = {'python': ('http://docs.python.org/2', None), - 'numpy': ('http://docs.scipy.org/doc/numpy/', None), - 'scipy': ('http://docs.scipy.org/doc/scipy/reference/', None), - 'matplotlib': ('http://matplotlib.sourceforge.net/', None)} +intersphinx_mapping = { + "python": ("https://docs.python.org/3", None), + "numpy": ("https://numpy.org/doc/stable/", None), + "scipy": ("https://docs.scipy.org/doc/scipy/", None), + "matplotlib": ("https://matplotlib.org/stable", None), +} # Add any paths that contain templates here, relative to this directory. templates_path = ['_templates'] @@ -97,7 +90,7 @@ # # This is also used if you do content translation via gettext catalogs. # Usually you set "language" from the command line for these cases. -language = None +language = 'en' # There are two options for replacing |today|: either, you set today to some # non-false value, then it is used: @@ -142,7 +135,7 @@ # classes and attributes. As side effects, this option ... ??? # If false, ... ???. # The default is True. -viewcode_import = True +viewcode_follow_imported_members = True # -- Options for HTML output ---------------------------------------------- @@ -157,7 +150,7 @@ #html_theme_options = {} # Add any paths that contain custom themes here, relative to this directory. -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] +# html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". diff --git a/docs/source/database.rst b/docs/source/database.rst index 69bb7217..80fd33fa 100644 --- a/docs/source/database.rst +++ b/docs/source/database.rst @@ -10,8 +10,6 @@ Database :nosignatures: Database - Database.parameters - Database.snapshots Database.__getitem__ Database.__len__ Database.add diff --git a/docs/source/gpr.rst b/docs/source/gpr.rst index bfdc9421..6ce12699 100644 --- a/docs/source/gpr.rst +++ b/docs/source/gpr.rst @@ -1,9 +1,9 @@ GPR ===================== -.. currentmodule:: ezyrb.gpr +.. currentmodule:: ezyrb.approximation.gpr -.. automodule:: ezyrb.gpr +.. automodule:: ezyrb.approximation.gpr .. autosummary:: :toctree: _summaries diff --git a/docs/source/kneighbors_regressor.rst b/docs/source/kneighbors_regressor.rst index 36c4ca44..eb525f9a 100644 --- a/docs/source/kneighbors_regressor.rst +++ b/docs/source/kneighbors_regressor.rst @@ -1,9 +1,9 @@ KNeighborsRegressor ===================== -.. currentmodule:: ezyrb.kneighbors_regressor +.. currentmodule:: ezyrb.approximation.kneighbors_regressor -.. automodule:: ezyrb.kneighbors_regressor +.. automodule:: ezyrb.approximation.kneighbors_regressor .. autosummary:: :toctree: _summaries diff --git a/docs/source/linear.rst b/docs/source/linear.rst index 995fd314..2aa014c0 100644 --- a/docs/source/linear.rst +++ b/docs/source/linear.rst @@ -1,9 +1,9 @@ Linear ===================== -.. currentmodule:: ezyrb.linear +.. currentmodule:: ezyrb.approximation.linear -.. automodule:: ezyrb.linear +.. automodule:: ezyrb.approximation.linear .. autosummary:: :toctree: _summaries diff --git a/docs/source/neighbors_regressor.rst b/docs/source/neighbors_regressor.rst index 7a46ebc6..827fe177 100644 --- a/docs/source/neighbors_regressor.rst +++ b/docs/source/neighbors_regressor.rst @@ -1,9 +1,9 @@ NeighborsRegressor ===================== -.. currentmodule:: ezyrb.neighbors_regressor +.. currentmodule:: ezyrb.approximation.neighbors_regressor -.. automodule:: ezyrb.neighbors_regressor +.. automodule:: ezyrb.approximation.neighbors_regressor .. autosummary:: :toctree: _summaries diff --git a/docs/source/parameter.rst b/docs/source/parameter.rst new file mode 100644 index 00000000..1fe00cb5 --- /dev/null +++ b/docs/source/parameter.rst @@ -0,0 +1,17 @@ +Parameter +===================== + +.. currentmodule:: ezyrb.parameter + +.. automodule:: ezyrb.parameter + +.. autosummary:: + :toctree: _summaries + :nosignatures: + +.. autoclass:: Parameter + :members: + :private-members: + :undoc-members: + :show-inheritance: + :noindex: diff --git a/docs/source/pod.rst b/docs/source/pod.rst index 439bb45f..7f61ec5b 100644 --- a/docs/source/pod.rst +++ b/docs/source/pod.rst @@ -1,9 +1,9 @@ POD ===================== -.. currentmodule:: ezyrb.pod +.. currentmodule:: ezyrb.reduction.pod -.. automodule:: ezyrb.pod +.. automodule:: ezyrb.reduction.pod .. autosummary:: :toctree: _summaries diff --git a/docs/source/podae.rst b/docs/source/podae.rst index 07bcc5be..f22266c7 100644 --- a/docs/source/podae.rst +++ b/docs/source/podae.rst @@ -1,9 +1,9 @@ PODAE ===================== -.. currentmodule:: ezyrb.pod_ae +.. currentmodule:: ezyrb.reduction.pod_ae -.. automodule:: ezyrb.pod_ae +.. automodule:: ezyrb.reduction.pod_ae .. autosummary:: :toctree: _summaries diff --git a/docs/source/radius_neighbors_regressor.rst b/docs/source/radius_neighbors_regressor.rst index 6a388ebb..30368ba2 100644 --- a/docs/source/radius_neighbors_regressor.rst +++ b/docs/source/radius_neighbors_regressor.rst @@ -1,9 +1,9 @@ RadiusNeighborsRegressor ===================== -.. currentmodule:: ezyrb.radius_neighbors_regressor +.. currentmodule:: ezyrb.approximation.radius_neighbors_regressor -.. automodule:: ezyrb.radius_neighbors_regressor +.. automodule:: ezyrb.approximation.radius_neighbors_regressor .. autosummary:: :toctree: _summaries diff --git a/docs/source/rbf.rst b/docs/source/rbf.rst index c6edb832..1cd4d5a1 100644 --- a/docs/source/rbf.rst +++ b/docs/source/rbf.rst @@ -1,9 +1,9 @@ RBF ===================== -.. currentmodule:: ezyrb.rbf +.. currentmodule:: ezyrb.approximation.rbf -.. automodule:: ezyrb.rbf +.. automodule:: ezyrb.approximation.rbf .. autosummary:: :toctree: _summaries diff --git a/docs/source/snapshot.rst b/docs/source/snapshot.rst new file mode 100644 index 00000000..4e49ac88 --- /dev/null +++ b/docs/source/snapshot.rst @@ -0,0 +1,17 @@ +Snapshot +===================== + +.. currentmodule:: ezyrb.snapshot + +.. automodule:: ezyrb.snapshot + +.. autosummary:: + :toctree: _summaries + :nosignatures: + +.. autoclass:: Snapshot + :members: + :private-members: + :undoc-members: + :show-inheritance: + :noindex: diff --git a/ezyrb/reduction/reduction.py b/ezyrb/reduction/reduction.py index f6cf8864..05b8f2bb 100644 --- a/ezyrb/reduction/reduction.py +++ b/ezyrb/reduction/reduction.py @@ -21,3 +21,11 @@ def transform(self): @abstractmethod def inverse_transform(self): """Abstract `inverse_transform`""" + + @abstractmethod + def expand(self): + """Abstract `expand`""" + + @abstractmethod + def reduce(self): + """Abstract `reduce`""" \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 41112a88..bd8f2305 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,7 +17,7 @@ dependencies = [ "numpy", "scipy", "matplotlib", - "scikit-learn>=1.0", + "scikit-learn", "torch", "datasets" ]