-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cleaned up some flake8 complaints, and moved simulated ioc pytest fix…
…tures to a separate conftest.py file.
- Loading branch information
1 parent
b8a8159
commit a5d9350
Showing
21 changed files
with
105 additions
and
253 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
[flake8] | ||
max-line-length = 88 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
from pathlib import Path | ||
import pytest | ||
|
||
from haven.simulated_ioc import simulated_ioc | ||
|
||
|
||
ioc_dir = Path(__file__).parent.resolve() / "iocs" | ||
|
||
|
||
@pytest.fixture | ||
def ioc_undulator(): | ||
with simulated_ioc(fp=ioc_dir / "undulator.py") as pvdb: | ||
yield pvdb | ||
|
||
|
||
@pytest.fixture | ||
def ioc_mono(): | ||
with simulated_ioc(fp=ioc_dir / "mono.py") as pvdb: | ||
yield pvdb | ||
|
||
|
||
@pytest.fixture | ||
def ioc_scaler(): | ||
with simulated_ioc(fp=ioc_dir / "scaler.py") as pvdb: | ||
yield pvdb | ||
|
||
|
||
@pytest.fixture | ||
def ioc_motor(): | ||
with simulated_ioc(fp=ioc_dir / "motor.py") as pvdb: | ||
yield pvdb | ||
|
||
|
||
@pytest.fixture | ||
def ioc_preamp(): | ||
with simulated_ioc(fp=ioc_dir / "preamp.py") as pvdb: | ||
yield pvdb | ||
|
||
|
||
@pytest.fixture | ||
def ioc_simple(): | ||
with simulated_ioc(fp=ioc_dir / "simple.py") as pvdb: | ||
yield pvdb | ||
|
||
|
||
@pytest.fixture | ||
def ioc_vortex(): | ||
with simulated_ioc(fp=ioc_dir / "vortex.py") as pvdb: | ||
yield pvdb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,24 @@ | ||
#!/usr/bin/env python3 | ||
from textwrap import dedent | ||
|
||
from caproto.server import ( | ||
pvproperty, | ||
run, | ||
PvpropertyDouble, | ||
) | ||
|
||
from haven.simulated_ioc import ResponsiveMotorFields, ioc_arg_parser, IOC as IOC_ | ||
from haven.simulated_ioc import IOC as IOC_ | ||
|
||
|
||
class IOC(IOC_): | ||
"""An IOC mimicing a scaler connected to a VME crate.""" | ||
|
||
S2 = pvproperty(name=".S2", value=21000000, doc="It") | ||
CNT = pvproperty(name=".CNT", value=1) | ||
TP = pvproperty(name=".TP", value=1.) | ||
TP = pvproperty(name=".TP", value=1.0) | ||
calc2 = pvproperty(name="_calc2.VAL", value=2.35) | ||
|
||
default_prefix = "vme_crate_ioc" | ||
|
||
|
||
if __name__ == '__main__': | ||
if __name__ == "__main__": | ||
pvdb, run_options = IOC.parse_args() | ||
run(pvdb, **run_options) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.