-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Conversation
…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.
…o sid/patch-docs-2
… 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.
…o sid/patch-docs-2
- 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.
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 |
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
.github/workflows/publish_docs.yml
Outdated
|
||
|
||
- name: Install Python Dependencies | ||
run: uv sync |
There was a problem hiding this comment.
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.
run: uv sync | |
run: uv pip install -e . |
|
||
# For tracking generated tools | ||
self.generated_tools = [] | ||
self.problematic_actions = [ |
There was a problem hiding this comment.
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()) |
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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.
Code Review SummaryOverall, 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:
Areas for Improvement:
Rating: 8/10The code is production-ready but would benefit from the suggested improvements for better maintainability and reliability. |
LGTM 👍 |
LGTM 👍 |
LGTM 👍 |
.github/workflows/preview_docs.yml
Outdated
run: | | ||
uv sync | ||
composio apps generate-types |
There was a problem hiding this comment.
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.
run: | | |
uv sync | |
composio apps generate-types | |
run: | | |
uv sync | |
pip install composio-cli | |
composio apps generate-types |
.github/workflows/publish_docs.yml
Outdated
run: | | ||
uv sync | ||
composio apps generate-types |
There was a problem hiding this comment.
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.
run: | | |
uv sync | |
composio apps generate-types | |
run: | | |
uv sync | |
composio apps generate-types |
LGTM 👍 |
LGTM 👍 |
LGTM 👍 |
LGTM 👍 |
🌿 Preview your docs: https://composio-preview-3ad3c2ff-ac00-4d46-8682-c908e54f4b8e.docs.buildwithfern.com |
No description provided.