Skip to content

Commit

Permalink
Merge pull request #63 from kogisin/kogisin/60-add-contributing-docs
Browse files Browse the repository at this point in the history
docs: add helpful docs for audit
  • Loading branch information
dongsam authored Oct 15, 2021
2 parents 6133d34 + 90435c8 commit 2ffbd46
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 15 deletions.
17 changes: 16 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,18 @@
# Contributing

TODO: add context
We welcome contributions from anyone who is willing to create a new PR on budget module, make sure that you read and comply with this document. See the [open issues](https://github.com/tendermint/budget/issues) that we need help with. Feel free to inform us if you are willing to work on any issue. Note that the `master` branch contains the latest development version.

We follow standard github best practices:

- Fork the repository
- Make sure your `branch` is from the tip of `master` branch
- Make some commits to resolve an issue
- Submit a pull request to `master`

Rule of thumb:

- Make sure you run tests by running `make test-all` locally to see there is any issue
- Review all the checks on your PR and review code coverage report
- Assign reviewers from code owners (@dongsam @kogisin @hallazzang)

Thank you for your contribution!
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ If you haven't already, install Golang by following the [official docs](https://

Requirement | Notes
----------- | -----------------
Go version | Go1.15 or higher
Cosmos SDK | v0.44.0 or higher
Go version | Go1.16 or higher
Cosmos SDK | v0.44.2 or higher

### Get Budget Module source code

Expand Down
70 changes: 58 additions & 12 deletions TECHNICAL-SETUP.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,68 @@
# Technical Setup

## Setup git hooks for Conventional Commit
To ensure you have a successful experience working with our budget module, Tendermint recommends this technical setup.

## Github Integration

Click the GitHub icon in the sidebar for GitHub integration and follow the prompts.

Clone the repos you work in

- Fork or clone the https://github.com/tendermint/budget repository.

Internal Tendermint users have different permissions, if you're not sure, fork the repo.

## Software Requirement

To build the project:

- [Golang](https://golang.org/dl/) v1.16 or higher
- [make](https://www.gnu.org/software/make/) to use `Makefile` targets

## Development Environment Setup

Setup git hooks for conventional commit.

1. Install [`pre-commit`](https://pre-commit.com/)
2. Run this command:

```
$ pre-commit install --hook-type commit-msg
```

2. Run the following command:
```bash
pre-commit install --hook-type commit-msg
```

3. (Optional for macOS users) Install GNU `grep`:
1. Run `brew install grep`
2. Add this line to your shell profile:

4. Run the following command
```bash
brew install grep
```

5. Add the line to your shell profile:
```bash
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"
```

Now, whenever you make a commit, the `pre-commit` hook will be run to check if the commit message conforms [Conventional Commit](https://www.conventionalcommits.org/) rule.

## Building

To build the budget module node and command line client, run the `make build` command from the project's root folder. The output of the build will be generated in the `build` folder.
For cross-builds use the standard `GOOS` and `GOARCH` env vars. i.e. to build for windows:
```bash
GOOS=windows GOARCH=amd64 make build
```
export PATH="/usr/local/opt/grep/libexec/gnubin:$PATH"
```
Now, whenever you make a commit, the `pre-commit` hook will be run to check if the commit message
conforms [Conventional Commit](https://www.conventionalcommits.org/) rule.
## Testing
Run `make test-all` command to run tests.
> 💡 you can also use the default `go` command to build the project, check the content of the [Makefile](https://github.com/tendermint/budget/blob/master/Makefile#L139) for reference
## Installation
To install the node client on your machine, run `make install` command from the project's root folder.

> 💡 you can also use the default `go` command to build the project, check the content of the [Makefile](https://github.com/tendermint/budget/blob/master/Makefile#L87) for reference

0 comments on commit 2ffbd46

Please sign in to comment.