Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information