From bc49f1b15c4c48d1782dbaeca867f00f5735264d Mon Sep 17 00:00:00 2001 From: Ansh Sarkar Date: Mon, 16 May 2022 17:11:22 +0530 Subject: [PATCH 1/3] added community files, updated readme, added documentation for disjoint_sets_and_union --- CODE_OF_CONDUCT.md | 76 +++++++++++++ CONTRIBUTING.md | 101 ++++++++++++++++++ README.md | 39 ++++--- docs/README.md | 31 ++++++ .../disjoint_sets_union/README.md | 67 ++++++++++++ src/data_structures/sparse_table/README.md | 2 +- 6 files changed, 303 insertions(+), 13 deletions(-) create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md create mode 100644 docs/README.md create mode 100644 src/data_structures/disjoint_sets_union/README.md diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..81b217c --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,76 @@ +# Contributor Covenant Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to make participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, sex characteristics, gender identity and expression, +level of experience, education, socio-economic status, nationality, personal +appearance, race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or +reject comments, commits, code, wiki edits, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any contributor for other behaviors that they deem inappropriate, +threatening, offensive, or harmful. + +## Scope + +This Code of Conduct applies within all project spaces, and it also applies when +an individual is representing the project or its community in public spaces. +Examples of representing a project or community include using an official +project e-mail address, posting via an official social media account, or acting +as an appointed representative at an online or offline event. Representation of +a project may be further defined and clarified by project maintainers. + +## Enforcement + +Instances of abusive, harassing, or otherwise unacceptable behavior may be +reported by contacting the project team at [INSERT EMAIL ADDRESS]. All +complaints will be reviewed and investigated and will result in a response that +is deemed necessary and appropriate to the circumstances. The project team is +obligated to maintain confidentiality with regard to the reporter of an incident. +Further details of specific enforcement policies may be posted separately. + +Project maintainers who do not follow or enforce the Code of Conduct in good +faith may face temporary or permanent repercussions as determined by other +members of the project's leadership. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, +available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html + +[homepage]: https://www.contributor-covenant.org + +For answers to common questions about this code of conduct, see +https://www.contributor-covenant.org/faq diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e8af522 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,101 @@ +# Contributing to Competitive-Programming + +First off, thanks for taking the time to contribute! ❤️ + +All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉 + +> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: +> - Star the project +> - Tweet about it +> - Refer this project in your project's readme +> - Mention the project at local meetups and tell your friends/colleagues + +## Table of Contents + +- [I Have a Question](#i-have-a-question) +- [I Want To Contribute](#i-want-to-contribute) + - [Reporting Bugs](#reporting-bugs) + - [Suggesting Enhancements](#suggesting-enhancements) + +## I Have a Question + +> If you want to ask a question, we assume that you have read the available [Documentation](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/docs/README.md). + +Before you ask a question, it is best to search for existing [Issues](https://github.com/OmarBazaraa/Competitive-Programming/issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first. + +If you then still feel the need to ask a question and need clarification, we recommend the following: + +- Open an [Issue](https://github.com/OmarBazaraa/Competitive-Programming/issues/new) +- Provide as much context as you can about what you're running into. +- Provide project and platform versions (compiler, OS, etc), depending on what seems relevant. + +We will then take care of the issue as soon as possible. + +## I Want To Contribute + +> ### Legal Notice +> 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. + +### Reporting Bugs + +#### Before Submitting a Bug Report + +A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible. + +- Make sure that you are using the latest version. +- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/docs/README.md). If you are looking for support, you might want to check [this section](#i-have-a-question)). +- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/OmarBazaraa/Competitive-Programmingissues?q=label%3Abug). +- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue. +- Collect information about the bug: + - Stack trace (Traceback) + - OS, Platform and Version (Windows, Linux, macOS, x86, ARM) + - Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant. + - Possibly your input and the output + - Can you reliably reproduce the issue? And can you also reproduce it with older versions? + +#### How Do I Submit a Good Bug Report? + +> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead in case of sensitive bugs you can directly contact the maintainer via the provided contact details. + +We use GitHub issues to track bugs and errors. If you run into an issue with the project: + +- Open an [Issue](https://github.com/OmarBazaraa/Competitive-Programming/issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.) +- Explain the behavior you would expect and the actual behavior. +- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case. +- Provide the information you collected in the previous section. + +Once it's filed: + +- The project team will label the issue accordingly. +- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced. +- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution). + +> Note : Default Issues as well as Pull Request templates have already been setup, in order to guide you while opening a new Issue or PR. Kindly adhere to the default template in order to enable faster actions. + +### Suggesting Enhancements + +This section guides you through submitting an enhancement suggestion for Competitive-Programming, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions. + +#### Before Submitting an Enhancement + +- Make sure that you are using the latest version. +- Read the [documentation](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/docs/README.md) carefully and find out if the functionality is already covered, maybe by an individual configuration. +- Perform a [search](https://github.com/OmarBazaraa/Competitive-Programming/issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one. +- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library. + +#### How Do I Submit a Good Enhancement Suggestion? + +Enhancement suggestions are tracked as [GitHub issues](https://github.com/OmarBazaraa/Competitive-Programming/issues). + +- Use a **clear and descriptive title** starting with the words ```Enhancement Proposal :``` for the issue and to help identify the suggestion. +- Provide a **step-by-step description of the suggested enhancement** in as many details as possible. +- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you. +- You may want to **include appropriate screenshots** which might help you demonstrate the steps or point out the part which the suggestion is related to. +- **Explain why this enhancement would be useful** to most Competitive-Programming users. You may also want to point out the other projects that solved it better and which could serve as inspiration. + +> Note : Default Issues as well as Pull Request templates have already been setup, in order to guide you while opening a new Issue or PR. Kindly adhere to the default template in order to enable faster actions. + +> Also note that in case you would like to contribute in any other manner, which has not currently been covered by this existing CONTRIBUTIONS.md file, feel free to raise an Issue. It would also help us improve our CONTRIBUTIONS guide and welcome more people to join the community. + +## Attribution +This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)! diff --git a/README.md b/README.md index decfbc6..6ddde9b 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,19 @@ # Competitive Programming -C++ code library contains useful algorithms for competitive programming. +C++ code library containing useful algorithms for competitive programming. -#### PDF Version -[1] You can download an easy printable minified PDF version of this library from [here](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/docs/Momentum%20Library.pdf). +## PDF Version -[2] You can download *Theoretical Computer Science Cheat Sheet* from [here](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/docs/Cheat%20Sheet.pdf). +- You can download an easy printable minified PDF version of this library from [here](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/docs/Momentum%20Library.pdf). + +- You can download *Theoretical Computer Science Cheat Sheet* from [here](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/docs/Cheat%20Sheet.pdf). ## Content -A brief explanation to each of the following topics will be added soon, hopefully. +A brief explanation to each of the following topics is currently under progress. Your contributions are most welcome. Kindly check the CONTRIBUTIONS.md file for more infortmation about contrbuting to the project. ### Data Structures + - [Sparse Table](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/data_structures/sparse_table) - [Monotonic Queue](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/data_structures/monotonic_queue) - [Implemented with two stacks](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/data_structures/monotonic_queue/monotonic_queue_using_stacks.cpp) @@ -28,11 +30,12 @@ A brief explanation to each of the following topics will be added soon, hopefull - [Persistent Segment Tree](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/data_structures/segment_tree/persistent_segment_tree.cpp) - [Segment Tree as Multiset](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/data_structures/segment_tree/segment_tree_multiset.cpp) - [Treap](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/data_structures/treap) - - Splay Tree **(comming soon)** + - Splay Tree **(comming soon)** - [SQRT Decomposition](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/data_structures/sqrt_decomposition) - [Mo's Algorithm](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/data_structures/sqrt_decomposition/mo_algorithm.cpp) ### Strings + - [KMP](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/strings/KMP) - [Z-Algorithm](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/strings/z_algorithm) - [Trie](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/strings/trie) @@ -44,6 +47,7 @@ A brief explanation to each of the following topics will be added soon, hopefull - Aho Corasick's Algorithm **(comming soon)** ### Graphs + - [Graph Traversal and Representation](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/graphs/traversal) - [Optimized Representation](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/graphs/traversal/graph_traversal_static.cpp) - [DFS](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/graphs/traversal/graph_traversal.cpp#L14) @@ -77,6 +81,7 @@ A brief explanation to each of the following topics will be added soon, hopefull - [Bridge Tree](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/graphs/others/bridge_tree.cpp) ### Math + - [Basic Discrete Math & Modular Arithmetics](https://github.com/OmarBazaraa/Competitive-Programming/tree/master/src/math) - [Greatest Common Divisor (GCD)](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/math/math.cpp#L9) - [Least Common Multiple (LCM)](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/math/math.cpp#L29) @@ -97,26 +102,36 @@ A brief explanation to each of the following topics will be added soon, hopefull - [Matrix Power](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/math/matrix_minified.cpp) ### Geomerty + Will be added soon... ### Search Algorithms + - [Binary Search](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/search/binary_search.cpp) - [Ternary Search](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/search/ternary_search.cpp) -### Sorting Algorithms **(comming soon)** +### Sorting Algorithms **(comming soon)** + - Heap Sort - Merge Sort - Quick Sort - Radix Sort ### Other Algorithms + - [K-th Order Statistic](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/others/kth_order_statistic.cpp) - [Longest Increasing Sub-sequence (LIS)](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/others/others.cpp) - [Stress test code](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/others/stress.cpp) - [Code definitions](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/others/others.cpp) -## Thanks -Special thanks to anyone contributed to this repository: -- By teaching me any of these topics. -- By inspiring me any code optimizations. -- By being supportive. +## Get started + +```CONTRIBUTIONS.md``` : Tells you everything you need to know in order get started with contributions to this project. Make sure to give it a thorough read. Thank you for contribution in advance. + +```CODE_OF_CONDUCT.md``` : These are the set of rules ( subject to updates ) which define the code of conduct in this community. Kindly adhere to these guidelines in order to make the project more inclusive. + +```docs``` : Contains all the information, explanation and implementation details you would require to get started with the Data Structures and Algorithms implemented in this project. + +```ISSUE_TEMPLATES``` : Default issue templates have already been defined, but in case you would like to submit an issue in some other format, feel free to check out the various templates available. + +```PR_TEMPLATES``` : Default pull request templates have already been defined, but in case you would like to submit a PR in some other format, feel free to check out the various templates available. \ No newline at end of file diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..e8bc915 --- /dev/null +++ b/docs/README.md @@ -0,0 +1,31 @@ +# Documentation : Competitive-Programming + +First off, thanks for deciding to go through the documentation of Competitive-Programming. In case you find any issues, kindly free to contribute and help us improve. You can always refer to the ```CONTRIBUTIONS.md``` guidelines. + +Here are a few more resources you can check out + +- Cheat Sheet.pdf +- Momentum Library - .docx / .pdf + +> Also if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about: +> - Star the project +> - Tweet about it +> - Refer this project in your project's readme +> - Mention the project at local meetups and tell your friends/colleagues + +## Documentation for Implementation of Specific Data Structures or Algorithms + +Every Data Structure and Algorithm implementation is located in its own dedicated folder consisting ( as of now ) 2 files. + +``` +| Root Folder + | .cpp : C++ Source Code + | README.md : Guide and Implementation Details +``` + +Any new addition needs to be done in the exact same format in order to maintain consistency across the project directory structure. Kindly refer to the README.md file available under the respective implemetation in order to better understand its implementation and usage. + + +> Note : Default Issues as well as Pull Request templates have already been setup, in order to guide you while opening a new Issue or PR. Kindly adhere to the default template in order to enable faster actions. + +> Also note that in case you would like to contribute in any other manner, which has not currently been covered by this existing CONTRIBUTIONS.md file, feel free to raise an Issue. It would also help us improve our CONTRIBUTIONS guide and welcome more people to join the community. diff --git a/src/data_structures/disjoint_sets_union/README.md b/src/data_structures/disjoint_sets_union/README.md new file mode 100644 index 0000000..6888198 --- /dev/null +++ b/src/data_structures/disjoint_sets_union/README.md @@ -0,0 +1,67 @@ +# Disjoint Sets Union ( DSU ) + +The Disjoint-Set data structure (also called the union-find data structure), keeps track of elements partitioned in non overlapping subsets i.e, **Disjoint Sets**. + +It offers useful operations such as : + +- ```unionSets()``` : To merge the two sets to which the given elements belong. +- ```findSetId()``` : To find leader / parent of a set to which an element belongs. +- ```areInSameSet()``` : To check if 2 given elements belong to the same set. +- ```getSetSize()``` : Get the size of a given **Disjoint Component**. +- ```getSetsCount()``` : Get the number of **Disjoint Sets** represented in the DSU. + +Since this data structure is easy to implement, it's use can be seen extensively in problems related to graph connectivity. + +More formally, two sets are said to be **Disjoint** if their intersection ```ϕ``` i.e. ```NULL```. Therefore, a Disjoint-Set is a Data Structure that keeps and tracks the records of a set of elements partitioned into several non-overlapping (Disjoint) subsets. + +For Example, let there be 3 sets : + +- ```A := {1, 2, 3, 4, 5}``` +- ```B := {3, 5, 9, 12}``` +- ```C := {6, 7, 18, 21}``` + +| Intersection | Result | +| ----------------------------------|:------------------------------------------:| +| ```A and B``` | ```{3, 5} -> Not Disjoint``` | +| ```A and C``` | ```{} -> Disjoint``` | + +## DSU Structure + +The DSU comprises of multiple componenets and internal states coming together to represent all the **Disjoint Sets** formed by the given set of elements. + +In the implementation provided, the DSU utilizes the presence of 3 primary variables + +- ```int setsCount``` : It is used to keep a track of the count of the number of **Disjoint Sets** currently represented by the DSU. +```initial value : set to n, passed as argument to constructor``` + +- ```vector siz``` : It is a vector which is responsible for storing the size of the **Disjoint Set** to which a particular element belongs, i.e. ```siz[i]``` tells us the size of the **Disjoint Set** to which the ```ith``` element belong to. +```initial value : size = n, all values set to 1``` + +- ```mutable vector par``` : It is a vector which is used to store the parent of the **Disjoint Set** to which a particular element belongs, i.e. ```par[i]``` returns the id of the parent of the **Disjoint Set** to which the ```ith``` element belongs to. +```initial value : size = n, all values set to their respective indices as initially every element is a parent of itself.``` + +We can build the DSU ```O(n)``` as follows : + +```C++ +/** + * Initializes the DSU with "n" independent sets. + * + * @param n the number of sets to initialize. +*/ +DSU(int n) { + setsCount = n; + siz.resize(n, 1); + par.resize(n); + iota(par.begin(), par.end(), 0); +} +``` + +## Full Implementation + +You can find the full implementation of the sparse table [here](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/data_structures/disjoint_sets_union/disjoint_sets_union.cpp). + +The above implementation of a DSU represents it in its most basic form and can be used as a template in order to derieve more powerful versions based on requirements. + +## Problems + +```Coming up soon !``` diff --git a/src/data_structures/sparse_table/README.md b/src/data_structures/sparse_table/README.md index f77e2bc..7e47d27 100644 --- a/src/data_structures/sparse_table/README.md +++ b/src/data_structures/sparse_table/README.md @@ -57,7 +57,7 @@ return min(x, y); ``` ## Full Implementation -You can find the full implementation of the sparse table [here](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/data_structures/sparse_table/sparse_table.cpp). +You can find the full implementation of the sparse table [here](https://github.com/OmarBazaraa/Competitive-Programming/blob/master/src/data_structures/sparse_table/sparse_table.cpp). The above implementation is an example of sparse table the computes the index of the minimum element in the range **_[L, R]_** From 51c2b4747cc4536185dfcbee0fd6c6a439b1796c Mon Sep 17 00:00:00 2001 From: Ansh Sarkar Date: Mon, 16 May 2022 17:16:27 +0530 Subject: [PATCH 2/3] added default issue and pull request templates --- ISSUE_TEMPLATES/DEFAULT_ISSUE_TEMPLATE.md | 45 +++++++++++++++++++++++ PR_TEMPLATES/DEFAULT_PR_TEMPLATE.md | 35 ++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 ISSUE_TEMPLATES/DEFAULT_ISSUE_TEMPLATE.md create mode 100644 PR_TEMPLATES/DEFAULT_PR_TEMPLATE.md diff --git a/ISSUE_TEMPLATES/DEFAULT_ISSUE_TEMPLATE.md b/ISSUE_TEMPLATES/DEFAULT_ISSUE_TEMPLATE.md new file mode 100644 index 0000000..3e177da --- /dev/null +++ b/ISSUE_TEMPLATES/DEFAULT_ISSUE_TEMPLATE.md @@ -0,0 +1,45 @@ +# Prerequisites + +```Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.**``` + +- [ ] I am running the latest version +- [ ] I checked the documentation and found no answer +- [ ] I checked to make sure that this issue has not already been filed +- [ ] I'm reporting the issue to the correct repository (for multi-repository projects) + +## Expected Behavior + +```Please describe the behavior you are expecting``` + +## Current Behavior / Question + +```What is the current behavior?``` + +## Failure Information (for bugs) + +**Remove everything after this if it is a question and not a bug report.** + +```Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.``` + +## Steps to Reproduce + +```Please provide detailed steps for reproducing the issue.``` + +1. step 1 +2. step 2 +3. You Get It . . . + +## Context + +```Please provide any relevant information about your setup.``` +```This is important in case the issue is not reproducible except for under certain conditions.``` + +* Firmware Version: +* Operating System: +* SDK version: +* Toolchain version: +* Other Details . . . + +## Failure Logs + +```Please include any relevant log snippets or files here.``` diff --git a/PR_TEMPLATES/DEFAULT_PR_TEMPLATE.md b/PR_TEMPLATES/DEFAULT_PR_TEMPLATE.md new file mode 100644 index 0000000..48e0d31 --- /dev/null +++ b/PR_TEMPLATES/DEFAULT_PR_TEMPLATE.md @@ -0,0 +1,35 @@ + + +## Description + +``` Describe your changes in detail ``` + +## Motivation and Context + +``` Why is this change required? What problem does it solve? ``` +``` If it fixes an open issue, please link to the issue here. ``` + +## How has this been tested? + +``` Please describe in detail how you tested your changes. ``` +``` Include details of your testing environment, tests ran to see how ``` +``` your change affects other areas of the code, etc. ``` + +## Screenshots (if appropriate): + +## Types of changes + +``` What types of changes does your code introduce? Put an `x` in all the boxes that apply: ``` + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) + +## Checklist: + +``` Go over all the following points, and put an `x` in all the boxes that apply. ``` +``` If you're unsure about any of these, don't hesitate to ask. We're here to help! ``` + +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly. From 9f454b614eb1a22e05befaf1c71fffcf6ff9cbca Mon Sep 17 00:00:00 2001 From: Ansh Sarkar Date: Mon, 16 May 2022 17:18:40 +0530 Subject: [PATCH 3/3] added default issues and PR templates to .github --- .github/ISSUE_TEMPLATE.md | 45 ++++++++++++++++++++++++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 35 +++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md new file mode 100644 index 0000000..3e177da --- /dev/null +++ b/.github/ISSUE_TEMPLATE.md @@ -0,0 +1,45 @@ +# Prerequisites + +```Please answer the following questions for yourself before submitting an issue. **YOU MAY DELETE THE PREREQUISITES SECTION.**``` + +- [ ] I am running the latest version +- [ ] I checked the documentation and found no answer +- [ ] I checked to make sure that this issue has not already been filed +- [ ] I'm reporting the issue to the correct repository (for multi-repository projects) + +## Expected Behavior + +```Please describe the behavior you are expecting``` + +## Current Behavior / Question + +```What is the current behavior?``` + +## Failure Information (for bugs) + +**Remove everything after this if it is a question and not a bug report.** + +```Please help provide information about the failure if this is a bug. If it is not a bug, please remove the rest of this template.``` + +## Steps to Reproduce + +```Please provide detailed steps for reproducing the issue.``` + +1. step 1 +2. step 2 +3. You Get It . . . + +## Context + +```Please provide any relevant information about your setup.``` +```This is important in case the issue is not reproducible except for under certain conditions.``` + +* Firmware Version: +* Operating System: +* SDK version: +* Toolchain version: +* Other Details . . . + +## Failure Logs + +```Please include any relevant log snippets or files here.``` diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..48e0d31 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,35 @@ + + +## Description + +``` Describe your changes in detail ``` + +## Motivation and Context + +``` Why is this change required? What problem does it solve? ``` +``` If it fixes an open issue, please link to the issue here. ``` + +## How has this been tested? + +``` Please describe in detail how you tested your changes. ``` +``` Include details of your testing environment, tests ran to see how ``` +``` your change affects other areas of the code, etc. ``` + +## Screenshots (if appropriate): + +## Types of changes + +``` What types of changes does your code introduce? Put an `x` in all the boxes that apply: ``` + +- [ ] Bug fix (non-breaking change which fixes an issue) +- [ ] New feature (non-breaking change which adds functionality) +- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected) + +## Checklist: + +``` Go over all the following points, and put an `x` in all the boxes that apply. ``` +``` If you're unsure about any of these, don't hesitate to ask. We're here to help! ``` + +- [ ] My code follows the code style of this project. +- [ ] My change requires a change to the documentation. +- [ ] I have updated the documentation accordingly.