We want to make contributing to CompilerGym as easy and transparent as possible. The most helpful ways to contribute are:
- Provide feedback.
- Report bugs. In particular, it’s important to report any crash or correctness bug. We use GitHub issues to track public bugs. Please ensure your description is clear and has sufficient instructions to be able to reproduce the issue.
- Report issues when the documentation is incomplete or unclear, or an error message could be improved.
- Make feature requests. Let us know if you have a use case that is not well supported, including as much detail as possible.
- Contribute to the CompilerGym ecosystem.
- Pull requests. Please see below for details. The easiest way to get stuck is to grab an unassigned "Good first issue" ticket!
- Add new features not on the roadmap. Examples could include adding support for new compilers, producing research results using CompilerGym, etc.
We actively welcome your pull requests.
- Fork the repo and create
your branch from
development
. - If you've added code that should be tested, add tests.
- If you've changed APIs, update the documentation.
- Ensure the test suite passes.
- Make sure your code lints (see "Code Style" below).
- If you haven't already, complete the Contributor License Agreement ("CLA").
We want to ease the burden of code formatting using tools. Our code style is simple:
- Python: black and isort.
- C++: Google C++
style with 100
character line length and
camelCaseFunctionNames()
.
We use pre-commit to format our code to enforce these rules. Before submitting pull requests, please run pre-commit to ensure the code is correctly formatted.
Other common sense rules we encourage are:
- Prefer descriptive names over short ones.
- Split complex code into small units.
- When writing new features, add tests.
- Prefer easy-to-use code over easy-to-read, and easy-to-read code over easy-to-write.
In order to accept your pull request, we need you to submit a CLA. You only need to do this once to work on any of Facebook's open source projects.
Complete your CLA here: https://code.facebook.com/cla