P/init install cleanup#444
Conversation
|
Interesting - the CI virtual environment isn't picking up the right dependencies (because the "no-option" version grabs a super-minimal set that won't have full functionality). Not sure how to address this? I'd really like |
faba8a3 to
c1e3ae3
Compare
I think this is not possible, to make But that is completely fine, in my opinion. It is very reasonable to make the CI ofr example install One way to achieve something like what you are saying is to rename this package to |
This introduces sets of optional-dependencies to `pyproject.toml` that allow for reduced dependency installation. The `openlifu-test-app` project, for example, can package only the hardware-communication required dependencies by using the `[io]` option. The base application as used in Slicer should now be installed with the `[app]` option.
- Trims unnecessary parts of the project, including - legacy scripts - the io module (now covered in `openlifu-sdk`) - unused parts of Database (gridweights) - Reorganizes `virtual_fit` module into `seg` - Eliminates "eager" imports in `openlifu.__init__`, to prevent the many-seconds-long importing when accessing any submodule. - Moves importing of heavier-weight packages (which are being made optional by this branch) into the methods that call them, so that the objects can be partially-used without having those dependencies imported. Code that touches `openlifu.virtual_fit` needs to be refactored to use `openlifu.seg.virtualfit`, and code that used things like `openlifu.Transducer` will need to be changed to use `openlifu.xdc.Transducer` reorganize virtual fit and geo remove gridweights Unused enhancement Update transducer.py remove legacy scripts,
e479cbd to
444569b
Compare
2f9e682 to
1208ede
Compare
ebrahimebrahim
left a comment
There was a problem hiding this comment.
Everything looks good and we got good results from a hardware enabled test, except one remaining issue: openlifu-sdk doesn't actually support python 3.10!
To see the failure, you can try installing openlifu[io] from this branch in a Python 3.10 environment, and then try this:
import openlifu_sdkI get
ImportError: cannot import name 'timeout' from 'asyncio'
It's fine in Python 3.12.
Two options here:
- If we want to ditch Python 3.10 compatbility: Release a new openlifu-sdk version with a corrected Requires-Python. Then update the pinned version here to that, and raise the
requires-pythonhere in openlifu - If we want to keep Python 3.10: Release a new openlifu-sdk version that replaces asyncio.timeout with a python 3.10 compatible approach. Then update the pinned version here to that.
Hmmm that actually looks like it's not even accessed... I've seen copilot chuck dumb imports in while you are typing before. Can you try removing that line and seeing if it passes? Would be easy to patch to the sdk |
|
Removing this line from openlifu-sdk makes openlifu be compatible with python 3.10 Can you guys cut a patch release of openlifu-sdk that removes that line? Then we can update the pinned version here and this should be good to go |
This is a fairly major change to the project, designed to address issues #8 and #10
openlifu-sdk)virtual_fitmodule intosegopenlifu.__init__, to prevent the many-seconds-long importing when accessing any submodule.pyproject.tomlthat allow for reduced dependency installation. Theopenlifu-test-appproject, for example, can package only the hardware-communication required dependencies by using the[io]option. The base application as used in Slicer should now be installed with the[app]option.Code that touches
openlifu.virtual_fitneeds to be refactored to useopenlifu.seg.virtualfit, and code that used things likeopenlifu.Transducerwill need to be changed to useopenlifu.xdc.Transducer