Contributing to PyFluent#

General guidance on contributing to a PyAnsys library appears in the Contributing topic in the PyAnsys Developer’s Guide. Ensure that you are thoroughly familiar with this guide, paying particular attention to the Coding Style topic, before attempting to contribute to PyFluent.

The following contribution information is specific to PyFluent.

Clone the repository#

Follow the steps in the Development Installation section of Installation to set PyFluent up in development mode.

Run unit tests#

To run the PyFluent unit tests, execute the following command in the root (pyfluent) directory of the repository:

poetry install --with test
poetry run pytest ----fluent-version=24.2

You can change the Fluent version by replacing 24.2 with the version you want to test.

Build documentation#

To build the PyFluent documentation locally, run the following commands in the root (pyfluent) directory of the repository:

poetry install --with docs
cd doc
poetry run make html

After the build completes, the HTML documentation is located in the _build/html directory. You can load the index.html file in this directory into a web browser.

You can clear all HTML files from the _build/html directory with:

make clean

Post issues#

Use the PyFluent Issues page to submit questions, report bugs, and request new features.

Adhere to code style#

PyFluent is compliant with the PyAnsys code style. It uses the tool pre-commit to check the code style. You can install and activate this tool with:

python -m pip install pre-commit
pre-commit install

You can then use the style rule defined in Makefile with:

make style

Or, you can directly execute pre-commit with:

pre-commit run --all-files --show-diff-on-failure