ComposioHQ / composio

Composio equips agents with well-crafted tools empowering them to tackle complex tasks
https://docs.composio.dev
Other
1.3k stars 426 forks source link

Rm unused local docker workspace #243

Closed kaavee315 closed 1 week ago

kaavee315 commented 1 week ago

PR Type

Enhancement


Description


Changes walkthrough ๐Ÿ“

Relevant files
Enhancement
__init__.py
Remove unused import from __init__.py                                       

python/composio/local_tools/local_workspace/commons/__init__.py - Removed import of `WorkspaceManagerFactory`.
+0/-1     
command_runner_model.py
Remove unused Command and AgentConfig classes                       

python/composio/local_tools/local_workspace/commons/command_runner_model.py - Removed `Command` and `AgentConfig` classes.
+0/-69   
local_docker_workspace.py
Remove local_docker_workspace.py file                                       

python/composio/local_tools/local_workspace/commons/local_docker_workspace.py - Removed the entire `local_docker_workspace.py` file.
+0/-349 

๐Ÿ’ก PR-Agent usage: Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

codiumai-pr-agent-pro[bot] commented 1 week ago

PR Reviewer Guide ๐Ÿ”

โฑ๏ธ Estimated effort to review [1-5] 2
๐Ÿงช Relevant tests No
๐Ÿ”’ Security concerns No
โšก Key issues to review None
codiumai-pr-agent-pro[bot] commented 1 week ago

PR Code Suggestions โœจ

CategorySuggestion                                                                                                                                    Score
Possible issue
Verify the removal of significant classes to ensure it does not affect other parts of the application ___ **The removal of the Command and AgentConfig classes seems to be a significant change that
could potentially break functionality if these classes are used elsewhere in the codebase.
It is recommended to ensure that these classes are indeed not used anywhere else, or to
provide replacement implementations if necessary. This can be done by searching through
the codebase for any references to these classes and verifying their usage.** [python/composio/local_tools/local_workspace/commons/command_runner_model.py [16-18]](https://github.com/ComposioHQ/composio/pull/243/files#diff-7e680753af84c4d1ce93877b2b3af56dbeb3b7c3d7b93fbc40a404d4643f8bc1R16-R18) ```diff +signature: Optional[str] = None +docstring: Optional[str] = None +agent_args: Optional[Any] = None - ``` - [ ] **Apply this suggestion**
Suggestion importance[1-10]: 9 Why: The suggestion correctly identifies a potential issue with the removal of the `Command` and `AgentConfig` classes, which could break functionality if they are used elsewhere in the codebase. Ensuring these classes are not referenced elsewhere is crucial for maintaining application stability.
9
codiumai-pr-agent-pro[bot] commented 1 week ago

CI Failure Feedback ๐Ÿง

(Checks updated until commit https://github.com/ComposioHQ/composio/commit/91c3fe78dcb9dcf357e2c97ca12d601daf57d700)

**Action:** test (ubuntu-latest, 3.10)
**Failed stage:** [Unittests](https://github.com/ComposioHQ/composio/actions/runs/9744166275/job/26889259993) [โŒ]
**Failed test name:** composio/local_tools/local_workspace/tests/test_workspace.py
**Failure summary:** The action failed because the test composio/local_tools/local_workspace/tests/test_workspace.py
encountered a ModuleNotFoundError.
  • The error occurred because the module
    composio.local_tools.local_workspace.commons.local_docker_workspace could not be found.
  • This caused an import error during the collection phase of the test session.
  • Relevant error logs: ```yaml 1: ##[group]Operating System 2: Ubuntu ... 493: * [new branch] feat/slack-assistant -> origin/feat/slack-assistant 494: * [new branch] fix/readme -> origin/fix/readme 495: * [new branch] fix/readme-logo -> origin/fix/readme-logo 496: * [new branch] fix/swe-agent -> origin/fix/swe-agent 497: * [new branch] ft-add-better-help-text -> origin/ft-add-better-help-text 498: * [new branch] ft-apps-id -> origin/ft-apps-id 499: * [new branch] ft-bring-back-core-sdk -> origin/ft-bring-back-core-sdk 500: * [new branch] ft-did-you-mean -> origin/ft-did-you-mean 501: * [new branch] ft-error-tracking -> origin/ft-error-tracking ... 884: โœ” Actions updated 885: โš ๏ธ Triggers does not require update 886: unittests: commands[1]> pytest -vvv -rfE --doctest-modules composio/ tests/ --cov=composio --cov=examples --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov-config=.coveragerc 887: ============================= test session starts ============================== 888: platform linux -- Python 3.10.14, pytest-7.4.2, pluggy-1.5.0 -- /home/runner/work/composio/composio/python/.tox/unittests/bin/python 889: cachedir: .tox/unittests/.pytest_cache 890: rootdir: /home/runner/work/composio/composio/python 891: plugins: codecov-0.5.1, anyio-4.4.0, cov-5.0.0 892: collecting ... collected 44 items / 2 errors 893: ==================================== ERRORS ==================================== 894: _ ERROR collecting composio/local_tools/local_workspace/tests/test_workspace.py _ ... 909: :1006: in _find_and_load_unlocked 910: ??? 911: :688: in _load_unlocked 912: ??? 913: .tox/unittests/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:178: in exec_module 914: exec(co, module.__dict__) 915: composio/local_tools/local_workspace/tests/test_workspace.py:26: in 916: from composio.local_tools.local_workspace.commons.local_docker_workspace import ( 917: E ModuleNotFoundError: No module named 'composio.local_tools.local_workspace.commons.local_docker_workspace' 918: _ ERROR collecting composio/local_tools/local_workspace/tests/test_workspace.py _ 919: ImportError while importing test module '/home/runner/work/composio/composio/python/composio/local_tools/local_workspace/tests/test_workspace.py'. ... 932: :1006: in _find_and_load_unlocked 933: ??? 934: :688: in _load_unlocked 935: ??? 936: .tox/unittests/lib/python3.10/site-packages/_pytest/assertion/rewrite.py:178: in exec_module 937: exec(co, module.__dict__) 938: composio/local_tools/local_workspace/tests/test_workspace.py:26: in 939: from composio.local_tools.local_workspace.commons.local_docker_workspace import ( 940: E ModuleNotFoundError: No module named 'composio.local_tools.local_workspace.commons.local_docker_workspace' 941: =============================== warnings summary =============================== 942: composio/client/http.py:18 943: /home/runner/work/composio/composio/python/composio/client/http.py:18: DeprecationWarning: Inheritance class AsyncHttpClient from ClientSession is discouraged 944: class AsyncHttpClient(AsyncSession, logging.WithLogger): 945: .tox/unittests/lib/python3.10/site-packages/pydantic/_internal/_config.py:284 946: /home/runner/work/composio/composio/python/.tox/unittests/lib/python3.10/site-packages/pydantic/_internal/_config.py:284: PydanticDeprecatedSince20: Support for class-based `config` is deprecated, use ConfigDict instead. Deprecated in Pydantic V2.0 to be removed in V3.0. See Pydantic V2 Migration Guide at https://errors.pydantic.dev/2.7/migration/ ... 1077: composio/workspace/workspace_clients.py 191 153 20% 29, 34, 39-40, 43-49, 52-64, 69-96, 99-133, 140-205, 218-246, 254-260, 265-294, 304-322, 325, 339-351, 357-365, 388-416, 420-429, 436-444 1078: composio/workspace/workspace_factory.py 52 25 52% 29-34, 39-41, 49-70, 75, 78-82, 85-86, 89 1079: examples/crewai_ci_chart.py 15 15 0% 1-38 1080: -------------------------------------------------------------------------------------------------------------------- 1081: TOTAL 8398 2147 74% 1082: Coverage HTML written to dir htmlcov 1083: Coverage XML written to file coverage.xml 1084: =========================== short test summary info ============================ 1085: ERROR composio/local_tools/local_workspace/tests/test_workspace.py - ModuleNotFoundError: No module named 'composio.local_tools.local_workspace.commons.local_docker_workspace' 1086: ERROR composio/local_tools/local_workspace/tests/test_workspace.py 1087: !!!!!!!!!!!!!!!!!!! Interrupted: 2 errors during collection !!!!!!!!!!!!!!!!!!!! 1088: ======================== 2 warnings, 2 errors in 4.80s ========================= 1089: unittests: exit 2 (5.93 seconds) /home/runner/work/composio/composio/python> pytest -vvv -rfE --doctest-modules composio/ tests/ --cov=composio --cov=examples --cov-report=html --cov-report=xml --cov-report=term --cov-report=term-missing --cov-config=.coveragerc pid=5538 1090: .pkg: _exit> python /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__ 1091: unittests: FAIL code 2 (31.11=setup[20.47]+cmd[4.71,5.93] seconds) 1092: evaluation failed :( (31.42 seconds) 1093: ##[error]Process completed with exit code 2. ```

    โœจ CI feedback usage guide:
    The CI feedback tool (`/checks)` automatically triggers when a PR has a failed check. The tool analyzes the failed checks and provides several feedbacks: - Failed stage - Failed test name - Failure summary - Relevant error logs In addition to being automatically triggered, the tool can also be invoked manually by commenting on a PR: ``` /checks "https://github.com/{repo_name}/actions/runs/{run_number}/job/{job_number}" ``` where `{repo_name}` is the name of the repository, `{run_number}` is the run number of the failed check, and `{job_number}` is the job number of the failed check. #### Configuration options - `enable_auto_checks_feedback` - if set to true, the tool will automatically provide feedback when a check is failed. Default is true. - `excluded_checks_list` - a list of checks to exclude from the feedback, for example: ["check1", "check2"]. Default is an empty list. - `enable_help_text` - if set to true, the tool will provide a help message with the feedback. Default is true. - `persistent_comment` - if set to true, the tool will overwrite a previous checks comment with the new feedback. Default is true. - `final_update_message` - if `persistent_comment` is true and updating a previous checks message, the tool will also create a new message: "Persistent checks updated to latest commit". Default is true. See more information about the `checks` tool in the [docs](https://pr-agent-docs.codium.ai/tools/ci_feedback/).