aica-technology / api

AICA API resources
0 stars 0 forks source link

feat: support hardware and controller states and predicates in `wait_for_` functions #157

Closed eeberhard closed 1 month ago

eeberhard commented 2 months ago

Description

This PR solves the issue by fixing the return type of the wait_for_ functions using an explicit is not None operator.

It also adds new functions to wait for controller and hardware states and controller predicates. As part of this, the wait_for_predicate has been marked as deprecated in favor of the equivalent wait_for_component_predicate, in order to to disambiguate component and controller predicates more effectively.

Review guidelines

Estimated Time of Review: 3 minutes

Checklist before merging:

eeberhard commented 1 month ago

I will merge this and release it as a separate PR. As part of the release I want to make a note that hardware data is only available from API version 3.1 onwards. While this isn't a breaking change, I still want to capture it in the check() function and the compatibility table in the README.

I've captured that followup issue here: