statisticalbiotechnology / triqler

The triqler (TRansparent Identification-Quantification-linked Error Rates)'s source and example code
Apache License 2.0
19 stars 9 forks source link

The package triqler.distribution is broken #19

Closed fabianegli closed 1 year ago

fabianegli commented 1 year ago

The package "triqler.distribution" defined in setup.py is broken.

python -m triqler.distribution
Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 197, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/runpy.py", line 87, in _run_code
    exec(code, run_globals)
  File "/Users/eglif/github/fabianegli/triqler/triqler/distribution/__main__.py", line 6, in <module>
    from .distribution import main
ModuleNotFoundError: No module named 'triqler.distribution.distribution'
MatthewThe commented 1 year ago

Thank you for reporting this issue.

triqler.distribution itself cannot be run as a standalone module.

You should be able to run its submodules though, e.g.

python -m triqler.distribution.plot_hyperparameter_fits <triqler_input_file>

https://github.com/statisticalbiotechnology/triqler/wiki/Hyperparameters

fabianegli commented 1 year ago

If that is so, there should be no file triqler/triqler/distribution/__main__.py at all and the packages in setup.py should point to the actual runnable packages:

https://github.com/statisticalbiotechnology/triqler/blob/e91f3589caba3bce095412fe2df2f2c6863a4d7f/setup.py#L32

So "triqler.distribution" should be removed and "triqler.distribution.plot_hyperparameter_fits" added to make the package reflect the intended use.

MatthewThe commented 1 year ago

Yes, you're right. I will fix it.

MatthewThe commented 1 year ago

Fixed by 4cd5ae5 and 8744e2a