-
Notifications
You must be signed in to change notification settings - Fork 120
docs: expand CONTRIBUTING.md with local development setup #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,10 +1,11 @@ | ||||||||||||||||
| # Contribution Guidelines | ||||||||||||||||
|
|
||||||||||||||||
| Contributions to the Kiijs library are welcome. As a contributor, here are the guidelines we would like you to follow: | ||||||||||||||||
| Contributions to KiiChain are welcome. As a contributor, here are the guidelines we would like you to follow: | ||||||||||||||||
|
|
||||||||||||||||
| - [Code of Conduct](#code-of-conduct) | ||||||||||||||||
| - [Issues and Bugs](#found-a-bug) | ||||||||||||||||
| - [Feature Requests](#missing-a-feature) | ||||||||||||||||
| - [Local Development Setup](#local-development-setup) | ||||||||||||||||
| - [Submission Guidelines](#submission-guidelines) | ||||||||||||||||
| - [Coding Rules](#coding-rules) | ||||||||||||||||
| - [Commit Message Guidelines](#commit-message-convention) | ||||||||||||||||
|
|
@@ -26,6 +27,112 @@ If you would like to *implement* a new feature: | |||||||||||||||
| - For a **Major Feature**, first [open an issue](#submitting-an-issue) and outline your proposal so that it can be discussed. | ||||||||||||||||
| - **Small Features** can be crafted and directly [submitted as a Pull Request](#submitting-a-pull-request-pr). | ||||||||||||||||
|
|
||||||||||||||||
| ## Local Development Setup | ||||||||||||||||
|
|
||||||||||||||||
| ### Prerequisites | ||||||||||||||||
|
|
||||||||||||||||
| | Tool | Version | Required | | ||||||||||||||||
| |------|---------|----------| | ||||||||||||||||
| | [Go](https://golang.org/dl/) | 1.24+ | Yes | | ||||||||||||||||
| | [Git](https://git-scm.com/) | any recent | Yes | | ||||||||||||||||
| | [GNU Make](https://www.gnu.org/software/make/) | any recent | Recommended | | ||||||||||||||||
| | [Docker](https://docs.docker.com/get-docker/) | any recent | For e2e tests only | | ||||||||||||||||
|
Comment on lines
+34
to
+39
|
||||||||||||||||
|
|
||||||||||||||||
| Verify your setup: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| go version # Should show 1.24+ | ||||||||||||||||
| git --version | ||||||||||||||||
| make --version # Optional but recommended | ||||||||||||||||
| docker --version # Only needed for e2e tests | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ### Clone and Build | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # 1. Fork the repository on GitHub, then clone your fork | ||||||||||||||||
| git clone https://github.com/<your-username>/kiichain.git | ||||||||||||||||
| cd kiichain | ||||||||||||||||
|
|
||||||||||||||||
| # 2. Add the upstream remote | ||||||||||||||||
| git remote add upstream https://github.com/KiiChain/kiichain.git | ||||||||||||||||
|
|
||||||||||||||||
| # 3. Create a feature branch | ||||||||||||||||
| git checkout -b feat/my-change | ||||||||||||||||
|
|
||||||||||||||||
| # 4. Build the binary | ||||||||||||||||
| make build # Output: ./build/kiichaind | ||||||||||||||||
|
|
||||||||||||||||
| # Or install to $GOPATH/bin | ||||||||||||||||
| make install | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| If you don't have GNU Make: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| go build -o ./build/kiichaind ./cmd/kiichaind | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| ### Running Tests | ||||||||||||||||
|
|
||||||||||||||||
| **Unit tests:** | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| make test-unit # Run all unit tests (5 min timeout) | ||||||||||||||||
| make test-unit-cover # Run with coverage report | ||||||||||||||||
| make test-unit-cover-html # Generate HTML coverage report | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| Or directly with `go test`: | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| go test ./... -count=1 -timeout=5m | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| **Race condition detection:** | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| make test-race | ||||||||||||||||
| ``` | ||||||||||||||||
|
|
||||||||||||||||
| **End-to-end tests** (requires Docker): | ||||||||||||||||
|
|
||||||||||||||||
| ```bash | ||||||||||||||||
| # Build the required Docker images first | ||||||||||||||||
| docker build -t kiichain/kiichaind-e2e -f Dockerfile . | ||||||||||||||||
| cd tests/e2e/docker && docker build -t kiichain/hermes-e2e:1.0.0 -f hermes.Dockerfile . | ||||||||||||||||
| cd ../../.. | ||||||||||||||||
|
Comment on lines
+102
to
+104
|
||||||||||||||||
| docker build -t kiichain/kiichaind-e2e -f Dockerfile . | |
| cd tests/e2e/docker && docker build -t kiichain/hermes-e2e:1.0.0 -f hermes.Dockerfile . | |
| cd ../../.. | |
| make docker-build-debug # Build kiichain e2e image | |
| make docker-build-hermes # Build Hermes e2e image | |
| # Or build all e2e images at once: | |
| # make docker-build-all |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The intro now refers to "KiiChain", but this file still contains references to "Kiijs" later (e.g., "The Kiijs team..." and "code under
Kiijs"), which is inconsistent and confusing for contributors. Please update those remaining mentions so the project name is consistent throughout the guide.