Contributing to Timoni: A Comprehensive Guide for Developers

Timoni is an Apache 2.0 licensed project that welcomes contributions via GitHub pull requests. In this guide, we’ll outline the steps for developers to get started with contributing to the project.

Prerequisites

Before you begin, ensure you have the following prerequisites installed:

  1. Go >= 1.21: Install Go from the official website
  2. cue >= 0.6: Install cue using go get github.com/c-bata/cue/cmd/cue
  3. Make >= 4.4: Install make from your operating system’s package manager

Running the Test Suite

To run the test suite, use the following command:

make

You can also run manual tests using the locally built binary:

./bin/timoni <command>

Rendering the Docs Locally

To render the docs locally, follow these steps:

  1. Install the required packages:
python -m venv venv && source venv/bin/activate
pip install -r hack/mkdocs/requirements.txt
  1. Build and serve the docs:
mkdocs serve

By default, MKDocs will be served at http://127.0.0.1:8000

Acceptance Policy

To increase the chances of your pull request being accepted, follow these guidelines:

  1. Write a clear and concise requirement.
  2. Add tests for new code and old code.
  3. Ensure new code and tests follow the project’s conventions.
  4. Write a good commit message.
  5. Ensure all code builds on Linux, macOS, and Windows using plain go build.
  6. Ensure code has appropriate test coverage and tests work with go test.
  7. Adhere to Go Code Review Comments.
  8. Follow What’s in a name for naming conventions.

Committing Changes

When committing changes, follow these rules for good commit messages:

  1. Limit the subject to 50 characters and write it as a continuation of the sentence “If applied, this commit will …”
  2. Explain what and why in the body, if more than a trivial change; wrap it at 72 characters.

For more helpful advice on documenting your work, refer to this article.

Available Commands

Timoni has the following commands potentially available:

  • Build: make build
  • Test: make test
  • Static analysis checks: make cue-vet
  • Install: make install
  • Push Redis OCI artifact: make push-redis
  • Format the codebase: make fmt
  • Remove unnecessary files: make tidy
  • Generate Go files: make generate
  • Generate documentation: make docs
  • Help information: make help
  • Build, test, and install: make all
  • Prepare documentation: make prep-docs
  • Set up environment for envtest: make setup-envtest
  • Install envtest: make install-envtest
  • Run a command using ONESHELL: make ONESHELL (assuming it’s defined)

CI/CD Configurations

Timoni uses the following CI/CD configurations:

These configurations help ensure that the project’s codebase remains stable and functional. When contributing, keep these configurations in mind to maintain the project’s integrity.