Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,23 +90,24 @@
# Problems in FastCS itself
("py:class", "T"),
("py:class", "AttrIOUpdateCallback"),
("py:class", "fastcs.transport.epics.pva.pvi_tree._PviSignalInfo"),
("py:class", "fastcs.transports.epics.pva.pvi_tree._PviSignalInfo"),
("py:class", "fastcs.logging._logging.LogLevel"),
("py:class", "fastcs.logging._graylog.GraylogEndpoint"),
("py:class", "fastcs.logging._graylog.GraylogStaticFields"),
("py:class", "fastcs.logging._graylog.GraylogEnvFields"),
("py:obj", "fastcs.control_system.build_controller_api"),
("py:obj", "fastcs.transport.epics.util.controller_pv_prefix"),
("py:obj", "fastcs.transports.epics.util.controller_pv_prefix"),
("docutils", "fastcs.demo.controllers.TemperatureControllerSettings"),
# TypeVar without docstrings still give warnings
("py:class", "fastcs.datatypes.T_Numerical"),
("py:class", "strawberry.schema.schema.Schema"),
]
nitpick_ignore_regex = [
("py:class", "fastcs.*.T"),
("py:obj", "fastcs.*.T"),
("py:class", r"fastcs.*.DType_T"),
("py:class", r"fastcs.*.Numeric_T"),
("py:obj", r"fastcs.*.DType_T"),
(r"py:.*", r"fastcs\.demo.*"),
(r"py:.*", r"tickit.*"),
("py:class", r"numpy.*"),
]

suppress_warnings = ["docutils"]
Expand Down Expand Up @@ -149,6 +150,7 @@
# docs in the python documentation.
intersphinx_mapping = {
"python": ("https://docs.python.org/3/", None),
"numpy": ("https://numpy.org/doc/stable/", None),
}

# A dictionary of graphviz graph attributes for inheritance diagrams.
Expand Down
17 changes: 11 additions & 6 deletions docs/snippets/dynamic.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,20 @@

from pydantic import BaseModel, ConfigDict, ValidationError

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import Attribute, AttrR, AttrRW, AttrW
from fastcs.attributes import (
Attribute,
AttributeIO,
AttributeIORef,
AttrR,
AttrRW,
AttrW,
)
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Bool, DataType, Float, Int, String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsIOCOptions
from fastcs.transports.epics import EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport


class TemperatureControllerParameter(BaseModel):
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/static01.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fastcs.controller import Controller
from fastcs.controllers import Controller


class TemperatureController(Controller):
Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/static02.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.launch import FastCS


Expand Down
2 changes: 1 addition & 1 deletion docs/snippets/static03.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from fastcs.attributes import AttrR
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import String
from fastcs.launch import FastCS

Expand Down
6 changes: 3 additions & 3 deletions docs/snippets/static04.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from fastcs.attributes import AttrR
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsIOCOptions
from fastcs.transports.epics import EpicsIOCOptions
from fastcs.transports.epics.ca.transport import EpicsCATransport


class TemperatureController(Controller):
Expand Down
6 changes: 3 additions & 3 deletions docs/snippets/static05.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from pathlib import Path

from fastcs.attributes import AttrR
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport


class TemperatureController(Controller):
Expand Down
6 changes: 3 additions & 3 deletions docs/snippets/static06.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@

from fastcs.attributes import AttrR
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport


class TemperatureController(Controller):
Expand Down
10 changes: 4 additions & 6 deletions docs/snippets/static07.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

NumberT = TypeVar("NumberT", int, float)

Expand Down
10 changes: 4 additions & 6 deletions docs/snippets/static08.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Float, String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

NumberT = TypeVar("NumberT", int, float)

Expand Down
10 changes: 4 additions & 6 deletions docs/snippets/static09.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR, AttrRW, AttrW
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR, AttrRW, AttrW
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Float, String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

NumberT = TypeVar("NumberT", int, float)

Expand Down
10 changes: 4 additions & 6 deletions docs/snippets/static10.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR, AttrRW, AttrW
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR, AttrRW, AttrW
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Float, Int, String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

NumberT = TypeVar("NumberT", int, float)

Expand Down
10 changes: 4 additions & 6 deletions docs/snippets/static11.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,13 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR, AttrRW, AttrW
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR, AttrRW, AttrW
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Enum, Float, Int, String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

NumberT = TypeVar("NumberT", int, float)

Expand Down
12 changes: 5 additions & 7 deletions docs/snippets/static12.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,14 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR, AttrRW, AttrW
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR, AttrRW, AttrW
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Enum, Float, Int, String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.wrappers import scan
from fastcs.methods import scan
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

NumberT = TypeVar("NumberT", int, float)

Expand Down
12 changes: 5 additions & 7 deletions docs/snippets/static13.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,14 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR, AttrRW, AttrW
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR, AttrRW, AttrW
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Enum, Float, Int, String
from fastcs.launch import FastCS
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.wrappers import command, scan
from fastcs.methods import command, scan
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

NumberT = TypeVar("NumberT", int, float)

Expand Down
12 changes: 5 additions & 7 deletions docs/snippets/static14.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR, AttrRW, AttrW
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR, AttrRW, AttrW
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Enum, Float, Int, String
from fastcs.launch import FastCS
from fastcs.logging import bind_logger, configure_logging
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.wrappers import command, scan
from fastcs.methods import command, scan
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

logger = bind_logger(__name__)

Expand Down
12 changes: 5 additions & 7 deletions docs/snippets/static15.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,15 @@
from pathlib import Path
from typing import TypeVar

from fastcs.attribute_io import AttributeIO
from fastcs.attribute_io_ref import AttributeIORef
from fastcs.attributes import AttrR, AttrRW, AttrW
from fastcs.attributes import AttributeIO, AttributeIORef, AttrR, AttrRW, AttrW
from fastcs.connections import IPConnection, IPConnectionSettings
from fastcs.controller import Controller
from fastcs.controllers import Controller
from fastcs.datatypes import Enum, Float, Int, String
from fastcs.launch import FastCS
from fastcs.logging import LogLevel, bind_logger, configure_logging
from fastcs.transport.epics.ca.transport import EpicsCATransport
from fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions
from fastcs.wrappers import command, scan
from fastcs.methods import command, scan
from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions
from fastcs.transports.epics.ca import EpicsCATransport

logger = bind_logger(__name__)

Expand Down
8 changes: 4 additions & 4 deletions docs/tutorials/static-drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -458,17 +458,17 @@ ramp so that the value updates. Check the console to see the messages. Call `di
In [1]: controller.power.enable_tracing()
[2025-11-18 11:11:12.060+0000 T] Query for attribute [TemperatureControllerAttributeIO] query=P?, response=0.0
[2025-11-18 11:11:12.060+0000 T] Attribute set [AttrR] attribute=AttrR(path=power, datatype=Float, io_ref=TemperatureControllerAttributeIORef(update_period=0.2, name='P')), value=0.0
[2025-11-18 11:11:12.060+0000 T] PV set from attribute [fastcs.transport.epics.ca.ioc] pv=DEMO:Power, value=0.0
[2025-11-18 11:11:12.194+0000 I] PV put: DEMO:R1:Enabled = 1 [fastcs.transport.epics.ca.ioc] pv=DEMO:R1:Enabled, value=1
[2025-11-18 11:11:12.060+0000 T] PV set from attribute [fastcs.transports.epics.ca.ioc] pv=DEMO:Power, value=0.0
[2025-11-18 11:11:12.194+0000 I] PV put: DEMO:R1:Enabled = 1 [fastcs.transports.epics.ca.ioc] pv=DEMO:R1:Enabled, value=1
[2025-11-18 11:11:12.195+0000 I] Sending attribute value [TemperatureControllerAttributeIO] command=N01=1, attribute=AttrRW(path=R1.enabled, datatype=Enum, io_ref=TemperatureControllerAttributeIORef(update_period=0.2, name='N'))
[2025-11-18 11:11:12.261+0000 T] Update attribute [AttrR]
[2025-11-18 11:11:12.262+0000 T] Query for attribute [TemperatureControllerAttributeIO] query=P?, response=29.040181873093132
[2025-11-18 11:11:12.262+0000 T] Attribute set [AttrR] attribute=AttrR(path=power, datatype=Float, io_ref=TemperatureControllerAttributeIORef(update_period=0.2, name='P')), value=29.040181873093132
[2025-11-18 11:11:12.262+0000 T] PV set from attribute [fastcs.transport.epics.ca.ioc] pv=DEMO:Power, value=29.04
[2025-11-18 11:11:12.262+0000 T] PV set from attribute [fastcs.transports.epics.ca.ioc] pv=DEMO:Power, value=29.04
[2025-11-18 11:11:12.463+0000 T] Update attribute [AttrR]
[2025-11-18 11:11:12.464+0000 T] Query for attribute [TemperatureControllerAttributeIO] query=P?, response=30.452524641833854
[2025-11-18 11:11:12.464+0000 T] Attribute set [AttrR] attribute=AttrR(path=power, datatype=Float, io_ref=TemperatureControllerAttributeIORef(update_period=0.2, name='P')), value=30.452524641833854
[2025-11-18 11:11:12.465+0000 T] PV set from attribute [fastcs.transport.epics.ca.ioc] pv=DEMO:Power, value=30.45
[2025-11-18 11:11:12.465+0000 T] PV set from attribute [fastcs.transports.epics.ca.ioc] pv=DEMO:Power, value=30.45
In [2]: controller.power.disable_tracing()
```

Expand Down
7 changes: 2 additions & 5 deletions src/fastcs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,7 @@
Version number as calculated by https://github.com/pypa/setuptools_scm
"""

from . import attributes as attributes
from . import controller as controller
from . import cs_methods as cs_methods
from . import datatypes as datatypes
from . import transport as transport
from ._version import __version__ as __version__
from .control_system import FastCS as FastCS
from .launch import launch as launch
from .util import ONCE as ONCE
Loading