Commit 37be1bf
authored
Merge pull request #102 from philipstarkey/philipstarkey/v3-refactor
This is a first pass attempt at breaking up `labscript.py` into separate files. The idea here is that, while this might not be how we ultimately want things to be split up, at this point something is better than nothing. This should provide enough of a base that other people begin to feel comfortable moving things around and/or breaking things up logically. It also introduces some conceptual boundaries between output classes and the base device classes that handle timing/clock generation. My hope is that this split will open up the possibility of actually writing tests for some of this stuff. That's probably still a long way off (with several more refactors in between) but it's a step towards that goal!
Other changes:
* More modern context managers for warning suppression that can actually be used to enable/disable warnings, not just disable.
* `config` is moved into `compiler` which means it should get reset between labscript shots and not just globally changed until you reload the compiler subprocess in runmanager.
* Some better/more consistent formatting. I didn't run `black`/`ruff` but I think we should think about it soon.
* Updated error message string formatting to use `f` strings for increased code readability
* Fixed a mistake with trigger error detection that was never raised (and also the `if` condition around the unraised error was wrong anyway)
* Fixed a minor bug in an error message for shutters (had open/close the wrong way around)
* Probably some other small changes.File tree
12 files changed
+4117
-3113
lines changed- docs/source
- api
- labscript
12 files changed
+4117
-3113
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
10 | 15 | | |
11 | 16 | | |
| 17 | + | |
| 18 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | | - | |
| 12 | + | |
13 | 13 | | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
0 commit comments