Skip to content

Commit

Permalink
Added a wait on test_bobfiles_created
Browse files Browse the repository at this point in the history
to allow bobfiles time to be written
in the subprocess. Changed to pvi>=0.5
and python>=3.10
  • Loading branch information
evalott100 committed Aug 16, 2023
1 parent 9c88dae commit 4771eb6
Show file tree
Hide file tree
Showing 9 changed files with 55 additions and 527 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ jobs:
fail-fast: false
matrix:
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
python: ["3.9", "3.10"] # Disable 3.11 until this is fixed:https://github.com/PandABlocks/PandABlocks-client/issues/47
python: ["3.10", "3.11"]
install: ["-e .[dev]"]
# Make one version be non-editable to test both paths of version code
include:
- os: "ubuntu-latest"
python: "3.8"
python: "3.10"
install: ".[dev]"

runs-on: ${{ matrix.os }}
Expand Down
4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ name = "PandABlocks-ioc"
classifiers = [
"Development Status :: 3 - Alpha",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
Expand All @@ -20,7 +18,7 @@ dependencies = [
"h5py",
"softioc>=4.3.0",
"pandablocks>=0.3.1",
"pvi[cli]<0.5",
"pvi>=0.5",
] # Add project dependencies here, e.g. ["click", "numpy"]
dynamic = ["version"]
license.file = "LICENSE"
Expand Down
3 changes: 1 addition & 2 deletions tests/fixtures/mocked_panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
# Use the unique TEST_PREFIX to ensure this isn't a problem for future tests
TEST_PREFIX = "TEST-PREFIX-" + str(uuid4())[:4].upper()
BOBFILE_DIR = Path(__file__).parent.parent / "test-bobfiles"
TIMEOUT = 10
TIMEOUT = 1000


@pytest_asyncio.fixture
Expand Down Expand Up @@ -538,7 +538,6 @@ def mocked_panda_standard_responses(
table_fields,
) -> Generator[Tuple[Path, Connection, ResponseHandler, Queue], None, None]:
response_handler = ResponseHandler(standard_responses)
print(tmp_path)

yield from create_subprocess_ioc_and_responses(
response_handler,
Expand Down
103 changes: 10 additions & 93 deletions tests/test-bobfiles/PCAP1.bob
Original file line number Diff line number Diff line change
Expand Up @@ -2,110 +2,27 @@
<name>Display</name>
<x>0</x>
<y>0</y>
<width>426</width>
<height>202</height>
<width>10</width>
<height>35</height>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
<widget type="label" version="2.0.0">
<name>Title</name>
<class>TITLE</class>
<text>PCAP1 - TEST-PREFIX:</text>
<x use_class="true">0</x>
<y use_class="true">0</y>
<width>426</width>
<width>10</width>
<height>25</height>
<font use_class="true">
<font name="Header 1" family="Liberation Sans" style="BOLD" size="22.0">
</font>
</font>
<foreground_color use_class="true">
<color name="Text" red="0" green="0" blue="0">
</color>
</foreground_color>
<transparent use_class="true">true</transparent>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP1: LABEL</text>
<x>23</x>
<y>30</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textupdate" version="2.0.0">
<name>TextUpdate</name>
<pv_name>TEST-PREFIX:PCAP1:LABEL</pv_name>
<x>278</x>
<y>30</y>
<width>125</width>
<height>20</height>
<font>
<font name="Default Bold" family="Liberation Sans" style="BOLD" size="14.0">
</font>
</font>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>PARAMETERS</name>
<x>5</x>
<y>55</y>
<width>416</width>
<height>56</height>
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP1: TRIG_ EDGE</text>
<x>0</x>
<y>0</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="combo" version="2.0.0">
<name>ComboBox</name>
<pv_name>TEST-PREFIX:PCAP1:TRIG_EDGE</pv_name>
<x>255</x>
<y>0</y>
<width>125</width>
<height>20</height>
</widget>
</widget>
<widget type="group" version="2.0.0">
<name>INPUTS</name>
<x>5</x>
<y>116</y>
<width>416</width>
<height>81</height>
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP1: GATE</text>
<x>0</x>
<y>0</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST-PREFIX:PCAP1:GATE</pv_name>
<x>255</x>
<y>0</y>
<width>125</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PCAP1: GATE: DELAY</text>
<x>0</x>
<y>25</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST-PREFIX:PCAP1:GATE:DELAY</pv_name>
<x>255</x>
<y>25</y>
<width>125</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
</widget>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
</display>
</display>
57 changes: 10 additions & 47 deletions tests/test-bobfiles/PULSE1.bob
Original file line number Diff line number Diff line change
Expand Up @@ -2,64 +2,27 @@
<name>Display</name>
<x>0</x>
<y>0</y>
<width>426</width>
<height>116</height>
<width>10</width>
<height>35</height>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
<widget type="label" version="2.0.0">
<name>Title</name>
<class>TITLE</class>
<text>PULSE1 - TEST-PREFIX:</text>
<x use_class="true">0</x>
<y use_class="true">0</y>
<width>426</width>
<width>10</width>
<height>25</height>
<font use_class="true">
<font name="Header 1" family="Liberation Sans" style="BOLD" size="22.0">
</font>
</font>
<foreground_color use_class="true">
<color name="Text" red="0" green="0" blue="0">
</color>
</foreground_color>
<transparent use_class="true">true</transparent>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>PARAMETERS</name>
<x>5</x>
<y>30</y>
<width>416</width>
<height>81</height>
<transparent>true</transparent>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PULSE1: DELAY</text>
<x>0</x>
<y>0</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="textentry" version="3.0.0">
<name>TextEntry</name>
<pv_name>TEST-PREFIX:PULSE1:DELAY</pv_name>
<x>255</x>
<y>0</y>
<width>125</width>
<height>20</height>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="label" version="2.0.0">
<name>Label</name>
<text>PULSE1: DELAY: UNITS</text>
<x>0</x>
<y>25</y>
<width>250</width>
<height>20</height>
</widget>
<widget type="combo" version="2.0.0">
<name>ComboBox</name>
<pv_name>TEST-PREFIX:PULSE1:DELAY:UNITS</pv_name>
<x>255</x>
<y>25</y>
<width>125</width>
<height>20</height>
</widget>
</widget>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
</display>
</display>
24 changes: 10 additions & 14 deletions tests/test-bobfiles/PandA.bob
Original file line number Diff line number Diff line change
Expand Up @@ -2,31 +2,27 @@
<name>Display</name>
<x>0</x>
<y>0</y>
<width>46</width>
<height>71</height>
<width>10</width>
<height>35</height>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
<widget type="label" version="2.0.0">
<name>Title</name>
<class>TITLE</class>
<text>PandA - TEST-PREFIX:</text>
<x use_class="true">0</x>
<y use_class="true">0</y>
<width>46</width>
<width>10</width>
<height>25</height>
<font use_class="true">
<font name="Header 1" family="Liberation Sans" style="BOLD" size="22.0">
</font>
</font>
<foreground_color use_class="true">
<color name="Text" red="0" green="0" blue="0">
</color>
</foreground_color>
<transparent use_class="true">true</transparent>
<horizontal_alignment>1</horizontal_alignment>
</widget>
<widget type="group" version="2.0.0">
<name>POSITIONS_ TABLE</name>
<x>5</x>
<y>30</y>
<width>36</width>
<height>36</height>
<transparent>true</transparent>
</widget>
<grid_step_x>4</grid_step_x>
<grid_step_y>4</grid_step_y>
</display>
</display>
Loading

0 comments on commit 4771eb6

Please sign in to comment.