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