First off, thank you for taking the time to contribute!
The following document provides guidelines for contributing to the documentation and the code of SIMBA. No contribution is too small! Even fixing a simple typo in the documentation is immensely helpful.
We appreciate improvements to our documentation! The README and documentation files are written in Markdown.
The easiest way to edit a document is by clicking the "Edit on GitHub" link. You'll be taken to GitHub where you can click on the pencil to edit the document.
You can then make your changes directly on GitHub. Once you're finished, fill in a description of what you changed and click the "Propose Changes" button.
Alternatively, these documents can be edited like code. See Contributing to the Code below for more details on contributing this way.
We welcome contributions to the source code of SIMBA—particularly ones that address discussed issues.
Contributions to SIMBA follow a standard GitHub contribution workflow:
-
Create your own fork of the SIMBA repository on GitHub.
-
Clone your forked SIMBA repository to work on locally.
-
Create a new branch with a descriptive name for your changes:
git checkout -b fix_x-
Make your changes (make sure to read below first).
-
Add, commit, and push your changes to your forked repository.
-
On the GitHub page for your forked repository, click "Pull request" to propose adding your changes to SIMBA.
-
We'll review, discuss, and help you make any revisions that are required. If all goes well, your changes will be added to SIMBA in the next release!
The SIMBA project follows the PEP 8 guidelines for Python code style. More specifically, we use Ruff to format and lint Python code in SIMBA.
We highly recommend setting up a pre-commit hook for Ruff. This will run Ruff on all of the Python source files before the changes can be committed. Because we run Ruff for code linting as part of our tests, setting up this hook can save you from having to revise code formatting. Take the following steps to set up the pre-commit hook:
- Verify that Ruff and pre-commit are installed. If not, you can install them with UV:
# Install with dev dependencies
uv sync --all-extras- Navigate to your local copy of the SIMBA repository and activate the hook:
pre-commit installOnce the hook is installed, Ruff will be run before any commit is made. If a file is changed by Ruff, then you need to git add the file again before finishing the commit.
We use pytest for testing. Please write tests for any new features or bug fixes:
# Run all tests
uv run pytest tests/ -v
# Run with coverage
uv run pytest tests/ --cov=simba --cov-report=html --cov-report=term-missing-
Fork and Clone
git clone https://github.com/YOUR_USERNAME/simba.git cd simba -
Set Up Environment with UV
# Install UV if you haven't already curl -LsSf https://astral.sh/uv/install.sh | sh # Create virtual environment and install dependencies uv sync --all-extras # Activate the environment source .venv/bin/activate # macOS/Linux
-
Install Pre-commit Hooks
uv run pre-commit install
For questions, issues, or feature requests, please open an issue on GitHub.
Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.