File tree Expand file tree Collapse file tree 5 files changed +29
-2
lines changed
Expand file tree Collapse file tree 5 files changed +29
-2
lines changed Original file line number Diff line number Diff line change 8989 ("py:class" , "p4p.nt.NTTable" ),
9090 # Problems in FastCS itself
9191 ("py:class" , "fastcs.transport.epics.pva.pvi_tree._PviSignalInfo" ),
92+ ("py:class" , "fastcs.logging._logging.LogLevel" ),
93+ ("py:class" , "fastcs.logging._graylog.GraylogEndpoint" ),
94+ ("py:class" , "fastcs.logging._graylog.GraylogStaticFields" ),
95+ ("py:class" , "fastcs.logging._graylog.GraylogEnvFields" ),
96+ ("py:obj" , "fastcs.launch.build_controller_api" ),
97+ ("docutils" , "fastcs.demo.controllers.TemperatureControllerSettings" ),
9298 # TypeVar without docstrings still give warnings
9399 ("py:class" , "fastcs.datatypes.T_Numerical" ),
94100 ("py:class" , "strawberry.schema.schema.Schema" ),
99105 (r"py:.*" , r"tickit.*" ),
100106]
101107
108+ suppress_warnings = ["docutils" ]
109+
102110# Both the class’ and the __init__ method’s docstring are concatenated and
103111# inserted into the main body of the autoclass directive
104112autoclass_content = "both"
Original file line number Diff line number Diff line change 77
88
99class AttributeIO (Generic [T , AttributeIORefT ], Tracer ):
10+ """Base class for performing IO for an ``Attribute``
11+
12+ This class should be inherited to implement reading and writing values from
13+ ``Attributes`` via some API. For read, ``Attribute``s implement the ``update``
14+ method and for write, ``Attribute`` implement the ``send`` method.
15+
16+ Concrete implementations of this class must be parameterised with a specific
17+ ``AttributeIORef`` that defines exactly what part of the API the ``Attribute``
18+ corresponds to. See the docstring for ``AttributeIORef`` for more information.
19+ """
20+
1021 ref_type = AttributeIORef
1122
1223 def __init_subclass__ (cls ) -> None :
Original file line number Diff line number Diff line change 55
66@dataclass (kw_only = True )
77class AttributeIORef :
8+ """Base for references to define IO for an ``Attribute`` over an API.
9+
10+ This object acts as a specification of the API that its corresponding
11+ ``AttributeIO`` should access for a given ``Attribute``. The fields necessary to
12+ distinguish between different ``Attributes`` is an implementation detail of the IO,
13+ but some examples are a string to send over a TCP port, or URI within an HTTP
14+ server.
15+ """
16+
817 update_period : float | None = None
918
1019
Original file line number Diff line number Diff line change 4040
4141 logger = _logger.bind(logger_name=__name__)
4242
43-
4443or to create a class logger with its name
4544
4645.. code-block:: python
4746
4847 self.logger = _logger.bind(logger_name=__class__.__name__)
4948
50-
5149As standard ``loguru`` supports ``trace`` level monitoring, but it should not be used in
5250fastcs. Instead there is a ``Tracer`` class for verbose logging with fine-grained
5351controls that can be enabled by the user at runtime.
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ class Tracer:
2020
2121 Example usage:
2222 .. code-block:: python
23+
2324 controller.ramp_rate.enable_tracing()
2425 controller.ramp_rate.disable_tracing()
2526 controller.connection.enable_tracing()
You can’t perform that action at this time.
0 commit comments