Contributing
December 5, 2025 ยท View on GitHub
Setup
-
Clone your fork locally
git clone https://github.com/<your_username>/foamlib.git
- Install the project in editable mode in a virtual environment
cd foamlib
python3 -m venv .venv
source .venv/bin/activate
pip install -e . --group dev
Contributing changes via a pull request
- Create a new branch for your changes
git checkout -b my-new-feature
-
Make your changes
-
Test your changes (see below for instructions)
-
Commit your changes
git add .
git commit -m "Add some feature"
- Push your changes to your fork
git push origin my-new-feature
Checks
The following checks will be run by the CI pipeline, so it is recommended to run them locally before opening a pull request.
Testing
Run the tests with:
pytest
Type checking
Type check the code with:
ty check
Linting
Lint the code with:
ruff check
Formatting
Format the code with:
ruff format
Documentation
Generate the documentation locally with:
cd docs
make html