-
Notifications
You must be signed in to change notification settings - Fork 5
Contributing
Thanks for your interest in improving Opal. This page covers how to report issues, how to submit pull requests, and the formatting convention the project expects.
Set up your environment first — see Install Requirements for the uv/virtual-environment setup. This page assumes you already have a working checkout and can run the simulator.
Before submitting any change, make sure it passes the test suite — see Testing for how to run the tests.
Open an issue on GitHub. Three issue templates are available to help structure the report:
- Bug report — describe the bug, steps to reproduce (which config file, exact command line, and the error/crash output), and expected behavior.
- Feature request — describe the problem you're trying to solve and the solution you'd like.
- Custom issue template — a free-form template for anything that doesn't fit the other two (problem statement + desired functionality).
If you're unsure whether something is a bug or by design, open an issue anyway — that's the right place to ask.
- Fork/branch, make your change.
- Format the code (see below).
- Run the test suite — see Testing.
- Open a pull request against
main.
There is no separate PR template; a clear description of what changed and why is sufficient.
The project follows the Black Python formatter as its one required convention. The configuration lives in pyproject.toml:
[tool.black]
line-length = 120
target-version = ["py311"]Install Black and run the formatter from the top-level directory before sending a pull request:
uv pip install black
sh-black-formatter.shsh-black-formatter.sh simply runs black --config ./pyproject.toml --no-cache . over the whole repository, so it reformats every Python file, not just the ones you touched.
The repository ships a git hook at .githooks/pre-commit that runs Black automatically on just the staged .py files at commit time (and re-stages them after formatting). It is not enabled by default — turn it on once per clone with:
git config core.hooksPath .githooksThis is a convenience so you don't forget to format before committing; running sh-black-formatter.sh manually before opening the PR achieves the same result.
If your change adds or modifies simulation configuration fields, please also update the documentation on Configuration Simulation so the config reference stays in sync with the code.
If you have questions or run into issues, open an issue on GitHub and tag @animeshtrivedi and @raduioanstoica.
Opal is released under the Apache License 2.0. By contributing, you agree that your contributions will be licensed under the same terms.