composio icon indicating copy to clipboard operation
composio copied to clipboard

feat: add swe example in js

Open utkarsh-dixit opened this issue 1 year ago • 3 comments

PR Type

Enhancement, Tests


Description

  • Standardized string quotes and made minor formatting adjustments in the App class.
  • Updated output text in GitRepoTree to reference a specific function.
  • Clarified the optional nature of the shell_id field in ShellRequest.
  • Added a new prompt script for a software engineer example.
  • Added functions to handle user input and validate GitHub repository and issue data.
  • Initialized a software engineer agent with required tools.
  • Added the main application script to run the software engineer agent.
  • Added a check to ensure process is defined before adding an exit handler.
  • Added lockfile for dependencies of the software engineer example.
  • Added package configuration for the software engineer example.
  • Bumped version from 0.1.7 to 0.1.8.

Changes walkthrough 📝

Relevant files
Formatting
1 files
_app.py
Standardize string quotes and formatting in `App` class. 

python/composio/client/enums/_app.py

  • Changed double quotes to single quotes in App class attributes.
  • Minor formatting adjustments.
  • +82/-86 
    Enhancement
    6 files
    git_tree.py
    Update output text to reference specific function.             

    python/composio/tools/local/shelltool/git_cmds/actions/git_tree.py

    • Updated output text to use a specific function name.
    +2/-2     
    prompts.ts
    Add software engineer example prompt script.                         

    js/examples/swe/src/prompts.ts

    • Added a new prompt script for a software engineer example.
    +122/-0 
    inputs.ts
    Add input handling and validation functions for GitHub data.

    js/examples/swe/src/agents/inputs.ts

  • Added functions to handle user input and validate GitHub repository
    and issue data.
  • +82/-0   
    agent.ts
    Initialize software engineer agent with tools.                     

    js/examples/swe/src/agents/agent.ts

  • Added initialization of a software engineer agent with required tools.

  • +48/-0   
    app.ts
    Add main application script for software engineer agent. 

    js/examples/swe/src/app.ts

    • Added main application script to run the software engineer agent.
    +28/-0   
    base.toolset.ts
    Add check for `process` definition before adding exit handler.

    js/src/sdk/base.toolset.ts

  • Added a check to ensure process is defined before adding an exit
    handler.
  • +5/-3     
    Documentation
    1 files
    exec.py
    Clarify optional nature of `shell_id` field in `ShellRequest`.

    python/composio/tools/local/shelltool/shell_exec/actions/exec.py

    • Added clarification to the description of shell_id field.
    +2/-1     
    Dependencies
    1 files
    pnpm-lock.yaml
    Add lockfile for software engineer example dependencies. 

    js/examples/swe/pnpm-lock.yaml

    • Added lockfile for dependencies of the software engineer example.
    +1228/-0
    Configuration changes
    1 files
    package.json
    Add package configuration for software engineer example. 

    js/examples/swe/package.json

    • Added package configuration for the software engineer example.
    +22/-0   
    Versioning
    1 files
    package.json
    Bump version to 0.1.8.                                                                     

    js/package.json

    • Bumped version from 0.1.7 to 0.1.8.
    +1/-1     
    Additional files (token-limit)
    1 files
    _action.py
    ...                                                                                                           

    python/composio/client/enums/_action.py

    ...

    +3787/-3764

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

    utkarsh-dixit avatar Jul 23 '24 08:07 utkarsh-dixit

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Code Redundancy
    The PR replaces double quotes with single quotes for string literals in the App class. This change does not affect functionality and could be considered unnecessary unless it aligns with a specific coding standard adopted by the team. It's important to ensure that such changes are consistent across the entire codebase to maintain readability and coding standards.

    Hardcoded Values
    The output text in the GitRepoTree class has been updated to include a specific function name (FILEEDITTOOL_OPEN_FILE). This change hardcodes the function name into the output text, which could reduce flexibility if the function name changes or if different functions need to be referenced in the future. Consider using a more dynamic approach to referencing function names.

    Clarity in Documentation
    The description for the shell_id field in the ShellRequest class has been updated to clarify that it is optional. This is a positive change for clarity in the documentation. However, ensure that all related documentation and user guides are updated to reflect this change to avoid confusion.

    Script Complexity
    The new script added for a software engineer example is quite lengthy and complex, which could make it difficult to maintain and debug. Consider breaking down the script into smaller, more manageable functions or modules, especially if the script is expected to grow or evolve.

    qodo-code-review[bot] avatar Jul 23 '24 08:07 qodo-code-review[bot]

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Best practice
    Implement a validation mechanism to check for duplicate or undefined actions

    To ensure the integrity and correctness of the enum values, consider implementing a
    validation mechanism that checks for duplicate or undefined actions during the
    initialization of the Action class.

    python/composio/client/enums/_action.py [13-15]

     class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE):
         """Class to represent `Action` entity."""
    -    APIFY_CREATE_APIFY_ACTOR: 'Action'
    +    _actions_set = set()
     
    +    def __init__(self, *args, **kwargs):
    +        super().__init__(*args, **kwargs)
    +        if self.name in self._actions_set:
    +            raise ValueError(f"Duplicate action name detected: {self.name}")
    +        self._actions_set.add(self.name)
    +
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=0 -->
    Suggestion importance[1-10]: 10

    Why: Implementing a validation mechanism ensures the integrity and correctness of enum values, preventing potential runtime errors due to duplicates.

    10
    Update the glob package to a supported version

    Update the glob package to version 9 or later to avoid using deprecated versions and
    to benefit from the latest features and bug fixes.

    js/examples/swe/pnpm-lock.yaml [239-241]

    [email protected]:
    -  resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
    -  deprecated: Glob versions prior to v9 are no longer supported
    [email protected]:
    +  resolution: {integrity: sha512-newIntegrityValueHere}
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=1 -->
    Suggestion importance[1-10]: 8

    Why: Updating to a supported version of a package is a best practice that ensures access to the latest features and fixes. The suggestion is valid and improves the codebase.

    8
    Pin dependency versions to specific current versions to avoid potential issues with automatic updates

    Consider specifying a more restrictive version range for dependencies to avoid
    potential breaking changes when new versions are released. Using caret (^) allows
    any minor version updates, which might introduce unexpected behavior.

    js/examples/swe/package.json [13-16]

    -"@langchain/anthropic": "^0.2.6",
    -"@langchain/openai": "^0.2.4",
    -"dotenv": "^16.4.5",
    +"@langchain/anthropic": "0.2.6",
    +"@langchain/openai": "0.2.4",
    +"dotenv": "16.4.5",
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=2 -->
    Suggestion importance[1-10]: 8

    Why: Pinning dependency versions can prevent unexpected behavior due to automatic updates, which is important for maintaining stability in the project.

    8
    Add type annotations to the Action class attributes

    To avoid potential runtime errors and improve code robustness, consider adding type
    annotations to the Action class attributes to explicitly define expected types.

    python/composio/client/enums/_action.py [13-15]

     class Action(_AnnotatedEnum[ActionData], path=ACTIONS_CACHE):
         """Class to represent `Action` entity."""
    -    APIFY_CREATE_APIFY_ACTOR: 'Action'
    +    APIFY_CREATE_APIFY_ACTOR: Action = None
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=3 -->
    Suggestion importance[1-10]: 7

    Why: Adding type annotations improves code robustness and clarity, but the suggestion only partially addresses the issue by annotating a single attribute.

    7
    Verify and potentially update the license to align with project or organizational standards

    The 'license' field is set to 'ISC', which is a permissive license. Ensure that this
    license choice is intentional and consistent with the licensing policies of your
    organization or personal projects, especially when integrating multiple third-party
    libraries.

    js/examples/swe/package.json [11]

    -"license": "ISC",
    +"license": "MIT",
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=4 -->
    Suggestion importance[1-10]: 5

    Why: Ensuring the correct license is important for legal and compliance reasons, but the suggestion to change from ISC to MIT without specific context may not be necessary.

    5
    Security
    Remove unsupported and problematic inflight package

    Remove the inflight package as it is not supported and leaks memory. Consider using
    lru-cache or another alternative for managing asynchronous requests.

    js/examples/swe/pnpm-lock.yaml [250-252]

    [email protected]:
    -  resolution: {integrity: sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==}
    -  deprecated: This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.
    +# '[email protected]' removed due to deprecation and memory leak issues.
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=5 -->
    Suggestion importance[1-10]: 10

    Why: Removing unsupported and problematic packages is critical for security and performance. The suggestion addresses a significant issue with the inflight package.

    10
    Maintainability
    Rename the sentinel object class to improve readability and correct the spelling

    Consider using a more concise and descriptive name for the sentinel object class to
    improve readability and maintainability. The name SentinalObject is a misspelling
    and does not convey its purpose clearly.

    python/composio/client/enums/_action.py [8-10]

    -class SentinalObject:
    -    """Sentinal object."""
    -    sentinal = None
    +class Sentinel:
    +    """Class used as a sentinel value."""
    +    value = None
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=6 -->
    Suggestion importance[1-10]: 9

    Why: The suggestion corrects a spelling mistake and improves readability by providing a more descriptive class name.

    9
    Remove the deprecated package to clean up dependencies

    Consider removing the deprecated package @types/[email protected] since dotenv provides
    its own type definitions. This will clean up the dependencies and reduce potential
    conflicts or outdated type information.

    js/examples/swe/pnpm-lock.yaml [78-80]

    -'@types/[email protected]':
    -  resolution: {integrity: sha512-ylSC9GhfRH7m1EUXBXofhgx4lUWmFeQDINW5oLuS+gxWdfUeW4zJdeVTYVkexEW+e2VUvlZR2kGnGGipAWR7kw==}
    -  deprecated: This is a stub types definition. dotenv provides its own type definitions, so you do not need this installed.
    +# '@types/[email protected]' removed as it is deprecated and unnecessary.
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=7 -->
    Suggestion importance[1-10]: 9

    Why: Removing deprecated packages is crucial for maintainability and avoiding potential conflicts. The suggestion correctly identifies and addresses this issue.

    9
    Group related actions into subclasses or separate enums for better organization

    To enhance code organization and readability, consider grouping related actions into
    subclasses or separate enums, especially for different services like ASANA, ATTIO,
    and BREVO.

    python/composio/client/enums/_action.py [32-34]

    -ASANA_CREATE_SUBTASK: 'Action'
    -ASANA_CUSTOM_FIELDS_ADDE_NUM_OPTION: 'Action'
    -ATTIO_CREATE_AN_OBJECT: 'Action'
    -BREVO_ACCOUNT_GET_USER_ACTIVITY_LOGS: 'Action'
    +class AsanaActions(Action):
    +    CREATE_SUBTASK: Action = None
    +    CUSTOM_FIELDS_ADDE_NUM_OPTION: Action = None
     
    +class AttioActions(Action):
    +    CREATE_AN_OBJECT: Action = None
    +
    +class BrevoActions(Action):
    +    ACCOUNT_GET_USER_ACTIVITY_LOGS: Action = None
    +
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=8 -->
    Suggestion importance[1-10]: 8

    Why: Grouping related actions into subclasses enhances code organization and readability, making it easier to manage and understand.

    8
    Use a variable for the tool name in the output text for easier maintenance

    Replace the hardcoded tool name in _output_text with a variable or constant to
    maintain consistency and ease future updates.

    python/composio/tools/local/shelltool/git_cmds/actions/git_tree.py [26]

    -_output_text = "Check git_repo_tree.txt for the git-repo-tree results. Use `FILEEDITTOOL_OPEN_FILE` function to check the file."
    +_output_text = f"Check git_repo_tree.txt for the git-repo-tree results. Use `{FILE_OPEN_FUNCTION}` function to check the file."
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=9 -->
    Suggestion importance[1-10]: 7

    Why: Using a variable for the tool name improves maintainability and consistency, making future updates easier.

    7
    Fill in the 'author' field to provide contact or ownership information

    The 'author' field is empty. It's a good practice to fill in the author field with
    the name of the main maintainer or the organization responsible for the package.
    This can be useful for documentation purposes and potential future queries about the
    package.

    js/examples/swe/package.json [10]

    -"author": "",
    +"author": "Your Name or Organization",
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=10 -->
    Suggestion importance[1-10]: 6

    Why: Including the author information is good for maintainability and documentation, but it is not essential for the package's functionality.

    6
    Performance
    Add a condition to skip unnecessary iterations when tags list is empty

    Add a check to ensure that the tags list is not empty before iterating over
    Action.all() to potentially reduce unnecessary iterations.

    python/composio/client/enums/_app.py [108-116]

     tags = tags or []
    -for action in Action.all():
    -    if not action.slug.lower().startswith(app):
    -        continue
    -    if len(tags) == 0:
    -        yield action
    -    if any((tag in action.tags for tag in tags)):
    -        yield action
    +if tags:
    +    for action in Action.all():
    +        if action.slug.lower().startswith(app) and any(tag in action.tags for tag in tags):
    +            yield action
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=11 -->
    Suggestion importance[1-10]: 8

    Why: This suggestion improves performance by avoiding unnecessary iterations when the tags list is empty, making the code more efficient.

    8
    Replace the enumeration of App entities with a dictionary for better performance

    Consider using a more efficient data structure for managing the App entities, such
    as a dictionary or a set, to facilitate faster lookups and operations.

    python/composio/client/enums/_app.py [11-89]

    -APIFY: 'App'
    -ASANA: 'App'
    -ATTIO: 'App'
    -...
    -ZOOM: 'App'
    +APPS = {
    +  'APIFY': 'App',
    +  'ASANA': 'App',
    +  'ATTIO': 'App',
    +  ...
    +  'ZOOM': 'App'
    +}
     
    
    Suggestion importance[1-10]: 3

    Why: While using a dictionary could improve lookup performance, the current use of class attributes is more idiomatic for enumerations in Python. The suggestion might complicate the code without significant performance benefits in this context.

    3
    Enhancement
    Update the Node.js version requirement for better compatibility and security

    Consider specifying a more recent minimum Node.js version for ansi-styles to align
    with current LTS versions, enhancing compatibility and security.

    js/examples/swe/pnpm-lock.yaml [117-119]

     [email protected]:
       resolution: {integrity: sha512-Cxwpt2SfTzTtXcfOlzGEee8O+c+MmUgGrNiBcXnuWxuFJHe6a5Hz7qwhwe5OgaSYI0IJvkLqWX1ASG+cJOkEiA==}
    -  engines: {node: '>=10'}
    +  engines: {node: '>=12'}
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=13 -->
    Suggestion importance[1-10]: 7

    Why: Updating the Node.js version requirement is a good enhancement for compatibility and security, though it is a minor improvement compared to other suggestions.

    7
    Add a meaningful description to the package.json

    It is recommended to specify a description for the package to provide clarity on its
    purpose and functionality. This can help other developers understand the intent and
    usage of the package more quickly.

    js/examples/swe/package.json [4]

    -"description": "",
    +"description": "A simple project demonstrating the integration of LangChain with Node.js",
     
    
    • [ ] Apply this suggestion <!-- /improve --apply_suggestion=14 -->
    Suggestion importance[1-10]: 7

    Why: Adding a description improves clarity and helps other developers understand the purpose of the package. However, it is not critical for the functionality of the package.

    7

    qodo-code-review[bot] avatar Jul 23 '24 08:07 qodo-code-review[bot]

    CI Failure Feedback 🧐

    (Checks updated until commit https://github.com/ComposioHQ/composio/commit/8829e70890d430f463795f625c579f099c73836b)

    Action: test (ubuntu-latest, 3.10)

    Failed stage: Unittests [❌]

    Failed test name: tests/test_tools/test_local/test_workspace.py::test_workspace

    Failure summary:

    The action failed because the test tests/test_tools/test_local/test_workspace.py::test_workspace
    encountered a KeyError.

  • The error occurred due to the missing key exit_code in the output dictionary.
  • The assertion assert output[EXIT_CODE] == 0 failed because EXIT_CODE was not found in the output
    dictionary.
  • Relevant error logs:
    1:  ##[group]Operating System
    2:  Ubuntu
    ...
    
    504:  * [new branch]        fix/rag-agent                            -> origin/fix/rag-agent
    505:  * [new branch]        fix/readme                               -> origin/fix/readme
    506:  * [new branch]        fix/readme-logo                          -> origin/fix/readme-logo
    507:  * [new branch]        fix/swe-agent                            -> origin/fix/swe-agent
    508:  * [new branch]        ft-add-better-help-text                  -> origin/ft-add-better-help-text
    509:  * [new branch]        ft-apps-id                               -> origin/ft-apps-id
    510:  * [new branch]        ft-bring-back-core-sdk                   -> origin/ft-bring-back-core-sdk
    511:  * [new branch]        ft-did-you-mean                          -> origin/ft-did-you-mean
    512:  * [new branch]        ft-error-tracking                        -> origin/ft-error-tracking
    ...
    
    932:  tests/test_cli/test_actions.py::TestListActions::test_list_all[arguments3-exptected_outputs3-unexptected_outputs3] PASSED [ 17%]
    933:  tests/test_cli/test_actions.py::TestListActions::test_tag_not_found PASSED [ 19%]
    934:  tests/test_cli/test_actions.py::TestListActions::test_limit SKIPPED      [ 21%]
    935:  tests/test_cli/test_actions.py::TestListActions::test_copy PASSED        [ 23%]
    936:  tests/test_cli/test_add.py::TestComposioAdd::test_no_auth PASSED         [ 25%]
    937:  tests/test_cli/test_apps.py::TestList::test_list PASSED                  [ 27%]
    938:  tests/test_cli/test_apps.py::TestUpdate::test_update_not_required PASSED [ 29%]
    939:  tests/test_cli/test_apps.py::TestUpdate::test_update SKIPPED (Needs
    940:  investigation, this test fails in CI)                                    [ 31%]
    ...
    
    958:  tests/test_client/test_enum.py::test_get_actions PASSED                  [ 70%]
    959:  tests/test_storage/test_base.py::test_local_storage PASSED               [ 72%]
    960:  tests/test_tools/test_schema.py::test_openai_schema PASSED               [ 74%]
    961:  tests/test_tools/test_schema.py::test_claude_schema PASSED               [ 76%]
    962:  tests/test_tools/test_toolset.py::test_find_actions_by_tags PASSED       [ 78%]
    963:  tests/test_tools/test_toolset.py::test_uninitialize_app PASSED           [ 80%]
    964:  tests/test_tools/test_local/test_workspace.py::test_outputs PASSED       [ 82%]
    965:  tests/test_tools/test_local/test_workspace.py::test_stderr PASSED        [ 85%]
    966:  tests/test_tools/test_local/test_workspace.py::test_workspace FAILED     [ 87%]
    967:  tests/test_utils/test_decorators.py::test_deprecated PASSED              [ 89%]
    968:  tests/test_utils/test_git.py::test_get_git_user_info PASSED              [ 91%]
    969:  tests/test_utils/test_shared.py::test_get_pydantic_signature_format_from_schema_params PASSED [ 93%]
    970:  tests/test_utils/test_shared.py::test_json_schema_to_pydantic_field PASSED [ 95%]
    971:  tests/test_utils/test_shared.py::test_json_schema_to_fields_dict PASSED  [ 97%]
    972:  tests/test_utils/test_url.py::test_get_web_url PASSED                    [100%]
    973:  =================================== FAILURES ===================================
    ...
    
    990:  >           _check_output(
    991:  output=toolset.execute_action(
    992:  action=Action.FILETOOL_GIT_CLONE,
    993:  params={"repo_name": "angrybayblade/web"},
    994:  )
    995:  )
    996:  tests/test_tools/test_local/test_workspace.py:110: 
    997:  _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
    998:  output = {'current_working_directory': '/home/runner/work/composio/composio/python/web', 'error': '', 'message': "On branch main\nYour branch is up to date with 'origin/main'.\n\nnothing to commit, working tree clean\n", 'success': True}
    999:  def _check_output(output: dict) -> None:
    1000:  """Check tool output."""
    1001:  >       assert output[EXIT_CODE] == 0, f"output: {output}"
    1002:  E       KeyError: 'exit_code'
    1003:  tests/test_tools/test_local/test_workspace.py:44: KeyError
    1004:  ------------------------------ Captured log call -------------------------------
    1005:  DEBUG    workspace:toolset.py:109 Trying to get github access token for self.entity_id='default'
    1006:  DEBUG    workspace:http.py:106 GET ***/v1/connectedAccounts?user_uuid=default&showActiveOnly=true - {}
    1007:  DEBUG    workspace:http.py:106 GET ***/v1/connectedAccounts/a7bd3cfd-3c80-4c80-9ef8-ff7cf1a60507 - {}
    1008:  DEBUG    workspace:toolset.py:119 Using `***` with scopes: admin:org
    1009:  DEBUG    workspace:factory.py:76 Creating workspace with config=Config(composio_api_key='***', composio_base_url='***', github_access_token='***', environment=None, persistent=False, ssh=None)
    1010:  DEBUG    workspace:workspace.py:76 Setting up SSH client for workspace 5SU5Te
    1011:  DEBUG    workspace:workspace.py:92 Setting up SSH client for workspace failed with error: No authentication methods available
    ...
    
    1020:  .tox/unittests/lib/python3.10/site-packages/paramiko/pkey.py:100
    1021:  /home/runner/work/composio/composio/python/.tox/unittests/lib/python3.10/site-packages/paramiko/pkey.py:100: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
    1022:  "cipher": algorithms.TripleDES,
    1023:  .tox/unittests/lib/python3.10/site-packages/paramiko/transport.py:259
    1024:  /home/runner/work/composio/composio/python/.tox/unittests/lib/python3.10/site-packages/paramiko/transport.py:259: CryptographyDeprecationWarning: TripleDES has been moved to cryptography.hazmat.decrepit.ciphers.algorithms.TripleDES and will be removed from this module in 48.0.0.
    1025:  "class": algorithms.TripleDES,
    1026:  .tox/unittests/lib/python3.10/site-packages/pydantic/_internal/_config.py:291
    1027:  .tox/unittests/lib/python3.10/site-packages/pydantic/_internal/_config.py:291
    1028:  /home/runner/work/composio/composio/python/.tox/unittests/lib/python3.10/site-packages/pydantic/_internal/_config.py:291: 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.8/migration/
    ...
    
    1238:  examples/Podcast_summarizer_Agents/Tools/composio_slack.py                           4      4     0%   1-5
    1239:  examples/Podcast_summarizer_Agents/__init__.py                                       0      0   100%
    1240:  examples/Podcast_summarizer_Agents/main.py                                          15     15     0%   1-21
    1241:  --------------------------------------------------------------------------------------------------------------
    1242:  TOTAL                                                                            10788   2814    74%
    1243:  Coverage HTML written to dir htmlcov
    1244:  Coverage XML written to file coverage.xml
    1245:  =========================== short test summary info ============================
    1246:  FAILED tests/test_tools/test_local/test_workspace.py::test_workspace - KeyError: 'exit_code'
    1247:  ============= 1 failed, 41 passed, 5 skipped, 5 warnings in 36.60s =============
    1248:  unittests: exit 1 (37.49 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=5603
    1249:  .pkg: _exit> python /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/pyproject_api/_backend.py True setuptools.build_meta __legacy__
    1250:  unittests: FAIL code 1 (62.90=setup[20.85]+cmd[4.56,37.49] seconds)
    1251:  evaluation failed :( (63.13 seconds)
    1252:  ##[error]Process completed with exit code 1.
    
    

    ✨ 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.

    qodo-code-review[bot] avatar Jul 23 '24 11:07 qodo-code-review[bot]