ssec-jhu / evolver-ng

Next gen eVolver controller for bioreactor project - wip
BSD 3-Clause "New" or "Revised" License
3 stars 0 forks source link

pump and stir #100

Closed amitschang closed 4 weeks ago

amitschang commented 1 month ago

Implement stirrer and pumps.

In the case of stirrer this might not be correct in the case of calibration in that with calibration we might represent rate as RPM, but from the looks of their example experiment code the stirring is practically just used as some rate. Should be straightforward to update since this is a pretty simple effector.

For the pumps, the approach is to model a generic pump that is operates external to vials and indexes on pump number (48 of them), and supports a combination of standard and IPP pumps (these operate in different ways, but communicate to same underlying chip https://github.com/FYNCH-BIO/evolver-arduino/blob/master/SAMD21/RS485_FLUIDICS/RS485_FLUIDICS.ino), and then on top of this implement a per-vial influx/efflux setup that uses a generic device as a slave. A slave device rather than subclass is used due to different input types and mapping (2-to-1) for the vial driver.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 97.56098% with 2 lines in your changes missing coverage. Please review.

Project coverage is 95.92%. Comparing base (4a4cac0) to head (fa21f15).

Files Patch % Lines
evolver/hardware/standard/pump.py 96.66% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #100 +/- ## ========================================== + Coverage 95.72% 95.92% +0.19% ========================================== Files 18 20 +2 Lines 679 761 +82 ========================================== + Hits 650 730 +80 - Misses 29 31 +2 ``` | [Flag](https://app.codecov.io/gh/ssec-jhu/evolver-ng/pull/100/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssec-jhu) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/ssec-jhu/evolver-ng/pull/100/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssec-jhu) | `95.92% <97.56%> (+0.19%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=ssec-jhu#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jamienoss commented 4 weeks ago

@amitschang Thanks for the update, but it looks like the same issue is true for some of the parent classes.

Take a look at #104, please. I think it would be good to address that first to ensure that this PR is working as expected.

amitschang commented 4 weeks ago

This PR I think is working as expected, even if some of that should to be refactored, so seems simpler to me to merge this in and then changes affecting the Config inheritence can work across the board on mainline.