Releases: DiamondLightSource/FastCS
0.8.0
Breaking Changes
- Specific interfaces (e.g. EPICS, Tango) now inherit a new
TransportAdapter
class andBackend
has been repurposed as the internal logic where a controller is combined with a transport. Modulefastcs.backends
->fastcs.transport
- To update: Replace backends with transport in imports. Some internals of specific transports have also been moved around.
Mapping
has been removed. This was already made unnecessary in the public API, but drivers could still be using it.- To update:
Controller
should be passed directly whereMapping
was used previously.
- To update:
New Features
- Rest and GraphQL transports (backend has been renamed to transport)
- New API to simplify the main entrypoint of drivers. This will automatically create a schema for the controller, as well as any available transports, as CLI arguments so that the parameters can be provided by a yaml config. This may be streamlined even more in a future release by adding a main entrypoint to FastCS itself by providing an additional argument to define what controller to import.
from fastcs import launch
from controller import MyController
...
def main():
launch(MyController)
if __name__ == "__main__":
main()
Or, to expose configuration as CLI options, use the FastCS
class to run the application
...
app = typer.Typer()
@app.command()
def ioc(pv_prefix: str, ip: str, port: int):
controller = MyController(ip, port)
options = EpicsOptions(ioc=EpicsIOCOptions(pv_prefix=pv_prefix))
FastCS(controller, options).run()
if __name__ == "__main__":
app()
- New
root_attribute
field onSubController
. If set, this attribute will be added to the parent controller to represent the state of theSubController
overall. BaseController.attributes
dict that can be used in preference tosetattr(...)
to add attributes during initialisation.- New
Attribute.initial_value
to set the attribute to something other than the default for its datatype. Update.update_period
is now nullable. If set toNone
(now the default) then theupdate
method will not be called.- Allow attributes created without a
Handler
to allow setting and getting values internally without the need to send anything to a device - New
Attribute.description
to add a description for the attribute to the value / ui / docs of the transport (depending on the transport) - New
Attribute.add_update_datatype_callback
to enable a transport to add hooks to be run by the attribute when its datatype changes at runtime
What's Changed
- 55 scan tasks should be stopped cleanly when process stopped by @evalott100 in #75
- swapped back to using
Future
s by @evalott100 in #79 - Remove tango polling by @marcelldls in #66
- pass ioc options to
EpicsIOC.__init__
instead ofrun
by @evalott100 in #88 - 81 add features to attributes and datatypes by @evalott100 in #82
- Add Rest API Backend by @marcelldls in #69
- explicitly closed fastapi test client by @evalott100 in #92
- Refactor developer API with transports and app launcher by @marcelldls in #67
- Ignore return type hint by @marcelldls in #97
- Add optional version command to launcher by @marcelldls in #96
- Change how we search for attributes by @evalott100 in #91
- Changed from
builder.aOut
tobuilder.Action
for commands by @evalott100 in #100 - Add SimpleHandler to make minimal Attributes functional by @GDYendell in #105
- Surpress tango test logging by @marcelldls in #95
- Add GraphQL transport by @marcelldls in #71
- Update to copier 2.6.0 to fix pypi publish by @GDYendell in #107
New Contributors
- @evalott100 made their first contribution in #75
Full Changelog: 0.7.0...0.8.0
0.7.0
What's Changed
- Convert Backend class attributes to instance attributes by @GDYendell in #51
- Add info tags to define PVI structure from controllers by @GDYendell in #54
- Disable EPICS attributes and commands with too-long PV names by @jsouter in #56
- Add dropdowns for EPICS mbb records by @jsouter in #40
- Update copier and adopt pyright by @GDYendell in #61
New Contributors
Full Changelog: 0.6.0...0.7.0
0.6.0
Breaking Changes
Backend
now takes aController
as the first argument instead of aMapping
Backend
now has arun
method that should be implemented by all child classesEpicsBackend.get_ioc
removed, callrun
directly insteadTangoBackend.get_dsr
removed, callrun
directly instead
What's Changed
- Enable controller initialisation on main event loop by @GDYendell in #49
Full Changelog: 0.5.0...0.6.0
0.5.0
Breaking Changes
SubController
paths are now defined by passing a name when registering with a parent Controller
rather than by passing the full list when creating. Registered SubController
s are now stored in a dictionary by path, not a list.
controller.register_sub_controller(SubController("a"))
-> controller.register_sub_controller("a", SubController())
sub_controllers: list[str] = controller.get_sub_controllers()
-> sub_controllers: dict[str, BaseController] = controller.get_sub_controllers()
What's Changed
- Tango backend attempt by @marcelldls in #11
- Add structure to SubController hierarchy by @GDYendell in #45
- Add allowed values for creating combo box widgets by @GDYendell in #46
- Update to copier template 2.1.0-40-g9e70b8b by @GDYendell in #48
Full Changelog: 0.4.2...0.5.0
0.4.2
What's Changed
- Make IOC PV creation consistent with GUI by @GDYendell in #43
- Fix GUI PVs with no attribute path by @GDYendell in #44
Full Changelog: 0.4.0...0.4.2
0.4.0
Breaking Changes
SubController
path
is nowlist[str]
to define the controller hierarchy and joined with the appropriate separator as required- Update
path
parameter toSubController.__init__
to be a list
- Update
What's Changed
- Add serial connection by @marcelldls in #34
- Add API to set title of generated UI by @GDYendell in #36
- Allow arbitrary nesting of SubControllers by @GDYendell in #41
Full Changelog: 0.3.1...0.4.0
0.3.1
What's Changed
- Fixes button for bool AttrW by @marcelldls in #33
- Coerce controller paths to PascalCase for pvi Group names by @GDYendell in #35
New Contributors
- @marcelldls made their first contribution in #33
Full Changelog: 0.3.0...0.3.1
0.3.0
What's Changed
- Fix pre-commit linting check fail by @OCopping in #23
- Create Connections directory by @OCopping in #20
- Update minimum Python version to 3.11 by @OCopping in #22
- Adopt copier template by @GDYendell in #27
- Tweak EPICS backend record initialisation logic by @GDYendell in #29
- Update to pvi 0.8.1 by @GDYendell in #30
New Contributors
Full Changelog: 0.2...0.3.0
0.2
0.1
What's Changed
- FastCS basic features by @MJGaughran in #6
- String DataType by @GDYendell in #12
- Skeleton update by @GDYendell in #16
New Contributors
- @MJGaughran made their first contribution in #6
- @GDYendell made their first contribution in #12
Full Changelog: 0.1a4...0.1