You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current dev branch has an intermittent circular import bug. A simple way to reproduce this bug is to run the command pytest tests\unit_tests\test_runner.py (this error doesn't occur in my local environment if all unit tests are ran at once), which then gives the output:
ImportError while importing test module 'C:\Users\gavin\OneDrive\Documents\casanovo\tests\unit_tests\test_runner.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
D:\anaconda3\envs\casanovo_env\lib\importlib\__init__.py:126: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
tests\unit_tests\test_runner.py:8: in <module>
from casanovo.config import Config
casanovo\config.py:11: in <module>
from . import utils
casanovo\utils.py:18: in <module>
from .data.ms_io import PepSpecMatch
casanovo\data\ms_io.py:15: in <module>
from ..config import Config
E ImportError: cannot import name 'Config' from partially initialized module 'casanovo.config' (most likely due to a circular import) (C:\Users\gavin\OneDrive\Documents\casanovo\casanovo\config.py)
This issue is resolved if the PepSpecMatch data class is moved to it's own file.
The text was updated successfully, but these errors were encountered:
The current
dev
branch has an intermittent circular import bug. A simple way to reproduce this bug is to run the commandpytest tests\unit_tests\test_runner.py
(this error doesn't occur in my local environment if all unit tests are ran at once), which then gives the output:This issue is resolved if the
PepSpecMatch
data class is moved to it's own file.The text was updated successfully, but these errors were encountered: