Skip to content

Latest commit

 

History

History
executable file
·
87 lines (66 loc) · 3.83 KB

contributing.md

File metadata and controls

executable file
·
87 lines (66 loc) · 3.83 KB

Contributing

This document explain the process of contributing to the project.

Philosophy

  • The philosophy is borrowing much from UNIX philosophy and the golang programming language.Each sub command should do one thing and do it well
  • Every component behaviour should be covered with an e2e tests and if an e2e tests is not appropriate should at least have unit tests for key components of a package.

Feedback / Issues

If you encounter any issue or you have an idea to improve, please:

  • Search through Google and existing open and closed GitHub Issues for the answer first. If you find relevant topic, please comment on the issue.
  • If not found, please add an issue to GitHub issues. Please provide all relevant information as template suggest.
  • If you have a quick question you might want to also ask on our Discord. We are recommending, using GitHub issues for issues and feedback, because GitHub issues are track-able.

If you encounter security vulnerability, please let us know privately via the Team email address: info@tellor.io

Adding New Features / Components

For any major changes or new features, please first discuss the change you wish to make via issue or Discord, or any other method before making a change.

Development

The following section explains various suggestions and procedures to note during development.

First Steps

  • Familiarizing yourself with our coding style guidelines..
  • Familiarizing yourself with the Makefile commands, for example build,format, test, lint. make help will print all available commands with some description.

Pull Request Process

  1. Fork tellor-io/TellorMiner.git and start development from your own fork. Here are sample steps to setup your development environment:
$ GOPATH=$(go env GOPATH)
$ mkdir -p $GOPATH/src/github.com/tellor-io
$ cd $GOPATH/src/github.com/tellor-io
$ git clone https://github.com/tellor-io/TellorMiner.git
$ cd TellorMiner
$ git remote add fork git remote add fork git@github.com/<your_github_id>/TellorMiner.git
$ make build
$ ./tellor -h
  1. Keep PRs as small as possible. For each of your PRs, you create a new branch based on the latest master. Chain them if needed (base one PR on other PRs). You can read more details about the workflow from here.
$ git checkout master
$ git pull origin master
$ git checkout -b <your_PR_branch>
$ <Iterate your development>
$ git push fork <your_PR_branch>
  1. If your change affects users (adds,removes or changes a feature) add the item to the CHANGELOG.
  2. Add e2e tests for new features and changes to functionality. Add unit tests for key components of the packages.
  3. A PR will me merged once the PR has been approved by at least one developer with write access.
  4. If you feel like your PR is waiting too long for a review, feel free to ping in the Discord channel for a review!

Dependency management

The project uses Go modules to manage dependencies on external packages. This requires a working Go environment with version 1.11 or greater and git installed.

To add or update a new dependency, use the go get command:

# Pick the latest tagged release.
go get example.com/some/module/pkg

# Pick a specific version.
go get example.com/some/module/pkg@vX.Y.Z

Tidy up the go.mod and go.sum files:

make deps
git add go.mod go.sum
git commit

Project development go tools

The project uses Bingo for adding any go tools required by the project.