tests/trading_agent/test_risk_drawdown.py imports non-existent condor.trading_agent package
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 92/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- testing-qa
Research direction
Start with tests/trading_agent/test_risk_drawdown.py and compare its imports with the current modules under condor/agents/. Run make test or uv run pytest to confirm the collection error, then verify that the test collects and passes without references to the removed condor.trading_agent package.
Written by the indexing model from the issue text.
Description
Describe the bug
Summary
Running the test suite on the current main branch fails during test collection because tests/trading_agent/test_risk_drawdown.py imports a package that no longer exists.
Environment
- Repository: hummingbot/condor
- Branch: main
- Commit: e1f6cea
- OS: Ubuntu 24.04
- Python: 3.12
- uv: latest
Steps to reproduce
git clone https://github.com/hummingbot/condor.git
cd condor
uv sync --extra dev
make test
Actual result
ImportError while importing test module tests/trading_agent/test_risk_drawdown.py
ModuleNotFoundError: No module named 'condor.trading_agent'
Investigation
The repository contains:
condor/agents/journal.py
condor/agents/performance.py
but does not contain:
condor/trading_agent/
The only remaining references to condor.trading_agent are:
git grep "condor.trading_agent"
Output:
tests/trading_agent/test_risk_drawdown.py
Current imports:
from condor.trading_agent.journal import JournalManager
from condor.trading_agent.performance import _executor_row
Changing them to:
from condor.agents.journal import JournalManager
from condor.agents.performance import _executor_row
allows pytest to continue past the collection stage.
It looks like this test was not updated after the package was renamed from condor.trading_agent to condor.agents.
Steps to reproduce
Steps to reproduce
- Clone the repository.
git clone https://github.com/hummingbot/condor.git
cd condor
git submodule update --init --recursive
git fetch --all
git pull
git checkout
- Install the project and development dependencies.
uv sync --extra dev
- Run the test suite.
make test
- Observe that pytest fails during test collection with:
ModuleNotFoundError: No module named 'condor.trading_agent'
Attach required files
make test
uv run pytest
================================================================================= test session starts ==================================================================================
platform linux -- Python 3.12.3, pytest-9.0.2, pluggy-1.6.0
rootdir: /opt/condor
configfile: pyproject.toml
plugins: anyio-4.12.1, logfire-4.31.1, asyncio-1.3.0, timeout-2.4.0
asyncio: mode=Mode.STRICT, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collected 193 items / 1 error
======================================================================================== ERRORS ========================================================================================
______________________________________________________________ ERROR collecting tests/trading_agent/test_risk_drawdown.py ______________________________________________________________
ImportError while importing test module '/opt/condor/tests/trading_agent/test_risk_drawdown.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
/usr/lib/python3.12/importlib/init.py:90: in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
tests/trading_agent/test_risk_drawdown.py:3: in
from condor.trading_agent.journal import JournalManager
E ModuleNotFoundError: No module named 'condor.trading_agent'
=============================================================================== short test summary info ================================================================================
ERROR tests/trading_agent/test_risk_drawdown.py
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Interrupted: 1 error during collection !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
=================================================================================== 1 error in 2.38s ===================================================================================
make: *** [Makefile:55: test] Error 2
It appears this test was not updated after the package was renamed from condor.trading_agent to condor.agents.
- Dominant language
- Python
- Stars
- 185
- Forks
- 97
- Avg merge
- 5d 21h
- Merged PRs (30d)
- 4
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from hummingbot/condor
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
hummingbot/condor#235 · 2 comments ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
hummingbot/condor#215 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
hummingbot/condor#201 ·
-
add Deepseek support Openenhancement
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
hummingbot/condor#128 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
hummingbot/condor#113 · 1 comment ·
All issues in hummingbot/condor
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100