Skip to content
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

chore(docs): adding documentation on how to contribute with Tracetest (related to #1761) #1820

Merged
merged 3 commits into from
Jan 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# How to contribute
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

Thank you for looking at this. We, at Tracetest, are really excited to have you contribute on the project with us.

The main lines of communication with our team is through [Github issues](https://github.com/kubeshop/tracetest/issues/new/choose) or [Discord](https://discord.gg/eBvEQRVyKX). Feel free to ask any questions!
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

## Developing

Development can be conducted using any GoLang and Typescript compatible IDE/editor (e.g., Jetbrains GoLand, VSCode).

There are four places where you develop new thing on Tracetest: on the CLI, on the API Server, on the Web UI and on the Documentation website.
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

### CLI

Written in Golang, can be seen on the folder `./cli`. You can see what options do you have to test and build the application by typing `make help` inside the folder.
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

To test its integration with our API, you can run a local API server on your machine by running one of our [examples](./examples/) with `docker compose`. For instance:
```sh
cd ./examples/tracetest-jaeger
docker compose up -d
```

Remember that you need file pointing to that server by configuring the CLI using `tracetest configure` command or using the flag `-c` with a valid config file location, like `config.yaml`) with the following content:
danielbdias marked this conversation as resolved.
Show resolved Hide resolved
```yaml
scheme: http
endpoint: localhost:11633
analyticsEnabled: false
```

### API Server

Written in Golang, can be seen on the folder `./server`. You can see what options do you have to test and build the application by typing `make help` inside the folder.
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

To run the server along the database and the Open Telemetry collector, you can run `docker compose` at the root folder of Tracetest, by executing:
```sh
docker compose up postgres otel-collector
```

### Web UI

Written in Typescript and using Node.js tools, can be seen on the folder `./web`. You can see what options do you have to test and build the application by seeing the `package.json` scripts [here](./web/package.json).
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

Like the CLI, to connect to the API, you can run a local API server on your machine by running one of our [examples](./examples/) with `docker compose`. For instance:
```sh
cd ./examples/tracetest-jaeger
docker compose up -d
```

### Documentation website
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

Written in Typescript and using Node.js tools using `docusaurus`, can be seen on the folder `./docs`. You can see what options do you have to test and build the application by seeing the `package.json` scripts [here](./docs/package.json).
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

## Testing

We have a great ambition to have tests verify every important corner of our code-base. It will be greatly appreciated, if your PR's include tests for the changes you propose.
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

## Submitting changes
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

Please send a Github Pull-Request with a clear list of what you've done (read more about [pull requests](http://help.github.com/pull-requests/)). When you send a pull request, we will love if you include examples. Please follow our coding conventions (below) and make sure all of your commits are atomic (one feature per commit).
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

Always write a clear log message for your commits. One-line messages are fine for small changes, but bigger changes should look like this:

$ git commit -m "A brief summary of the commit
>
> A paragraph describing what changed and its impact."

## Coding conventions
danielbdias marked this conversation as resolved.
Show resolved Hide resolved

Start reading our code and you'll get the hang of it. We use code formatting tools like [eslint](https://eslint.org/) and [go vet](https://pkg.go.dev/cmd/vet) to help maintain peace in the galaxy.

If you have any doubts about coding standards you can follow [Effective Go](https://go.dev/doc/effective_go) or [Go styleguide](https://google.github.io/styleguide/go/) for Golang and [Typescript styleguide](https://google.github.io/styleguide/tsguide.html) for Typescript.

Many thanks,
Kubeshop
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ Is available at [https://docs.tracetest.io/](https://docs.tracetest.io/)

We strive to produce quality code and improve Tracetest rapidly and safely. Therefore, we have a full suite of both frontend and backend tests. We are using Cypress to test our frontend code and (surprise, surprise) Tracetest for our backend code. You can see the [test runs here](https://github.com/kubeshop/tracetest/actions/workflows/pull-request.yaml), and a blog post describing our [testing pipelines here](https://tracetest.io/blog/integrating-tracetest-with-github-actions-in-a-ci-pipeline).

# Contributing

Want to contribute with Tracetest? See our contributing guidelines [here](./CONTRIBUTING.md).

# License

[MIT License](/LICENSE)