From 2b870d42676b8e6fadfe5173f685e95e9414958d Mon Sep 17 00:00:00 2001 From: Shourya742 Date: Tue, 27 Aug 2024 09:23:54 +0530 Subject: [PATCH 1/3] add git-hooks --- .githooks/pre-push | 14 +++++++++ CONTRIBUTING.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 90 insertions(+) create mode 100644 .githooks/pre-push create mode 100644 CONTRIBUTING.md diff --git a/.githooks/pre-push b/.githooks/pre-push new file mode 100644 index 0000000..b4010d2 --- /dev/null +++ b/.githooks/pre-push @@ -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..." diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..26411f5 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,76 @@ + +# 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 + + +## 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 to join our community [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 SRI 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 original SRI 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 `dev` branch. To better understand the SRI 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. From 871141b8bd393055a90aab3ab7df3f3c82703800 Mon Sep 17 00:00:00 2001 From: Shourya742 Date: Tue, 27 Aug 2024 16:51:34 +0530 Subject: [PATCH 2/3] add nits --- CONTRIBUTING.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 26411f5..22585b3 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -3,7 +3,7 @@ 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! 🎉 +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 @@ -25,8 +25,7 @@ All types of contributions are encouraged and valued. Please refer to the [Table > Before asking a question, please ensure you’ve read the documentation available in the `docs` directory. -The best way to ask a question is to join our community [Discord](https://discord.com/invite/fsEW23wFYs). The most suitable place to post your question is: -- #benchmarking-tool +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: @@ -49,7 +48,7 @@ Our development calls are scheduled every Tuesday at 18:00 CET. You can see them ### Contribution Workflow -The SRI project follows an open contributor model, where anyone is welcome to contribute through reviews, documentation, testing, and patches. Follow these steps to contribute: +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** @@ -61,7 +60,7 @@ The SRI project follows an open contributor model, where anyone is welcome to co 4. **Commit Your Changes** -5. **Submit a Pull Request**: Once you're satisfied with your changes, submit a pull request to the original SRI 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 `dev` branch. To better understand the SRI branch structure, please refer to [this guide](https://github.com/stratum-mining/stratum/blob/main/RELEASE.md#principal-branches). +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** @@ -74,3 +73,7 @@ The SRI project follows an open contributor model, where anyone is welcome to co 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. + +* [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 \ No newline at end of file From ae760bdbbec69348318dc0e5da883720273e4dda Mon Sep 17 00:00:00 2001 From: Shourya742 Date: Wed, 28 Aug 2024 15:10:04 +0530 Subject: [PATCH 3/3] add project board details --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 22585b3..431714f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -76,4 +76,4 @@ Not sure where to start contributing to SRI? You can begin by looking through is * [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 \ No newline at end of file +Another way to better understand where to focus your contribution is by looking at our project board: https://github.com/orgs/stratum-mining/projects/10 \ No newline at end of file