Debian Codegraph @

ansible_collections/dellemc/openmanage/docs/CONTRIBUTING.md

raw symbols SCIP
1 <!--
2 Copyright (c) 2022 Dell Inc., or its subsidiaries. All Rights Reserved.
3
4 Licensed under the GPL, Version 3.0 (the "License");
5 you may not use this file except in compliance with the License.
6 You may obtain a copy of the License at
7
8 https://www.gnu.org/licenses/gpl-3.0.txt
9 -->
10
11 # How to Contribute
12
13 Become one of the contributors to this project! We thrive to build a welcoming and open community for anyone who wants to use the project or contribute to it. There are just a few small guidelines you need to follow. To help us create a safe and positive community experience for all, we require all participants to adhere to the [Code of Conduct](CODE_OF_CONDUCT.md).
14
15 ## Table of Contents
16
17 * [Become a contributor](#Become-a-contributor)
18 * [Contributor agreement](#Contributor-agreement)
19 * [Submitting issues](#Submitting-issues)
20 * [Triage issues](#Triage-issues)
21 * [Your first contribution](#Your-first-contribution)
22 * [Branching](#Branching)
23 * [Signing your commits](#Signing-your-commits)
24 * [Pull requests](#Pull-requests)
25 * [Code reviews](#Code-reviews)
26 * [Code Style](#Code-style)
27
28 ## Become a contributor
29
30 You can contribute to this project in several ways. Here are some examples:
31
32 * Contribute to the project documentation and codebase.
33 * Report and triage bugs.
34 * Feature requests
35 * Write technical documentation and blog posts, for users and contributors.
36 * Help others by answering questions about this project.
37
38 ## Contributor Agreement
39 All contributions shall be made under the Developer Certification of Origin ("DCO") (see http://elinux.org/Developer_Certificate_Of_Origin) which is reproduced below. Specifically, the Git commit message for the contribution should contain the following tag information signifying use of the DCO:
40
41
42 "Signed-off-by: [Your Name] [[email protected]]"
43
44
45 ________________________________________
46 ### Developer's Certificate of Origin 1.1
47 By making a contribution to this project, I certify that:
48
49 (a) The contribution was created in whole or in part by me and I have the right to submit it under the open source license indicated in the file; or
50
51 (b) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate open source license and I have the right under that license to submit that work with modifications, whether created in whole or in part by me, under the same open source license (unless I am permitted to submit under a different license), as indicated in the file; or
52
53 (c) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it.
54
55 (d) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the open source license(s) involved.
56
57 ## Submitting issues
58
59 All issues related to the associated Ansible modules, roles, playbooks, regardless of the service/repository the issue belongs to (see table above), should be submitted [here](https://github.com/dell/dellemc-openmanage-ansible-modules/issues). Issues will be triaged and labels will be used to indicate the type of issue. This section outlines the types of issues that can be submitted.
60
61 ### Report bugs
62
63 We aim to track and document everything related to the repository via the Issues page. The code and documentation are released with no warranties or SLAs and are intended to be supported through a community driven process.
64
65 Before submitting a new issue, make sure someone hasn't already reported the problem. Look through the [existing issues](https://github.com/dell/dellemc-openmanage-ansible-modules/issues) for similar issues.
66
67 Report a bug by submitting a [bug report](https://github.com/dell/dellemc-openmanage-ansible-modules/issues/new?labels=type%2Fbug%2C+needs-triage&template=bug_report.md&title=%5BBUG%5D%3A). Make sure that you provide as much information as possible on how to reproduce the bug.
68
69 When opening a Bug please include the following information to help with debugging:
70
71 1. Version of relevant software: this software, Python version, Dell Server/Storage Platform, etc.
72 2. Details of the issue explaining the problem: what, when, where
73 3. The expected outcome that was not met (if any)
74 4. Supporting troubleshooting information. __Note: Do not provide private company information that could compromise your company's security.__
75
76 An Issue __must__ be created before submitting any pull request. Any pull request that is created should be linked to an Issue.
77
78 ### Feature request
79
80 If you have an idea of how to improve this project, submit a [feature request](https://github.com/dell/dellemc-openmanage-ansible-modules/issues/new?labels=type%2Ffeature-request%2C+needs-triage&template=feature_request.md&title=%5BFEATURE%5D%3A).
81
82 ### Answering questions
83
84 If you have a question and you can't find the answer in the documentation or issues, the next step is to submit a [question.](https://github.com/dell/dellemc-openmanage-ansible-modules/issues/new?labels=type%2Fquestion&template=ask-a-question.md&title=%5BQUESTION%5D%3A)
85
86 We'd love your help answering questions being asked by other CSM users.
87
88 ## Triage issues
89
90 Triage helps ensure that issues resolve quickly by:
91
92 * Ensuring the issue's intent and purpose is conveyed precisely. This is necessary because it can be difficult for an issue to explain how an end user experiences a problem and what actions they took.
93 * Giving a contributor the information they need before they commit to resolving an issue.
94 * Lowering the issue count by preventing duplicate issues.
95 * Streamlining the development process by preventing duplicate discussions.
96
97 If you don't have the knowledge or time to code, consider helping with _issue triage_. The Dell Ansible community will thank you for saving them time by spending some of yours.
98
99 Read more about the ways you can [Triage issues](ISSUE_TRIAGE.md).
100
101 ## Your first contribution
102
103 Unsure where to begin contributing? Start by browsing issues labeled `beginner friendly` or `help wanted`.
104
105 * [Beginner-friendly](https://github.com/dell/dellemc-openmanage-ansible-modules/issues?q=is%3Aopen+is%3Aissue+label%3A%22beginner+friendly%22) issues are generally straightforward to complete.
106 * [Help wanted](https://github.com/dell/dellemc-openmanage-ansible-modules/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) issues are problems we would like the community to help us with regardless of complexity.
107
108 When you're ready to contribute, it's time to create a pull request.
109
110 ## Testing
111 See [here](https://github.com/dell/dellemc-openmanage-ansible-modules/tree/collections/tests/README.md) for further information on testing.
112
113 ## Debugging
114 To debug OpenManage Ansible Modules using IDE, see [here](https://github.com/dell/dellemc-openmanage-ansible-modules/tree/collections/docs/DEBUG.md)
115
116 ## Branching
117
118 * [Branching Strategy](BRANCHING.md)
119
120 ## Signing your commits
121
122 We require that developers sign off their commits to certify that they have permission to contribute the code in a pull request. This way of certifying is commonly known as the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). We encourage all contributors to read the DCO text before signing a commit and making contributions.
123
124 GitHub will prevent a pull request from being merged if there are any unsigned commits.
125
126 ### Signing a commit
127
128 GPG (GNU Privacy Guard) will be used to sign commits. Follow the instructions [here](https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/signing-commits) to create a GPG key and configure your GitHub account to use that key.
129
130 Make sure you have your user name and e-mail set. This will be required for your signed commit to be properly verified. Check the following references:
131
132 * Setting up your github user name [reference](https://help.github.com/articles/setting-your-username-in-git/)
133 * Setting up your e-mail address [reference](https://help.github.com/articles/setting-your-commit-email-address-in-git/)
134
135 Once Git and your GitHub account have been properly configured, you can add the -S flag to the git commits:
136
137 ```console
138 $ git commit -S -m your commit message
139 # Creates a signed commit
140 ```
141
142 ### Commit message format
143
144 This repository uses the guidelines for commit messages outlined in [How to Write a Git Commit Message](https://chris.beams.io/posts/git-commit/)
145
146 ## Pull Requests
147
148 If this is your first time contributing to an open-source project on GitHub, make sure you read about [Creating a pull request](https://help.github.com/en/articles/creating-a-pull-request).
149
150 A pull request must always link to at least one GitHub issue. If that is not the case, create a GitHub issue and link it.
151
152 To increase the chance of having your pull request accepted, make sure your pull request follows these guidelines:
153
154 * Title and description matches the implementation.
155 * Commits within the pull request follow the formatting guidelines.
156 * The pull request closes one related issue.
157 * The pull request contains necessary tests that verify the intended behavior.
158 * If your pull request has conflicts, rebase your branch onto the main branch.
159
160 If the pull request fixes a bug:
161
162 * The pull request description must include `Fixes #<issue number>`.
163 * To avoid regressions, the pull request should include tests that replicate the fixed bug.
164
165 The owning team _squashes_ all commits into one when we accept a pull request. The title of the pull request becomes the subject line of the squashed commit message. We still encourage contributors to write informative commit messages, as they becomes a part of the Git commit body.
166
167 We use the pull request title when we generate change logs for releases. As such, we strive to make the title as informative as possible.
168
169 Make sure that the title for your pull request uses the same format as the subject line in the commit message.
170
171 ### Quality Gates for pull requests
172
173 GitHub Actions are used to enforce quality gates when a pull request is created or when any commit is made to the pull request. These GitHub Actions enforce our minimum code quality requirement for any code that get checked into the code repository. If any of the quality gates fail, it is expected that the contributor will look into the check log, understand the problem and resolve the issue. If help is needed, please feel free to reach out the maintainers of the project for [support](SUPPORT.md).
174
175 #### Code build/test/coverage
176
177 [GitHub action](https://github.com/dell/dellemc-openmanage-ansible-modules/actions) that runs unit tests and checks that the code coverage of each package meets a configured threshold (currently 90%). An error is flagged if a given pull request does not meet the test coverage threshold and blocks the pull request from being merged.
178
179 ## Code Reviews
180
181 All submissions, including submissions by project members, require review. We use GitHub pull requests for this purpose. Consult [GitHub Help](https://help.github.com/articles/about-pull-requests/) for more information on using pull requests.
182
183 A pull request must satisfy following for it to be merged:
184
185 * A pull request will require at least 2 maintainer approvals.
186 * Maintainers must perform a review to ensure the changes adhere to guidelines laid out in this document.
187 * If any commits are made after the PR has been approved, the PR approval will automatically be removed and the above process must happen again.
188
189 ## Code Style
190
191 For the Python code in the repository, we expect the code styling outlined in [Ansible python guide]( https://docs.ansible.com/ansible/latest/dev_guide/developing_python_3.html). In addition to this, we have the following supplements:
192 * Contributions should adhere to ansible Coding standard guidelines as we follow these standards.
193 * Should include [test](https://github.com/dell/dellemc-openmanage-ansible-modules/blob/collections/tests/) scripts for your changes.
194 * Do not submit a contribution request on our deprecated modules. They are just meant for backward compatibility.
195
196 ### Handle Errors
197 TBD