Write documentation#
Contributing documentation is a valuable way to improve PyFluent-MCP for everyone.
Understand the benefits of documentation#
Good documentation achieves these goals:
Helps new users get started quickly.
Reduces support questions.
Makes the project more professional.
Creates opportunities for learning.
Builds community engagement.
Understand documentation types#
- API documentation
Detailed reference for MCP tools, parameters, return values, and examples. Generated automatically from in-code docstrings by the
ansys_sphinx_theme.extension.autoapiextension and rendered underapi/index. To update it, edit the docstrings insrc/ansys/fluent/mcp/.- User guides
How-to guides, tutorials, and best practices. Located in the
doc/source/user_guide/directory.- Getting started
Installation, quick start, and initial setup guides. Located in the
doc/source/getting_started/directory.- Examples
Practical usage examples and tutorials. Located in the
doc/source/examples/directory.- API docstrings
In-code documentation of functions and classes. Located in the
src/ansys/fluent/mcp/directory.
Use RST format#
PyFluent-MCP documentation uses reStructuredText (RST) format and Sphinx as its documentation generator.
Set up documentation locally#
Install documentation dependencies:
pip install -e ".[pyfluent,doc]"
Navigate to the
docdirectory:cd doc
Build HTML documentation:
make.bat html # On Windows make html # On Linux/macOS
View in your browser by opening the
_build/html/index.htmlfile.
Edit an existing page#
Navigate to the RST file in the
doc/source/directory.Make your changes.
Save the file.
Rebuild the documentation using the
make htmlcommand.View your changes in your browser.
Create a page#
Create a RST file in the appropriate directory.
Write your content.
Add the file to the toctree in the parent
index.rstfile.Rebuild the documentation using the
make htmlcommand.
Write good documentation#
Be clear and concise.
✓ Good: This tool launches a new Fluent session through PyFluent.
✗ Bad: This tool can be used for launching an instance of Fluent and making a connection.
Use examples and explain why, not just how.
Add cross-references to related pages using :doc: and :ref: directives.
Run documentation checks#
Before submitting a pull request:
cd doc
make html
make linkcheck
The CI pipeline also runs Ansys documentation style checks via Vale.
Next steps#
See Contributing for general contribution guidelines.
See Develop PyFluent-MCP for development setup.