HPInc / HP-Digital-Microfluidics

HP Digital Microfluidics Software Platform and Libraries
MIT License
3 stars 1 forks source link

pyglider used in bilby.py needs extra files to work #188

Closed EvanKirshenbaum closed 8 months ago

EvanKirshenbaum commented 8 months ago

while running interactive.py opendrop I get an error:

ModuleNotFoundError: No module named 'pyglider' which is referring to this line.

Apparently it references this file.

When I comment bilby in interactive.py it runs without problems

Migrated from internal repository. Originally created by Mark Huber on Jul 07, 2022 at 1:24 PM PDT. Closed on Aug 08, 2022 at 12:48 PM PDT.
EvanKirshenbaum commented 8 months ago

This issue was referenced by the following commit before migration:

EvanKirshenbaum commented 8 months ago

That was trickier than I thought it would be. The solution I came up with is that for platforms like Bilby, which depend on DLLs that might not be there, you can specify the PlatformChoiceTask as a string. The PlatformChoiceExerciser tries to load the module, and if it can't it just logs a warning and ignores the platform.

So now in interactive, instead of

from devices import bilby, joey, opendrop, wombat, opentrons, manual_pipettor
...
if __name__ == '__main__':
    platforms = (
                bilby.PlatformTask,
                joey.PlatformTask,
                opendrop.PlatformTask,
                wombat.PlatformTask,
                wombat.YaminonPlatformTask,
                )
    ...~~~
you now say
~~~py
from devices import joey, opendrop, wombat, opentrons, manual_pipettor
...
if __name__ == '__main__':
    platforms = (
                "devices.bilby.PlatformTask",
                joey.PlatformTask,
                opendrop.PlatformTask,
                wombat.PlatformTask,
                wombat.YaminonPlatformTask,
                )
    ...
Migrated from internal repository. Originally created by @EvanKirshenbaum on Aug 08, 2022 at 12:48 PM PDT.