Skip to content

Conversation

@xwhzz
Copy link
Contributor

@xwhzz xwhzz commented Jul 24, 2025

No description provided.

@github-actions
Copy link

👋 Hi! Thank you for contributing to the TileLang project.

Please remember to run bash format.sh in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.

We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work!

🚀

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.

Summary of Changes

Hello @xwhzz, 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 significantly refactors the project's documentation build system by transitioning from a manual sphinx-apidoc setup to an automated sphinx-autoapi workflow for generating Python API documentation. The changes aim to simplify the documentation process, improve maintainability, and ensure more comprehensive API coverage.

Highlights

  • Documentation Tooling Migration: The core change involves migrating the Python API documentation generation from the traditional sphinx-apidoc approach to using the sphinx-autoapi extension. This streamlines the process by allowing autoapi to automatically discover and document Python modules.
  • Sphinx Configuration Updates: The docs/conf.py file has been significantly updated to integrate autoapi. This includes adding autoapi.extension to the Sphinx extensions, defining the source directories for API generation (../tilelang), and configuring autoapi options such as including members, handling undocumented members, and ignoring specific modules (e.g., ast, parser). Old autodoc and autosummary extensions were removed.
  • Build Process Refinement: The docs/Makefile now includes a dedicated clean target to remove autoapi generated files, and the manual sphinx-apidoc call has been removed. The maint/scripts/build_docs.sh script has been simplified by removing unnecessary test and editable package installations, focusing solely on documentation dependencies and adding --no-user for pip installs.
  • Dependency Management: The docs/requirements.txt file has been updated to include sphinx-autoapi and astroid (a dependency for autoapi), while also removing specific version pins for other Sphinx-related packages to allow for more flexible dependency resolution.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

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 issue 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 or fill out our survey to provide feedback.

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.

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 updates the documentation build process to use sphinx-autoapi instead of sphinx-apidoc. The changes include updating the Makefile, conf.py, and requirements.txt.

My review focuses on ensuring the new documentation build process is robust and maintainable. I've identified a few issues:

  • The build script is missing a step to install the project, which is likely necessary for autoapi to function correctly.
  • Dependencies in requirements.txt have been unpinned, which could lead to non-reproducible builds.
  • There are also a couple of minor maintainability and style issues in the configuration and requirements files.

Overall, the switch to autoapi is a good improvement, and the suggested changes should help make the implementation more solid.

Comment on lines +3 to +8
sphinx
sphinx-reredirects
sphinx-tabs
sphinx-toolbox
sphinxcontrib-napoleon
sphinxcontrib_httpdomain
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The version pins for several dependencies have been removed. This can lead to non-reproducible builds, as pip might install newer, potentially breaking versions of these packages in the future. It is a best practice to pin dependency versions in requirements.txt to ensure build stability. The newly added sphinx-autoapi is pinned, which is great. The same should be applied to other dependencies.

sphinx == 5.2.3
sphinx-reredirects==0.1.2
sphinx-tabs == 3.4.1
sphinx-toolbox == 3.4.0
sphinxcontrib-napoleon==0.7
sphinxcontrib_httpdomain==1.8.1

python -m pip install -r docs/requirements.txt
python -m pip install -e .
python -m pip install --upgrade pip --no-user
python -m pip install -r docs/requirements.txt --no-user
Copy link
Contributor

Choose a reason for hiding this comment

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

high

The command to install the project in editable mode (pip install -e .) has been removed. sphinx-autoapi often needs to import the package to inspect it and generate documentation. Without installing the package, the documentation build might fail or produce incomplete results. It's recommended to add back the command to install the project in editable mode.

Suggested change
python -m pip install -r docs/requirements.txt --no-user
python -m pip install -r docs/requirements.txt --no-user
python -m pip install -e . --no-user


autodoc_typehints = 'description'

autoapi_ignore = ["*language/ast*", "*version*", "*libinfo*", "*parser*"]
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The glob pattern "*parser*" in autoapi_ignore is a bit broad and could potentially match other files or directories unintentionally in the future. For better precision and maintainability, it's recommended to use a more specific pattern like "*language/parser*".

Suggested change
autoapi_ignore = ["*language/ast*", "*version*", "*libinfo*", "*parser*"]
autoapi_ignore = ["*language/ast*", "*version*", "*libinfo*", "*language/parser*"]

docs/conf.py Outdated
# # add additional overrides
# templates_path += [tlcpack_sphinx_addon.get_templates_path()]
# html_static_path += [tlcpack_sphinx_addon.get_static_path()]
}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

It's a good practice to end files with a single newline character. This file is missing a newline at the end. Many tools and conventions (like POSIX) expect this. Please add a newline at the end of the file.

uvicorn
myst-parser
sphinx-autoapi == 3.6.0
astroid
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

It's a good practice to end files with a single newline character. This file is missing a newline at the end. Many tools and conventions (like POSIX) expect this. Please add a newline at the end of the file.

@LeiWang1999 LeiWang1999 merged commit c8edb95 into tile-ai:main Jul 24, 2025
3 checks passed
@xwhzz xwhzz deleted the doc branch July 24, 2025 04:40
RubiaCx pushed a commit to RubiaCx/tilelang that referenced this pull request Nov 24, 2025
…for autoapi support (tile-ai#663)

* [Bugfix][Docs] Update documentation build process and configurations for autoapi support

* lint fix
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