Commit 4a889ccd authored by Duggan, John's avatar Duggan, John
Browse files

Fix doc builds and give a useful error message if one imports the old DataSelector class

parent 8f91d6ae
Loading
Loading
Loading
Loading
Loading
+32 −8
Original line number Diff line number Diff line
@@ -3,9 +3,19 @@ nova-trame API
================

---------------
View Components
Theme Component
---------------

.. _api_theme:

.. autoclass:: nova.trame.ThemedApp
    :members:
    :special-members: __init__

-----------------
Layout Components
-----------------

.. _api_layouts:

.. autoclass:: nova.trame.view.layouts.GridLayout
@@ -20,11 +30,9 @@ View Components
    :members:
    :special-members: __init__

.. _api_theme:

.. autoclass:: nova.trame.ThemedApp
    :members:
    :special-members: __init__
--------------------------
General Purpose Components
--------------------------

.. _api_components:

@@ -44,6 +52,14 @@ View Components
    :members:
    :special-members: __init__

.. autoclass:: nova.trame.view.utilities.local_storage.LocalStorageManager
    :members:
    :special-members: __init__

-------------------------
Job Management Components
-------------------------

.. autoclass:: nova.trame.view.components.ExecutionButtons
    :members:
    :special-members: __init__
@@ -56,6 +72,10 @@ View Components
    :members:
    :special-members: __init__

------------------------
Visualization Components
------------------------

.. _api_interactive2dplot:

.. autoclass:: nova.trame.view.components.visualization.Interactive2DPlot
@@ -66,6 +86,10 @@ View Components
    :members:
    :special-members: __init__

.. autoclass:: nova.trame.view.utilities.local_storage.LocalStorageManager
--------------------
ORNL-only components
--------------------

.. autoclass:: nova.trame.view.components.ornl.NeutronDataSelector
    :members:
    :special-members: __init__
 No newline at end of file
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ copyright = "2025, ORNL"
author = "John Duggan"
with open("../pyproject.toml", "rb") as toml_file:
    toml_dict = tomli.load(toml_file)
    release = toml_dict["tool"]["poetry"]["version"]
    release = toml_dict["project"]["version"]

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
+12 −0
Original line number Diff line number Diff line
@@ -54,6 +54,12 @@ class DataSelector(datagrid.VGrid):
        -------
        None
        """
        if "allow_custom_directory" in kwargs or "facility" in kwargs or "instrument" in kwargs:
            raise TypeError(
                "The old DataSelector component has been renamed to NeutronDataSelector. Please import it from "
                "`nova.trame.view.components.ornl`."
            )

        if "items" in kwargs:
            raise AttributeError("The items parameter is not allowed on DataSelector widget.")

@@ -182,3 +188,9 @@ class DataSelector(datagrid.VGrid):
    def reset(self, _: Any = None) -> None:
        self._reset_state()
        self._reset_rv_grid()

    def set_state(self, *args: Any, **kwargs: Any) -> None:
        raise TypeError(
            "The old DataSelector component has been renamed to NeutronDataSelector. Please import it from "
            "`nova.trame.view.components.ornl`."
        )