版本发布 8
## Summary - `Updater`, `Sender` and `Handler` have been replaced with `AttributeIO` and `AttributeIORef` - This removes the circular dependency of `Controller` -> `Attribute` -> `Handler` -> `Controller` and simplifies the API for writing drivers - `TransportOptions` and `TransportAdapter` merged into `Transport`. Transports are now constructed with options and passed into `FastCS` directly - `Backend` merged into `FastCS` - `SubController`s have been removed. There is now no special handling required for controllers that will be registered as sub controllers - `Controller` can be registered as a sub controller. - `Controllers` are now attributes of a parent `Controller` and can be registered and accessed with the dot accessor - `@put` methods have been removed - New `Controller.disconnect` hook added to allow clean up just before the application stops - New logging and tracing frameworks - Use `fastcs.logging.logger` for debug, info, warning, error with nice formatting - Call `fastcs.logging.configure_logging` to enable logging (default level info) - Use `Tracer` for trace level logging that can be configured on the console at runtime per object (e.g. `attr.enable_tracing()`). Some classes (Attribute, AttributeIO, Controller) inherit this, so they have `self.log_event` for trace messages. For other cases inherit `Tracer` or add a module level `Tracer` - Call `fastcs.logging.configure_logging(LogLevel.TRACE)` so that enabled trace logging is displayed - `Attribute(description=)` will now be passed to pvi to use as the label hover text - `ControllerVector` added to represent a set of sub controllers distinguished by and index. e.g. Odin: N FrameProcessors or PandA: N CALC blocks. - Type hints on controller classes are now validated at runtime to check they have been populated - Simplified module structure - Many other fixes and improvements ## Breaking Changes - Packaging - Update fastcs requirement to include the desired transports, e.g. `fastcs[epicsca]` - Handlers - Split classes inheriting `Updater` / `Sender` / `Handler` into `AttributeIORef` with the static properties and `AttributeIO` with `update` and `send` (previously `put`) methods - Remove `initialise` method - Update `Controller` to create instances of the `AttributeIO`s required by its attributes. Pass down to any sub controllers that also need them. The connection used by the IO can be passed in at this point (or anything else required) to use in `update` and `send` instead of being passed the whole controller - Update created attributes to take `io_ref=MyAttributeIORef()` instead of `handler/sender/updater=MyHandler()` - Attributes - Remove `SimpleHandler()` from attributes - this is now the default behavior if an attribute is not passed `io_ref` - Change `attr.set ->` `attr.update` - Change `attr.process` -> `attr.put(sync_setpoint=True)` - Change `attr.process_without_display_update` -> `attr.put` - Change `attr.update_display_without_process` -> `attr.put` - Change `attr.add_on_set_callback` -> `attr.add_on_update_callback` - Change `attr.add_write_display_callback` -> `attr.add_sync_setpoint_callback` - Change `attr.add_process_callback` -> `attr.add_on_put_callback` - Transport - Update to pass (e.g.) `EpicsCATransport` instead of `EpicsTransportOptions`, with the same arguments, to FastCS - Remove calls to `create_docs` and `create_gui`. If options for these are provided then these methods will be called automatically - SubController - Update any classes inheriting `SubController` to inherit `Controller` - Change `register_sub_controller` -> `add_sub_controller` or assignment with the dot accessor (`self.<sub_controller_name> = <sub_controller>`) - Controller - Attempting to overwrite an `Attribute` now raises a `RuntimeError`, even if the type and access mode match. To statically type hint an `Attribute` to be validated during initialisation, only specify the type hint on the class - do not create a default instance, e.g. `attr: AttrRW[int]`, not `attr = AttrRW(Int())`. - `Controller.attributes` is now a read-only view. Use `Controller.add_attribute("<attr_name>", <attr>)` or direct assignment (`controller.<attr_name> = <attr>`) to create `Attributes`, which will perform validation and attach them to the controller to use in the interactive shell. - Imports - `from fastcs.attribute_io` -> `from fastcs.attributes` - `from fastcs.attribute_io_ref` -> `from fastcs.attributes` - `from fastcs.controller` -> `from fastcs.controllers` - `from fastcs.cs_methods` -> `from fastcs.methods` - `from fastcs.transport` -> `from fastcs.transports` - `from fastcs.wrappers` -> `from fastcs.methods` - `from fastcs.attributes import ONCE` -> `from fastcs.util import ONCE` - `fastcs.transport.epics.options import EpicsGUIOptions, EpicsIOCOptions` -> `from fastcs.transports.epics import EpicsGUIOptions, EpicsIOCOptions` - `from fastcs.transport.epics.ca.transport import EpicsCATransport` -> `from fastcs.transports.epics.ca import EpicsCATransport` - Rename `from fastcs.datatypes import T` -> `from fastcs.datatypes import DType_T` ## What's Changed * Merge TransportAdapter and TransportOptions by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/220 * Add transport extras by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/221 * Update transport model creation for new class structure by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/223 * Remove `SubController` by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/222 * Replace Handler with AttributeIO / AttributeIORef by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/218 * Removes Backend class and moves logic and free functions to Launch fi… by @gkalua in https://github.com/DiamondLightSource/FastCS/pull/225 * Add logging framework and Tracer by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/224 * Fix Transport imports by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/227 * Fix softioc system test by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/229 * Fix docs build by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/231 * Update tutorials by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/234 * Improve Controller Attribute and sub controller creation with __setattr__ by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/235 * Redesign attribute callbacks by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/237 * Split launch.py into control_system.py and controller_api.py by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/240 * Remove Put methods by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/241 * Controller disconnect by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/243 * Tidying by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/233 * Update construction of DbDevInfo by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/249 * Tidying by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/250 * Remove helm charts by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/251 * fastcs-odin developments by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/258 * Pass bool record *NAM fields for Bool() Attributes by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/261 * Implement SubControllerVector by @shihab-dls in https://github.com/DiamondLightSource/FastCS/pull/192 * Make sure initial values are respected in CA transport by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/257 * Fix EpicsCATransport to pass length with initial_value for string records by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/262 * Match Transport keys to toolnames by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/263 * Remove EpicsCAOptions class by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/264 * validate hinted attributes on subcontrollers by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/209 * Add timeouts to tests by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/266 * Fix warnings in tests by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/267 * Hinted attribute validation by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/268 * Add logging to tutorial by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/269 * Increase docs snippet test timeout by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/270 * Fix alarm status on Command PVs by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/265 * Do not error when rendering edl files by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/271 * Logging fixes by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/273 * Move PvaEpicsGUI to pva/gui.py by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/274 * Improve module structure by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/275 ## New Contributors * @hyperrealist made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/220 * @gkalua made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/225 **Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/0.10.1...0.11.0
## What's Changed * Merge TransportAdapter and TransportOptions by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/220 * Add transport extras by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/221 * Update transport model creation for new class structure by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/223 * Remove `SubController` by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/222 * Replace Handler with AttributeIO / AttributeIORef by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/218 * Removes Backend class and moves logic and free functions to Launch fi… by @gkalua in https://github.com/DiamondLightSource/FastCS/pull/225 * Add logging framework and Tracer by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/224 * Fix Transport imports by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/227 * Fix softioc system test by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/229 * Fix docs build by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/231 * Update tutorials by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/234 * Improve Controller Attribute and sub controller creation with __setattr__ by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/235 * Redesign attribute callbacks by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/237 * Split launch.py into control_system.py and controller_api.py by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/240 * Remove Put methods by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/241 * Controller disconnect by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/243 * Tidying by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/233 * Update construction of DbDevInfo by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/249 * Tidying by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/250 * Remove helm charts by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/251 ## New Contributors * @hyperrealist made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/220 * @gkalua made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/225 **Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/0.10.1...0.11.0a1
## What's Changed * Merge TransportAdapter and TransportOptions by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/220 * Add transport extras by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/221 * Update transport model creation for new class structure by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/223 * Remove `SubController` by @hyperrealist in https://github.com/DiamondLightSource/FastCS/pull/222 * Replace Handler with AttributeIO / AttributeIORef by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/218 * Removes Backend class and moves logic and free functions to Launch fi… by @gkalua in https://github.com/DiamondLightSource/FastCS/pull/225 * Add logging framework and Tracer by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/224 * Fix Transport imports by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/227 * Fix softioc system test by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/229 * Fix docs build by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/231 * Update tutorials by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/234 * Improve Controller Attribute and sub controller creation with __setattr__ by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/235 * Redesign attribute callbacks by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/237 * Split launch.py into control_system.py and controller_api.py by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/240 * Remove Put methods by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/241 * Controller disconnect by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/243 * Tidying by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/233 ## New Contributors * @hyperrealist made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/220 * @gkalua made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/225 **Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/0.10.1...0.11.0a1
**Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/1.10.2-beta.5...1.10.2-beta.6
**Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/1.10.2-beta.4...1.10.2-beta.5
**Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/1.10.2-beta.3...1.10.2-beta.4
**Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/1.10.2-beta.1...1.10.2-beta.3
## What's Changed * Add setuptools to dev requirements for aioca by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/180 * Update DataType.validate to attempt cast by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/182 * Do not propagate DRVL and DRVH to in type records in CA transport by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/185 * Use SimpleHandler on AttrRW only by @shihab-dls in https://github.com/DiamondLightSource/FastCS/pull/186 * Add API to update attributes once when Backend.serve() called by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/188 * assert hinted attrs are bound and have right dtype after initialisation by @jsouter in https://github.com/DiamondLightSource/FastCS/pull/187 * Add generic interactive shell by @shihab-dls in https://github.com/DiamondLightSource/FastCS/pull/189 * Add softioc functions to ca context by @shihab-dls in https://github.com/DiamondLightSource/FastCS/pull/191 * Log exception in scan and command methods by @shihab-dls in https://github.com/DiamondLightSource/FastCS/pull/162 * Add Helm Chart with debug capabilities and values schema generation using https://github.com/losisin/helm-values-schema-json by @gilesknap in https://github.com/DiamondLightSource/FastCS/pull/200 * Fix helm tag check to allow non-beta tags by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/203 * Fix quotes in helm check by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/204 * Update to pvi 0.11.0 by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/205 * Adopt copier 4.2.0 by @GDYendell in https://github.com/DiamondLightSource/FastCS/pull/206 ## New Contributors * @gilesknap made their first contribution in https://github.com/DiamondLightSource/FastCS/pull/200 **Full Changelog**: https://github.com/DiamondLightSource/FastCS/compare/0.9.1...0.10.0