Skip to content

Commit

Permalink
fixed typos
Browse files Browse the repository at this point in the history
  • Loading branch information
ZohebShaikh committed Sep 20, 2024
1 parent 1007da7 commit 20a209a
Show file tree
Hide file tree
Showing 17 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion src/ophyd_async/core/_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ def config_ophyd_async_logging(
handler.close()


set_handler = config_ophyd_async_logging # for back-compat
set_handler = config_ophyd_async_logging # for back-compact
6 changes: 3 additions & 3 deletions src/ophyd_async/core/_mock_signal_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def reset_mock_put_calls(signal: Signal):

class _SetValuesIterator:
# Garbage collected by the time __del__ is called unless we put it as a
# global attrbute here.
# global attribute here.
require_all_consumed: bool = False

def __init__(
Expand All @@ -74,7 +74,7 @@ def __iter__(self):
return self

def __next__(self):
# Will propogate StopIteration
# Will propagate StopIteration
self.index, next_value = next(self.iterator)
set_mock_value(self.signal, next_value)
return next_value
Expand All @@ -85,7 +85,7 @@ def __del__(self):
# require_all_consumed=True, we can therefore assume they
# supplied a finite list.
# In the case of require_all_consumed=False, an infinite
# iterble is permitted
# iterable is permitted
values = list(self.values)
if self.index != len(values):
# Report the values consumed and the values yet to be
Expand Down
2 changes: 1 addition & 1 deletion src/ophyd_async/epics/adpilatus/_pilatus_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ async def arm(self):
self._drv
)
# The pilatus has an additional PV that goes True when the camserver
# is actually ready. Should wait for that too or we risk dropping
# is actually ready. Should wait for that too, or we risk dropping
# a frame
await wait_for_value(
self._drv.armed,
Expand Down
2 changes: 1 addition & 1 deletion src/ophyd_async/epics/signal/_aioca.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def _data_key_from_augmented_value(
value fields by DBR type.
Args:
value (AugmentedValue): Description of the the return type of a DB record
value (AugmentedValue): Description of the return type of DB record
choices: Optional list of enum choices to pass as metadata in the datakey
dtype: Optional override dtype when AugmentedValue is ambiguous, e.g. booleans
Expand Down
2 changes: 1 addition & 1 deletion src/ophyd_async/plan_stubs/_fly.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def time_resolved_fly_and_collect_with_static_seq_table(
- Declare the stream and kickoff the scan
- Collect while completing
This needs to be used in a plan that instantates detectors and a flyer,
This needs to be used in a plan that instantiates detectors and a flyer,
stages/unstages the devices, and opens and closes the run.
"""
Expand Down
2 changes: 1 addition & 1 deletion system_tests/epics/eiger/test_eiger_system.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async def test_trigger_saves_file(test_eiger: EigerDetector, setup_device: Setup
await test_eiger.stage()
await test_eiger.prepare(single_shot)
# Need to work out what the hold up is in prepare so we cant do this straight away.
# File path propogation?
# File path propagation?
await asyncio.sleep(0.5)
await setup_device.trigger.set(1)
await asyncio.sleep(0.5) # Need to work out when it's actually finished writing
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_flyer.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def flying_plan():
yield from bps.complete(detector, wait=False, group="complete")
assert flyer._trigger_logic.state == TriggerState.null

# Manually incremenet the index as if a frame was taken
# Manually increment the index as if a frame was taken
for detector in detectors:
detector.writer.index += 1

Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_log.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def test_config_ophyd_async_logging_with_file_handler(tmp_path):


def test_config_ophyd_async_logging_removes_extra_handlers():
# Protect global variable in other pytests
# Protect global variable in other pytest's
class FakeLogger:
def __init__(self):
self.handlers = []
Expand Down
4 changes: 2 additions & 2 deletions tests/core/test_mock_signal_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
async def test_mock_signal_backend(connect_mock_mode):
mock_signal = SignalRW(MockSignalBackend(datatype=str))
# If mock is false it will be handled like a normal signal, otherwise it will
# initalize a new backend from the one in the line above
# initialize a new backend from the one in the line above
await mock_signal.connect(mock=connect_mock_mode)
assert isinstance(mock_signal._backend, MockSignalBackend)

Expand Down Expand Up @@ -319,7 +319,7 @@ async def test_reset_mock_put_calls(mock_signals):
with pytest.raises(AssertionError) as exc:
get_mock_put(signal1).assert_called_with("test_value", wait=ANY, timeout=ANY)
# Replacing spaces because they change between runners
# (e.g the github actions runner has more)
# (e.g. the GitHub actions runner has more)
assert str(exc.value).replace(" ", "").replace("\n", "") == (
"expectedcallnotfound."
"Expected:put('test_value',wait=<ANY>,timeout=<ANY>)"
Expand Down
6 changes: 3 additions & 3 deletions tests/core/test_signal.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ async def test_wait_for_value_with_value():
assert 0.2 < await t < 1.0


async def test_wait_for_value_with_funcion():
async def test_wait_for_value_with_function():
signal = epics_signal_rw(float, read_pv="pva://signal", name="signal")
await signal.connect(mock=True)
set_mock_value(signal, 45.8)
Expand Down Expand Up @@ -318,15 +318,15 @@ async def test_assert_value(mock_signal: SignalRW):
await assert_value(mock_signal, 168)


async def test_assert_reaading(mock_signal: SignalRW):
async def test_assert_reading(mock_signal: SignalRW):
set_mock_value(mock_signal, 888)
dummy_reading = {
"mock_signal": Reading({"alarm_severity": 0, "timestamp": ANY, "value": 888})
}
await assert_reading(mock_signal, dummy_reading)


async def test_failed_assert_reaading(mock_signal: SignalRW):
async def test_failed_assert_reading(mock_signal: SignalRW):
set_mock_value(mock_signal, 888)
dummy_reading = {
"mock_signal": Reading({"alarm_severity": 0, "timestamp": ANY, "value": 88})
Expand Down
2 changes: 1 addition & 1 deletion tests/core/test_subset_enum.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,6 @@ async def test_runtime_enum_signal():
assert await signal_rw_ca.get_value() == "B2"

# Will accept string values even if they're not in the runtime enum
# Though type checking should compain
# Though type checking should complain
await signal_rw_pva.set("C1") # type: ignore
await signal_rw_ca.set("C2") # type: ignore
2 changes: 1 addition & 1 deletion tests/epics/adaravis/test_aravis.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async def test_can_read(test_adaravis: adaravis.AravisDetector):
assert (await test_adaravis.read()) == {}


async def test_decribe_describes_writer_dataset(
async def test_describe_describes_writer_dataset(
test_adaravis: adaravis.AravisDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_adaravis._writer.hdf.file_path_exists, True)
Expand Down
2 changes: 1 addition & 1 deletion tests/epics/advimba/test_vimba.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ async def test_can_collect(
assert stream_datum["indices"] == {"start": 0, "stop": 1}


async def test_can_decribe_collect(
async def test_can_describe_collect(
test_advimba: advimba.VimbaDetector, one_shot_trigger_info: TriggerInfo
):
set_mock_value(test_advimba._writer.hdf.file_path_exists, True)
Expand Down
2 changes: 1 addition & 1 deletion tests/epics/pvi/test_pvi.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ async def test_device_create_children_from_annotations_with_device_vectors(
block_1_device = device.device
block_2_device_vector = device.device_vector

# create_children_from_annotiations should have made DeviceVectors
# create_children_from_annotations should have made DeviceVectors
# and an optional Block, but no signals
assert hasattr(device, "device_vector")
assert not hasattr(device, "signal_rw")
Expand Down
4 changes: 2 additions & 2 deletions tests/fastcs/panda/test_hdf_panda.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def flying_plan():
yield from bps.complete(flyer, wait=False, group="complete")
yield from bps.complete(mock_hdf_panda, wait=False, group="complete")

# Manually incremenet the index as if a frame was taken
# Manually increment the index as if a frame was taken
set_mock_value(mock_hdf_panda.data.num_captured, 1)
set_mock_value(flyer.trigger_logic.seq.active, 0)

Expand Down Expand Up @@ -232,7 +232,7 @@ def flying_plan():
yield from bps.complete(flyer, wait=False, group="complete")
yield from bps.complete(mock_hdf_panda, wait=False, group="complete")

# Manually incremenet the index as if a frame was taken
# Manually increment the index as if a frame was taken
set_mock_value(mock_hdf_panda.data.num_captured, 1)
set_mock_value(flyer.trigger_logic.seq.active, 0)

Expand Down
2 changes: 1 addition & 1 deletion tests/plan_stubs/test_fly.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ def flying_plan():
for detector in detector_list:
yield from bps.complete(detector, wait=False, group="complete")

# Manually incremenet the index as if a frame was taken
# Manually increment the index as if a frame was taken
for detector in detector_list:
detector.writer.increment_index()

Expand Down
2 changes: 1 addition & 1 deletion tests/sim/test_streaming_plan.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from ophyd_async.sim.demo import PatternDetector


# NOTE the async operations with h5py are non-trival
# NOTE the async operations with h5py are non-trivial
# because of lack of native support for async operations
# see https://github.com/h5py/h5py/issues/837
async def test_streaming_plan(RE: RunEngine, sim_pattern_detector: PatternDetector):
Expand Down

0 comments on commit 20a209a

Please sign in to comment.