2.6 KiB
Contributing
First off, thanks for taking the time to contribute! This guide will answer some common questions about how this project works.
While this is a Pinterest open source project, we welcome contributions from everyone. Several regular outside contributors are also project maintainers.
Making Changes
- Fork this repository to your own account
- Make your changes and verify that
mix test
passes - Commit your work and push to a new branch on your fork
- Submit a pull request
- Participate in the code review process by responding to feedback
Once there is agreement that the code is in good shape, one of the project's maintainers will merge your contribution.
To increase the chances that your pull request will be accepted:
- Follow our style guide
- Write tests for your changes
- Write a good commit message
Style
We use mix format
-based code formatting. The format will be enforced by
Travis CI, so please make sure your code is well formatted before you push
your branch so those checks will pass.
We also use Credo for static analysis and code consistency. You can run it
locally via mix credo
. Ebert will also comment on any issues it finds in
pull requests.
Testing
Test Coverage
We think test coverage is important because it makes it less likely that future changes will break existing functionality. Changes that drop the project's overall test coverage below 90% will fail to pass CI.
Test coverage is measured using Coveralls. You can generate a local
coverage report using mix coveralls.detail
or mix coveralls.html
.
Static Test Data
Some serialization tests use static test data to verify their correctness.
These data files live under test/data/
and have .thriftbin
extensions.
If you're changing any of the serialization routines, or adding some new code
paths, you may need to (re)generate some of these data files. If that's the
case, check out test/data/README.md
for instructions.
License
By contributing to this project, you agree that your contributions will be licensed under its Apache 2 license.