Skip to content

Releases: DiamondLightSource/FastCS

0.8.0

19 Dec 11:27
Compare
Choose a tag to compare

Breaking Changes

  • Specific interfaces (e.g. EPICS, Tango) now inherit a new TransportAdapter class and Backend has been repurposed as the internal logic where a controller is combined with a transport. Module fastcs.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 where Mapping was used previously.

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 on SubController. If set, this attribute will be added to the parent controller to represent the state of the SubController overall.
  • BaseController.attributes dict that can be used in preference to setattr(...) 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 to None (now the default) then the update 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

New Contributors

Full Changelog: 0.7.0...0.8.0

0.7.0

14 Oct 15:41
bdab4fa
Compare
Choose a tag to compare

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

19 Aug 11:02
8e04689
Compare
Choose a tag to compare

Breaking Changes

  • Backend now takes a Controller as the first argument instead of a Mapping
  • Backend now has a run method that should be implemented by all child classes
  • EpicsBackend.get_ioc removed, call run directly instead
  • TangoBackend.get_dsr removed, call run 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

26 Jul 16:52
178eb0a
Compare
Choose a tag to compare

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 SubControllers 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

Full Changelog: 0.4.2...0.5.0

0.4.2

18 Jun 13:18
e5b86c4
Compare
Choose a tag to compare

What's Changed

Full Changelog: 0.4.0...0.4.2

0.4.0

14 Jun 11:47
fc7401f
Compare
Choose a tag to compare

Breaking Changes

  • SubController path is now list[str] to define the controller hierarchy and joined with the appropriate separator as required
    • Update path parameter to SubController.__init__ to be a list

What's Changed

Full Changelog: 0.3.1...0.4.0

0.3.1

16 May 10:30
1ea3e53
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.3.0...0.3.1

0.3.0

11 Apr 14:22
f88f4d3
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.2...0.3.0

0.2

25 Jan 15:03
bf41c16
Compare
Choose a tag to compare
0.2

What's Changed

  • Implement grouping of Attributes on generated UIs by @GDYendell in #19

Full Changelog: 0.1...0.2

0.1

16 Jan 16:19
497316c
Compare
Choose a tag to compare
0.1

What's Changed

New Contributors

Full Changelog: 0.1a4...0.1