From c24422fd35d84a3bb2c40ec7b68f43c714b50123 Mon Sep 17 00:00:00 2001 From: bhaumikmistry Date: Wed, 13 Nov 2019 12:23:29 -0500 Subject: [PATCH 1/5] docs changes to readme files, reformat --- README.md | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 81367fcb4..5418b6316 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,13 @@ -# C++ +# The Algorithms - C++ +[![contributions welcome](https://img.shields.io/static/v1.svg?label=Contributions&message=Welcome&color=0059b3&style=flat-square)](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTION.md)  +![GitHub repo size](https://img.shields.io/github/repo-size/TheAlgorithms/C-Plus-Plus?color=red&style=flat-square) +![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/TheAlgorithms/C-Plus-Plus?color=green&style=flat-square) -This repository contains some useful algorithms and data structures. +### All algorithms implemented in C++ (for education) +The implementations are for learning purpose. They may be less efficient than the implementation in the standard library. -### Contribute +### Contribute Guidelines +Read our [Contribution Guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/README.md) before you contribute How you can contribute? See this small guide. -* Use the directory structure of the repository. -* Please describe your pull requests. -* Don't use **bits/stdc++.h** because this is quite Linux specific and slows down the compiler process. -* Put comments in your code. -* Avoid **struct**. Instead use the **class** keyword. -* Add some test cases in the main-function. -* Can suggest any change in present algorithms(if needed). \ No newline at end of file From 08ed2e21aa0a3f0629f16b3cf8dd4e96ea165d07 Mon Sep 17 00:00:00 2001 From: bhaumikmistry Date: Wed, 13 Nov 2019 12:23:59 -0500 Subject: [PATCH 2/5] feat add contribution file with much more details --- CONTRIBUTION.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 CONTRIBUTION.md diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md new file mode 100644 index 000000000..58d2bc828 --- /dev/null +++ b/CONTRIBUTION.md @@ -0,0 +1,65 @@ +# CONTRIBUTION GUIDELINES + +## Before contributing +Welcome to [TheAlgorithms/c-plus-plus](https://github.com/TheAlgorithms/C-Plus-Plus)! Before sending your pull requests, make sure that you **read the whole guidelines**. If you have any doubt on the contribution guide, please feel free to state it clearly in [an issues](https://github.com/TheAlgorithms/C-Plus-Plus/issues/new/choose). + +## Contributing +--- +### Contributor +We are very happy that you consider implementing algorithms and data structure for others! This repository is referenced and used by learners from all over the globe. Being one of our contributors, you agree and confirm that: + +- You did your work. + - No plagiarism allowed. Any plagiarized work will not be merged. +- Your work will be distributed under [MIT License](License) Once your pull request is merged. +- You submitted work fulfils or mostly fulfils our styles and standards. + +**New implementation** New implementation are welcome! +**Improving comments** and **Adding test cases** are also highly welcome. + +### Making Changes + +#### Code +- Use the directory structure of the repository. +- File extension for code should be *.h *.cpp. +- Don't use **bits/stdc++.h** because this is quite Linux specific and slows down the compiler process. +- Avoid using **struct**. Instead use the **class** keyword. +- You can suggest any change in present algorithms(if needed). +- Strictly use snake_case (underscore_separated) in your file names, later to be used by a script. +- If you have modified/added code work, make sure the code compiles before submitting. +- **Be consistent in use of there guidelines when submitting** + +#### Commit Guidelines +- It is recommended to keep your changes grouped logically within individual commits. Contributors and Reviews find it easier to review changes that are silt across multiple commits. +``` +git add file_xyz.cpp +git commit -m "your message" +``` +Examples of commit messages with semantic prefixes: +``` +fix: xyz algorithm bug +feat: add xyx algorithm, class xyz +test: add test for xyz algorithm +docs: add comments and explanation to xyz algorithm +``` +Common prefixes: +- fix: A bug fix +- feat: A new feature +- docs: Documentation changes +- test: Adding missing tests or correcting existing tests + +#### Documentation +- Make sure you put comments in your code. +- Please avoid creating a new directories if at all possible. Try to fit your work into existing directory structure. If you want to create one, please check if the same category has been recently suggested or created by another pull request. +- If you have modified/added documentation work, ensure your language is concise and contains no grammar errors. +- Do not update the README.md along with other changes, first create an issue and link that issue with the pull request to suggest specific changes to README.md + +#### test +- Make sure you add test cases and examples in the main-function. +- If you find any algorithm or document without tests please feel free to create issue of suggest changes. + +### Pull Requests +- Checkout our [pull request template](https://github.com/TheAlgorithms/C-Plus-Plus/.github/pull_request_template.md) + +- Most importantly, + - Happy coding! + From b66f9a569c3468a31944a8afb451c2a38b5a369d Mon Sep 17 00:00:00 2001 From: bhaumikmistry Date: Wed, 13 Nov 2019 12:24:32 -0500 Subject: [PATCH 3/5] feat add pull request template for future contribution guide --- .github/pull_request_template.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/pull_request_template.md diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 000000000..038ba8842 --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,20 @@ +#### Description of Change + + +#### Checklist + + +- [ ] Added description of change +- [ ] Added tests and example, test passes +- [ ] Relevant documentation/comments is changed or added +- [ ] PR title follows semantic [commit guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/CONTRIBUTION.md#Commit-Guidelines) +- [ ] Search previous suggestions before making a new one, as yours may be a duplicate. +- [ ] Sort by alphabetical order +- [ ] I acknowledge that all my contributions will be made under the project's license. + +Notes: \ No newline at end of file From a968f90ea7b85abb7d86473d1b261e3661cfe66e Mon Sep 17 00:00:00 2001 From: bhaumikmistry Date: Wed, 13 Nov 2019 12:34:12 -0500 Subject: [PATCH 4/5] fix add fixes to latest contribution.md file --- CONTRIBUTION.md | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md index 58d2bc828..1f68f9cd5 100644 --- a/CONTRIBUTION.md +++ b/CONTRIBUTION.md @@ -4,7 +4,6 @@ Welcome to [TheAlgorithms/c-plus-plus](https://github.com/TheAlgorithms/C-Plus-Plus)! Before sending your pull requests, make sure that you **read the whole guidelines**. If you have any doubt on the contribution guide, please feel free to state it clearly in [an issues](https://github.com/TheAlgorithms/C-Plus-Plus/issues/new/choose). ## Contributing ---- ### Contributor We are very happy that you consider implementing algorithms and data structure for others! This repository is referenced and used by learners from all over the globe. Being one of our contributors, you agree and confirm that: @@ -29,7 +28,7 @@ We are very happy that you consider implementing algorithms and data structure f - **Be consistent in use of there guidelines when submitting** #### Commit Guidelines -- It is recommended to keep your changes grouped logically within individual commits. Contributors and Reviews find it easier to review changes that are silt across multiple commits. +- It is recommended to keep your changes grouped logically within individual commits. Contributors find it easier to review changes that are silt across multiple commits. ``` git add file_xyz.cpp git commit -m "your message" @@ -53,13 +52,12 @@ Common prefixes: - If you have modified/added documentation work, ensure your language is concise and contains no grammar errors. - Do not update the README.md along with other changes, first create an issue and link that issue with the pull request to suggest specific changes to README.md -#### test +#### Test - Make sure you add test cases and examples in the main-function. - If you find any algorithm or document without tests please feel free to create issue of suggest changes. ### Pull Requests -- Checkout our [pull request template](https://github.com/TheAlgorithms/C-Plus-Plus/.github/pull_request_template.md) +- Checkout our [pull request template](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/.github/pull_request_template.md) - Most importantly, - - Happy coding! - + - Happy coding! \ No newline at end of file From b0a97adb4a3224baceae3946d7952024f53912d9 Mon Sep 17 00:00:00 2001 From: Yang Libin Date: Thu, 14 Nov 2019 19:23:55 +0800 Subject: [PATCH 5/5] docs: update README.md --- README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/README.md b/README.md index 5418b6316..9ca63afac 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,4 @@ The implementations are for learning purpose. They may be less efficient than the implementation in the standard library. ### Contribute Guidelines -Read our [Contribution Guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/README.md) before you contribute - -How you can contribute? See this small guide. - +Read our [Contribution Guidelines](https://github.com/TheAlgorithms/C-Plus-Plus/blob/master/README.md) before you contribute.