Commit b539ac0
Add DeviceManager as alternative to make_all_devices (#1549)
* Proof of concept device manager
* Use fixtures parameter instead of **kwargs
* Expand dependencies
* Pre-optional handling
* 'Working' optional dependencies
* Docs, comments and warnings
* Check for positional only arguments
* Handle connections and support new loader in cli
* Convert adsim to new loading
* Add auto_connect to device manager
* Remove references to connecting from device manager
* DeviceResult wrappers
* Demo adsim
* build_and_connect method
* Multiple manager CLI
* FIXTUEES
* Use device decorator for timeouts
* Type build_and_connect and rely on fixtures for path provider
* mostly reformatting
* Make fixture generators lazy
* Apologise for build_order method
* Return function from fixture decorator
* Add timeout parameter to build_and_connect
* Remove dead comment
* Use set in expand_dependencies to prevent repetition
* Check for duplicate factory names
* Add Ophyd v1 support
* Connect Ophyd v1 devices
* Move device_manager to new module
Instead of burying it amongst the beamlines.
* Remove test code from device_manager module
* Remove debugging and commented code
* Merge connectionspec and connectionparameters
* Add or_raise method to DeviceBuildResult
* Add docstrings
* Use or_raise to handle build errors
* Only set device name if required
* Add TODOs to remove v1 support
* Make v1 device timeout configurable
* Default to waiting for v1 device connection
* Add repr to v1 device factory
* Split DeviceBuildResult devices and connection specs
Makes access to the devices easier and makes it easier to build parameters
* Remove device_type property from factories
* Include fixture overrides in built devices
* Fix duplication in factory repr
* Add initial device_manager tests
* Revert adsim changes for now
* Enough tests to get full coverage
Maybe enough tests to cover basic use
* Create DeviceManager in fixture
* Add test for docstrings
* Reformat tests
* Linting et al
* Support single device manager name in CLI
* Ignore mock type warnings
* Appease pre-commit lints
* Add tests for device manager use in CLI
* Make 'devices' default name for device manager in CLI
* Clean up TODO comments
* Set return_value when creating mocks
* Fix typing in v1_init decorator
* Use ParamSpec when passing through __call__
* Handle or ignore var args
* Update tests
* Rename ignore skip test
* Simplify LazyFixture __getitem__
* Used UserDict as base class for LazyFixtures
* Make pyright happy
* Remove need for type ignore
---------
Co-authored-by: Robert Tuck <[email protected]>1 parent f50aaaa commit b539ac0
File tree
4 files changed
+1422
-13
lines changed- src/dodal
- tests
4 files changed
+1422
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
3 | 4 | | |
| |||
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| 13 | + | |
12 | 14 | | |
13 | 15 | | |
14 | 16 | | |
| |||
43 | 45 | | |
44 | 46 | | |
45 | 47 | | |
46 | | - | |
| 48 | + | |
| 49 | + | |
47 | 50 | | |
48 | 51 | | |
49 | 52 | | |
50 | 53 | | |
51 | 54 | | |
52 | 55 | | |
53 | 56 | | |
54 | | - | |
55 | 57 | | |
56 | 58 | | |
57 | 59 | | |
| |||
62 | 64 | | |
63 | 65 | | |
64 | 66 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
75 | 89 | | |
76 | 90 | | |
77 | 91 | | |
| |||
0 commit comments