Breaking Changes
- What was `Backend` has now become `Transport`. The `Backend` class has been repurposed to be the core API where the controller is combined with a transport. Module `fastcs.backends` -> `fastcs.transport`
- To update: Replace backends with transport. 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 expose the relevant config for the controller as well as any available transports as CLI arguments, or the same arguments 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()
- 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
* 55 scan tasks should be stopped cleanly when process stopped by evalott100 in https://github.com/DiamondLightSource/FastCS/pull/75
* swapped back to using `Future`s by evalott100 in https://github.com/DiamondLightSource/FastCS/pull/79
* Remove tango polling by marcelldls in https://github.com/DiamondLightSource/FastCS/pull/66
* pass ioc options to `EpicsIOC.__init__` instead of `run` by evalott100 in https://github.com/DiamondLightSource/FastCS/pull/88
* 81 add features to attributes and datatypes by evalott100 in https://github.com/DiamondLightSource/FastCS/pull/82
* Add Rest API Backend by marcelldls in https://github.com/DiamondLightSource/FastCS/pull/69
* explicitly closed fastapi test client by evalott100 in https://github.com/DiamondLightSource/FastCS/pull/92
* Refactor developer API with transports and app launcher by marcelldls in https://github.com/DiamondLightSource/FastCS/pull/67
* Ignore return type hint by marcelldls in https://github.com/DiamondLightSource/FastCS/pull/97
* Add optional version command to launcher by marcelldls in https://github.com/DiamondLightSource/FastCS/pull/96
* Change how we search for attributes by evalott100 in https://github.com/DiamondLightSource/FastCS/pull/91
* Changed from `builder.aOut` to `builder.Action` for commands by evalott100 in https://github.com/DiamondLightSource/FastCS/pull/100
* Add SimpleHandler to make minimal Attributes functional by GDYendell in https://github.com/DiamondLightSource/FastCS/pull/105
* Surpress tango test logging by marcelldls in https://github.com/DiamondLightSource/FastCS/pull/95
* Add GraphQL transport by marcelldls in https://github.com/DiamondLightSource/FastCS/pull/71
* Update to copier 2.6.0 to fix pypi publish by GDYendell in https://github.com/DiamondLightSource/FastCS/pull/107
New Contributors
* evalott100 made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/75
**Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/0.7.0...0.8.0