Skip to content

fix: fixes CLI docs import order#646

Merged
garrett4wade merged 1 commit intomainfrom
rchardx/docs
Nov 28, 2025
Merged

fix: fixes CLI docs import order#646
garrett4wade merged 1 commit intomainfrom
rchardx/docs

Conversation

@rchardx
Copy link
Collaborator

@rchardx rchardx commented Nov 28, 2025

Description

Ensures the CLI args module imports only after the project root is added to sys.path so the docs generator keeps resolving project code reliably while silencing the linter warning.

Related Issue

Fixes #645

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not
    work as expected)
  • Documentation update
  • Code refactoring (no functional changes)
  • Performance improvement
  • Test coverage improvement

Checklist

  • I have read the Contributing Guide
  • I have run formatting tools (pre-commit or manual)
  • I have run relevant unit tests and they pass
  • I have added tests for new functionality
  • I have updated documentation if needed
  • My branch is up to date with main
  • This PR introduces breaking changes (if yes, fill out details below)
  • If this PR changes documentation, I have built and previewed it locally with
    jb build docs
  • No critical issues raised by AI reviewers (/gemini review)

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @rchardx, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a bug in the documentation generation script (generate_cli_docs.py) where an import statement was executed before the necessary project root was added to the system path, leading to import errors. By reordering this import, the documentation generator can now reliably resolve project code. Additionally, the CLI reference documentation has been updated to reflect newly introduced LoRA-related parameters, ensuring the documentation is current with the latest features.

Highlights

  • Docs Generator Fix: Corrected the import order in generate_cli_docs.py to ensure areal.api.cli_args is imported only after the project root is added to sys.path, resolving issues with resolving project code.
  • Linter Warning Silenced: Added a noqa: E402 comment to the reordered import statement in generate_cli_docs.py to silence the linter warning about imports not being at the top of the file.
  • LoRA Parameter Documentation: Updated cli_reference.md to include new parameters related to LoRA functionality, such as lora_name, use_lora, enable_lora, and lora_modules.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Ensures the CLI args module imports only after the project root is added to sys.path so the docs generator keeps resolving project code reliably while silencing the linter warning.
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request fixes an import issue in the documentation generation script docs/generate_cli_docs.py by moving the import of areal.api.cli_args after modifying sys.path. This change is correct and resolves the issue. The PR also updates the generated documentation docs/cli_reference.md to include new LoRA-related configurations. I've added a couple of suggestions to improve the clarity and completeness of the new documentation. Also, note that this PR is marked as a 'Bug fix', but it also introduces new configurations, which is closer to a feature. It would be great to update the PR description to reflect this.

@garrett4wade garrett4wade merged commit 8b54f78 into main Nov 28, 2025
1 check passed
@garrett4wade garrett4wade deleted the rchardx/docs branch November 28, 2025 12:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes an import ordering issue in the CLI documentation generator to ensure proper module resolution. The cli_args module import is moved after the project root is added to sys.path, preventing import failures while addressing linter warnings with a noqa comment.

Key changes:

  • Reordered imports in docs/generate_cli_docs.py to resolve the project path before importing project modules
  • Added noqa: E402 comment to suppress linter warning about module-level import position

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
docs/generate_cli_docs.py Moved cli_args_module import after sys.path modification to ensure proper module resolution
docs/cli_reference.md Documentation updates reflecting new CLI configuration options (lora_name, use_lora, enable_lora, lora_modules)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Bruce-rl-hw pushed a commit to Bruce-rl-hw/AReaL-vllm that referenced this pull request Dec 4, 2025
Ensures the CLI args module imports only after the project root is added to sys.path so the docs generator keeps resolving project code reliably while silencing the linter warning.
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.

[BUG] CLI docs generator import order causes module resolution failure

3 participants