Skip to content

Latest commit

 

History

History
93 lines (59 loc) · 1.25 KB

File metadata and controls

93 lines (59 loc) · 1.25 KB

Contributing

Setup

  1. Fork the repository on GitHub

  2. Clone your fork locally

git clone https://github.com/<your_username>/foamlib.git
  1. 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

  1. Create a new branch for your changes
git checkout -b my-new-feature
  1. Make your changes

  2. Test your changes (see below for instructions)

  3. Commit your changes

git add .
git commit -m "Add some feature"
  1. Push your changes to your fork
git push origin my-new-feature
  1. Open a pull request on GitHub

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