This is a living guide that defines a development process for The Yearn.finance Core Protocol.
We want to make contributing to this project as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
We use github to host code, to track issues and feature requests, as well as accept pull requests.
We Use Github Flow, So All Code Changes Happen Through Pull Requests
Pull requests are the best way to propose changes to the codebase (we use Github Flow). We actively welcome your pull requests:
- Fork the repo and create your branch from
master
. - If you've added code that should be tested, add tests or ensure it doesn't break current tests.
- If you've changed something impacting current docs, please update the documentation.
- Ensure the test suite passes if applicable.
- Make sure your code lints.
- Issue that pull request!
The master
branch has the up to date changes of the codebase with working code. Releases should be tracked via git tags to link a specific commit to a deployment for history and documentation purposes.
Requirements for running tests locally:
- Python 3.8 local development environment and NodeJs 10.x development environment for Ganache
- Brownie local environment setup. See here for instructions: ETH Brownie
- Local env variables for Etherscan API and Infura. ETHERSCAN_TOKEN, WEB3_INFURA_PROJECT_ID
- Local Ganache environment installed with
npm install -g ganache-cli@6.10.1
Running tests:
brownie test -s
Running tests with coverage:
brownie test -s --coverage
Repository uses GH actions to setup CI for test harness. You can see an example here
Be sure to setup in the repository any secret or env variable needed for your GH actions to work.
In short, when you submit code changes, your submissions are understood to be under the same APGL License that covers the project. Feel free to contact the maintainers if that's a concern.
Report bugs using Github's issues
We use GitHub issues to track public bugs. Report a bug by opening a new issue; it's that easy!
Before adding a new issue, please check that your issue is not already identified or hasn't been handled by searching the active/closed issues.
This is an example of a bug report I wrote, and I think it's not a bad model. Here's another example from Craig Hockenberry, an app developer whom I greatly respect.
Great Bug Reports tend to have:
- A quick summary and/or background
- Steps to reproduce
- Be specific!
- Give sample code if you can.
- What you expected would happen
- What actually happens
- Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
Kirby loves thorough bug reports.
- Setup prettier and solium linters into your local coding environment.
- Check that your changes adhere to the linting rules before pushing.
- Merging may be blocked if a PR does not follow the coding style guidelines.
By contributing, you agree that your contributions will be licensed under its APGL License.
TBD