Skip to content

feat: add tool level documentation #1499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 29 commits into from
Mar 27, 2025
Merged

feat: add tool level documentation #1499

merged 29 commits into from
Mar 27, 2025

Conversation

alt-glitch
Copy link
Collaborator

No description provided.

alt-glitch and others added 19 commits March 20, 2025 20:55
…and update Python SDK guide for synchronous execution
- Introduced a new Makefile for generating API documentation and running the documentation server.
- Added a Python script for generating API documentation from the Composio SDK.
- Updated the .gitignore to exclude specific SDK paths.
- Enhanced GitHub workflows to set up Python and install dependencies for documentation generation.
- Reorganized SDK structure by moving generated documentation to a new path.
- Removed outdated JavaScript client reference documentation.
- Added new sections to the documentation configuration for better organization.
… scripts

- Added handling for CI environment paths in get_clean_file_path to improve path resolution in GitHub Actions.
- Enhanced error logging in get_clean_file_path and parse_function to provide clearer debugging information.
- Improved logic for determining file paths in parse_function when file_path is None.
- Updated GitHub workflows to include steps for generating Python and TypeScript SDK documentation.
- Added Bun setup and TypeDoc installation for TypeScript documentation generation.
- Improved organization of documentation sections in fern/docs.yml for better clarity and navigation.
- Refined code block formatting in custom-auth.mdx and processing-tools.mdx for improved readability.
- Modified the .gitignore to exclude the specific SDK path 'fern/sdk/composio/python/'.
- Updated TypeScript documentation generation paths in GitHub workflows to reflect the new directory structure.
- Added "fileExtension" property to typedoc.json to specify .mdx files for documentation generation.
- Removed hidden documentation entry from fern/docs.yml for improved navigation clarity.
- Simplified the logic for normalizing file paths in the get_clean_file_path function.
- Enhanced error handling and reduced complexity by using Path object methods.
- Updated GitHub Actions workflow to remove unnecessary whitespace.
- Added error handling and logging for module imports in get_module_from_file to improve debugging.
- Introduced a fallback mechanism to create a mock module if the import fails, ensuring functionality without requiring the package to be installed.
- Updated GitHub Actions workflow to remove unnecessary whitespace for cleaner configuration.
- Corrected links in various documentation files to point to the appropriate sections, ensuring accurate navigation.
- Updated references to authentication and tool-calling concepts for consistency across the documentation.
- Improved clarity in installation and framework sections by refining links to relevant resources.
- Added new tool documentation generation scripts and integrated them into the workflows.
- Updated the Python SDK documentation generation process to use the new structure.
- Enhanced GitHub Actions workflows for previewing and publishing documentation, including installation of dependencies and improved paths.
- Removed deprecated scripts and files related to previous documentation generation methods.
- Updated .gitignore to exclude new tool directories and unnecessary files.
Copy link

⚠️ Trial Period Expired ⚠️

Your trial period has expired. To continue using this feature, please upgrade to a paid plan. You can upgrade your account here - https://entelligence.ai/manage/billing

Copy link

vercel bot commented Mar 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
composio ✅ Ready (Inspect) Visit Preview 💬 Add feedback Mar 27, 2025 6:48am



- name: Install Python Dependencies
run: uv sync

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change from uv pip install -e . to uv sync may break the workflow as it doesn't install the package in development mode, which is likely needed for the documentation generation.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
run: uv sync
run: uv pip install -e .


# For tracking generated tools
self.generated_tools = []
self.problematic_actions = [

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding docstrings to explain why these actions are problematic and need to be filtered out. This will help future maintainers understand the reasoning behind excluding these specific actions.

import multiprocessing

# Use CPU count as default but cap at 10 to avoid connection pool issues
max_workers = min(10, multiprocessing.cpu_count())

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a configurable max_workers limit as a class attribute or environment variable. Currently hardcoded to 10 which may not be optimal for all environments.

content = re.sub(r'<ul\s*-', r'<ul><li>', content)

# Fix nested backticks that may be causing issues
if content.count('`') > 2:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The backtick handling logic could be improved. Consider using a more robust approach to handle nested backticks, perhaps with a stack-based parser, as the current regex replacement may not handle all edge cases correctly.

content.add_frontmatter(titleize(app.name))

# Handle auth schemes safely
auth_schemes = None

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding retry logic with exponential backoff for auth scheme fetching. This would make the code more resilient to temporary network issues or API rate limits.

@shreysingla-bot
Copy link

Code Review Summary

Overall, the changes represent a significant improvement to the documentation generation system, with good attention to error handling and MDX formatting. However, there are a few areas that could be improved:

Strengths:

  • Well-structured documentation generation pipeline
  • Good error handling and logging
  • Parallel processing for improved performance
  • Comprehensive MDX sanitization and formatting

Areas for Improvement:

  1. Documentation of problematic actions needs explanation
  2. Some hardcoded values could be made configurable
  3. Backtick handling in MDX formatting could be more robust
  4. Auth scheme fetching could benefit from retry logic

Rating: 8/10

The code is production-ready but would benefit from the suggested improvements for better maintainability and reliability.

Copy link

LGTM 👍

Copy link

LGTM 👍

Copy link

LGTM 👍

Comment on lines 29 to 31
run: |
uv sync
composio apps generate-types

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The composio apps generate-types command is added without ensuring the composio CLI is installed, which will cause the workflow to fail if the command is not available.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
run: |
uv sync
composio apps generate-types
run: |
uv sync
pip install composio-cli
composio apps generate-types

Comment on lines 28 to 30
run: |
uv sync
composio apps generate-types

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multi-line command is missing proper indentation after the pipe symbol (|). This will cause a YAML syntax error when the workflow runs.

📝 Committable Code Suggestion

‼️ Ensure you review the code suggestion before committing it to the branch. Make sure it replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
run: |
uv sync
composio apps generate-types
run: |
uv sync
composio apps generate-types

Copy link

LGTM 👍

Copy link

LGTM 👍

Copy link

LGTM 👍

Copy link

LGTM 👍

Copy link
Contributor

@alt-glitch alt-glitch merged commit 5244a0b into master Mar 27, 2025
8 of 12 checks passed
@alt-glitch alt-glitch deleted the sid/patch-docs-2 branch March 27, 2025 06:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants