raidionics / Raidionics

Software for automatic segmentation and generation of standardized clinical reports of brain tumors from MRI volumes
https://raidionics.github.io/
BSD 2-Clause "Simplified" License
31 stars 4 forks source link

More refactoring #33

Closed andreped closed 1 year ago

andreped commented 2 years ago
andreped commented 2 years ago

Please, test if the generated binary installer work on Ubuntu, @dbouget.

If yes, you can merge and do the final refactoring (as discussed). Basically removing redundant stuff inside src/ (like images and atlases not used).

andreped commented 2 years ago

Just tested the binary installer on Windows, and it failed when running.

I believe it has to do with the relative paths. Probably you need to do something along the lines of .src.something import stuff. Or in the __init__.py add a from .src import *, and maybe then you don't need to change the files.

I would recommend merging my branch into your own more-refactoring branch, and doing the final stuff yourself, when you have the time. Otherwise, the refactoring stuff is done.

PS C:\Program Files (x86)\Raidionics> .\Raidionics.exe
Traceback (most recent call last):
  File "src\main.py", line 9, in <module>
    from src.gui2.RaidionicsMainWindow import RaidionicsMainWindow
  File "C:\Users\andrp\AppData\Local\Temp\embedded.txz301qg.zip\shibokensupport\__feature__.py", line 142, in _import
  File "PyInstaller\loader\pyimod02_importers.py", line 493, in exec_module
  File "src\gui2\RaidionicsMainWindow.py", line 15, in <module>
    from src.gui2.SinglePatientComponent.SinglePatientWidget import SinglePatientWidget
  File "C:\Users\andrp\AppData\Local\Temp\embedded.txz301qg.zip\shibokensupport\__feature__.py", line 142, in _import
  File "PyInstaller\loader\pyimod02_importers.py", line 493, in exec_module
  File "src\gui2\SinglePatientComponent\SinglePatientWidget.py", line 11, in <module>
    from src.gui2.SinglePatientComponent.CentralAreaWidget import CentralAreaWidget
  File "C:\Users\andrp\AppData\Local\Temp\embedded.txz301qg.zip\shibokensupport\__feature__.py", line 142, in _import
  File "PyInstaller\loader\pyimod02_importers.py", line 493, in exec_module
  File "src\gui2\SinglePatientComponent\CentralAreaWidget.py", line 5, in <module>
    from src.utils import SoftwareConfigResources
ImportError: cannot import name 'SoftwareConfigResources' from 'src.utils' (C:\Program Files (x86)\Raidionics\src\utils\__init__.pyc)
andreped commented 1 year ago

It has been made too many modifications since this PR was made for this to be merged, and it was also incomplete. This PR will therefore be closed and necessary edits will be made in a future PR.