Thank you for taking the time to contribute to mesa-frames! Since the project is still in its early stages, we warmly welcome contributions that will help shape its development. 🎉
For a more general and comprehensive guide, please refer to mesa's main contribution guidelines. 📜
Before contributing, we recommend reviewing our roadmap file to understand the project's current priorities, upcoming features, and long-term vision. This will help ensure your contributions align with the project's direction.
Before you begin contributing, ensure that you have the necessary tools installed:
- Install Python (at least the version specified in
requires-pythonofpyproject.toml). 🐍
-- We recommend using a virtual environment manager like:
- [Astral's UV](https://docs.astral.sh/uv/#installation) 🌟
- [Hatch](https://hatch.pypa.io/latest/install/) 🏗️
-
Install pre-commit to enforce code quality standards before pushing changes:
-- If using VS Code, consider installing these extensions to automatically enforce formatting:
- [Ruff](https://marketplace.visualstudio.com/items?itemName=charliermarsh.ruff) – Python linting & formatting 🐾
- [Markdownlint](https://marketplace.visualstudio.com/items?itemName=DavidAnson.vscode-markdownlint) – Markdown linting (for documentation) ✍️
- [Git Hooks](https://marketplace.visualstudio.com/items?itemName=lakshmikanthayyadevara.githooks) – Automatically runs & visualizes pre-commit hooks 🔗
- Pick an existing issue or create a new one if necessary.
- Ensure that your contribution aligns with the project's goals.
-
Fork the repository on GitHub.
-
Clone your fork to your local machine:
git clone https://github.com/YOUR_USERNAME/mesa-frames.git
-
Create a new branch with a descriptive name:
git checkout -b feature-name
-
Prevent merge commit clutter by setting rebase mode:
git config pull.rebase true
We manage the development environment with uv:
uv sync --all-extrasThis creates .venv/ and installs mesa-frames with the development extras.
-
Make necessary edits and save the code.
-
Add and commit your changes with meaningful commit messages:
git add FILE_NAME git commit -m "Fix issue X: Brief description of the fix"- Keep commits small and focused on a single logical change.
- Follow Tim Pope’s commit message guidelines. 📝
-
Run pre-commit hooks to enforce code quality standards:
uv run pre-commit run -a
-
Run tests to ensure your contribution does not break functionality:
uv run pytest -q --cov=mesa_frames --cov-report=term-missing
-- Optional: Runtime Type Checking (beartype) 🔍
You can enable stricter runtime validation of function arguments/returns with beartype during local development:
MESA_FRAMES_RUNTIME_TYPECHECKING=1 uv run pytest -q --cov=mesa_frames --cov-report=term-missingQuick facts:
-
Automatically enabled in: Hatch dev env (
hatch shell dev), VS Code debugger, and VS Code test runs. -
Enable manually by exporting
MESA_FRAMES_RUNTIME_TYPECHECKING=1(any of 1/true/yes). -
Use only for development/debugging; adds overhead—disable for performance measurements or large simulations.
-
Unset with your shell (e.g.
unset/Remove-Item Env:depending on shell) to turn it off.Example for a one-off test run:
MESA_FRAMES_RUNTIME_TYPECHECKING=1 uv run pytest -q
- If you add a new feature, update the documentation accordingly.
- We use MKDocs for documentation:
-
Modify or create markdown files in the
docs/folder. -
Preview your changes by running:
uv run mkdocs serve
-
Open
http://127.0.0.1:8000in your browser to verify documentation updates.
-
-
Push your changes to your fork:
git push origin feature-name
-
Open a pull request (PR):
- Follow GitHub’s PR guide.
- Link the issue you are solving in the PR description.
Thank you again for your contribution! 🎉