Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Small refactor to use ByTipTypeSetting/TransferProperties as the clas…
…ses to encapsulate liquid class properties in PAPI/PE. (#16689) # Overview Followup to AUTH-835 / AUTH-837. We want a nice class to bundle together `AspirateProperties`/`SingleDispenseProperties`/`MultiDispenseProperties` plus any potential future liquid class properties. For Pydantic, we already have the the `ByTipTypeSetting` model that encapsulates all the liquid class properties, so let's use that. The upcoming `loadLiquidClass()` implementation will take a `ByTipTypeSetting` as part of its parameter. For the Python dataclass, we already have `TransferProperties`, so we'll continue to use that for the Python API. This is a small refactoring change that: - Moves `TransferProperties` to live with its friends in _liquid_properties.py, which contains the definitions of the other liquid class property classes. - Implements a `build_transfer_properties()` to turn a Pydantic `ByTipTypeSetting` into a dataclass `TransferProperties`, in the same way the other `build_*` functions turn the Pydantic object into its corresponding dataclass object. ## Test Plan and Hands on Testing I ran `make test` to run all the tests under `api/`. ## Review requests This is my first time making a change to our code! Please let me know if I'm missing anything. ## Risk assessment My understanding is that liquid classes is not finished and not in production at all, so any impact should be limited to our internal dev and testing.
- Loading branch information