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

git hooks #40

Merged
merged 4 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
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
14 changes: 14 additions & 0 deletions .githooks/pre-push
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh
cargo fmt -- --check
if [ $? -ne 0 ]; then
echo "Rustfmt failed. Please format your code."
exit 1
fi

cargo clippy --workspace --all-targets -- -D warnings
if [ $? -ne 0 ]; then
echo "Clippy found issues. Please fix them."
exit 1
fi

echo "All checks passed. Proceeding with push..."
79 changes: 79 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
<!-- omit in toc -->
# Contributing to the Benchmarking Tool

First off, thank you for taking the time to contribute! ❤️

All types of contributions are encouraged and valued. Please refer to the [Table of Contents](#table-of-contents) for various ways you can help and details on how this project handles contributions. Be sure to read the relevant sections before contributing, it will make things easier for us maintainers and provide a smoother experience for everyone involved. The community looks forward to your contributions! 🎉

> If you like the project but don’t have time to contribute, that's perfectly fine. There are other simple ways to support the project and show your appreciation, which we would greatly appreciate:
> - Star the project
> - Tweet about it
> - Mention this project in your project's README
> - Share the project at local meetups and with your friends/colleagues

<!-- omit in toc -->
## Table of Contents

- [I Have a Question](#i-have-a-question)
- [I Want To Contribute](#i-want-to-contribute)
- [Project Communications](#project-communications)
- [Contribution Workflow](#contribution-workflow)
- [Your First Code Contribution](#your-first-code-contribution)


## I Have a Question

> Before asking a question, please ensure you’ve read the documentation available in the `docs` directory.

The best way to ask a question is by joining our community on [Discord](https://discord.com/invite/fsEW23wFYs). The most suitable place to post your question is `#benchmarking-tool`

If you still need clarification after that, we recommend the following:

- Open an [Issue](https://github.com/stratum-mining/benchmarking-tool/issues).
- Provide as much context as possible about the issue you're facing.

We will address your issue as soon as possible.

### Project Communications

Most project communications occur on our [Discord](https://discord.gg/fsEW23wFYs) server. Discussions related to the benchmarking tool typically happen in the [benchmarking-tool](https://discord.gg/Kv6uucUq) channel.

Discussions about specific codebase work take place on GitHub, in [issues](https://github.com/stratum-mining/benchmarking-tool/issues) and [pull requests](https://github.com/stratum-mining/benchmarking-tool/pulls).

Our development calls are scheduled every Tuesday at 18:00 CET. You can see them in the Discord sidebar under Events and subscribe to be notified.

## I Want To Contribute

> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content, and that the content you contribute may be provided under the project license.

### Contribution Workflow

The project follows an open contributor model, where anyone is welcome to contribute through reviews, documentation, testing, and patches. Follow these steps to contribute:

1. **Fork the Repository**

2. **Set Up Git Hooks**

`git config core.hooksPath .githooks`: This command configures Git to use the `.githooks` directory for all Git hooks.

3. **Create a Branch**

4. **Commit Your Changes**

5. **Submit a Pull Request**: Once you're satisfied with your changes, submit a pull request to the repository. Provide a clear and concise description of the changes you've made. If your pull request addresses an existing issue, reference the issue number in the description. To contribute to the protocol implementation, every PR must be opened against the `main` branch. To better understand the branch structure, please refer to [this guide](https://github.com/stratum-mining/stratum/blob/main/RELEASE.md#principal-branches).

6. **Review and Iterate**

7. **Merge and Close**: Once your pull request has been approved and all discussions have been resolved, a project maintainer will merge your changes into the `main` branch. Your contribution will then officially become part of the project. The pull request will be closed, marking the completion of your contribution.

### Your First Code Contribution

> To contribute, a basic understanding of Git and GitHub is needed. If you're not familiar with them, check out [this resource](https://docs.github.com/en/get-started/start-your-journey/git-and-github-learning-resources) to learn how to use them.

Not sure where to start contributing to SRI? You can begin by looking through issues labeled `good first issue`:

* [Good first issue](https://github.com/stratum-mining/benchmarking-tool/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22) - These issues typically require only a few lines of code and a test or two.
GitGab19 marked this conversation as resolved.
Show resolved Hide resolved

* [Help wanted](https://github.com/stratum-mining/benchmarking-tool/labels/help%20wanted) - issues which should be a bit more involved than good first issue issues.

Another way to better understand where to focus your contribution is by looking at our roadmap: https://docs.google.com/document/d/1CqcvsxGugFjWy4e4Yf6PjxCs2O4puwlFBO6M0TRL4qE/edit#heading=h.adukd8mh74q7
Shourya742 marked this conversation as resolved.
Show resolved Hide resolved
Loading