|
| 1 | +<!-- SPDX-FileCopyrightText: 2022 RTE FRANCE --> |
| 2 | +<!-- --> |
| 3 | +<!-- SPDX-License-Identifier: Apache-2.0 --> |
| 4 | +# Contributing to CoMPAS |
| 5 | + |
| 6 | +First off, thanks for taking the time to contribute! |
| 7 | + |
| 8 | +The following is a set of guidelines for contributing to the CoMPAS project. These are mostly guidelines, sometimes rules. |
| 9 | +Use your best judgment, and feel free to propose changes to this document in a pull request. |
| 10 | + |
| 11 | +#### Table Of Contents |
| 12 | + |
| 13 | +[Code of Conduct](#code-of-conduct) |
| 14 | + |
| 15 | +[License and Developer Certificate of Origin](#license-and-developer-certificate-of-origin) |
| 16 | + |
| 17 | +[How Can I Contribute?](#how-can-i-contribute) |
| 18 | +* [Community refinements](#community-refinements) |
| 19 | +* [Reporting Bugs and Suggesting Enhancements](#reporting-bugs-and-suggesting-enhancements) |
| 20 | +* [Contributing Code](#contributing-code) |
| 21 | +* [Tools to contribute](#tools-to-contribute) |
| 22 | +* [Definition of Done](#definition-of-done) |
| 23 | +* [Copyright Guidelines](#definition-of-done) |
| 24 | +* [How-to begin](#how-to-begin) |
| 25 | +* [Copyright and Licensing](#copyright-and-licensing) |
| 26 | +* [Github Project Boards](#github-project-boards) |
| 27 | + |
| 28 | +[Github Pages](#github-pages) |
| 29 | + |
| 30 | + |
| 31 | +## Code of Conduct |
| 32 | + |
| 33 | +This project applies the [LF Energy Code of Conduct](https://www.lfenergy.org/about/code-of-conduct/). |
| 34 | +By participating, you are expected to uphold this code. Please report unacceptable behavior to the project's |
| 35 | +Technical Steering Committee [[email protected]](mailto:[email protected]). |
| 36 | + |
| 37 | +## License and Developer Certificate of Origin |
| 38 | + |
| 39 | +By contributing to the CoMPAS project, you accept and agree to the following terms and conditions for your present and future contributions submitted to CoMPAS. |
| 40 | + |
| 41 | +All contributions to this project are licensed under the license stipulated at the corresponding sub-repository. |
| 42 | +Except where otherwise explicitely indicated, CoMPAS is an open source project licensed under the [Apache License, version 2.0](http://www.apache.org/licenses/LICENSE-2.0/). |
| 43 | + |
| 44 | +The project requires the use of the [Developer Certificate of Origin (DCO)](https://developercertificate.org/). |
| 45 | +The DCO is a legally binding statement asserting that you are you have the right to submit your contribution and to license it under the project's applicable license. |
| 46 | + |
| 47 | +Contributors sign-off that they adhere to the term of the DCO by adding a ``Signed-off-by`` line to commit messages. The DCO sign-off must be attached to every contribution made by every contributor. |
| 48 | + |
| 49 | +Here is an example ``Signed-off-by`` line, that indicates the contributor accepts the DCO: |
| 50 | + |
| 51 | +```` |
| 52 | +This is my commit message. |
| 53 | +
|
| 54 | +Signed-off-by: Name Surname <[email protected]> |
| 55 | +```` |
| 56 | +You can write it manually but Git even has a -s command line option to append this automatically to your commit message: |
| 57 | +```` |
| 58 | +$ git commit -s -m 'This is my commit message' |
| 59 | +```` |
| 60 | + |
| 61 | +Note that checks will be performed during the integration in order to require that commits in a Pull Request contain valid ``Signed-off-by`` lines. |
| 62 | + |
| 63 | +## How Can I Contribute? |
| 64 | + |
| 65 | +## Community refinements |
| 66 | + |
| 67 | +Every monday there is a CoMPAS Community Refinement at 10AM CET. The event is available at the CoMPAS mailing list [calendar](https://lists.lfenergy.org/g/CoMPAS/calendar) and can be subscribed to. |
| 68 | + |
| 69 | +### Prepared topics |
| 70 | + |
| 71 | +Every friday before the refinement meeting on Monday, all topics are published on the #compas channel on our [LFEnergy Slack](https://lfenergy.slack.com/). |
| 72 | + |
| 73 | +### Add your own topics |
| 74 | + |
| 75 | +Everybody can suggest topics for the refinement. To do this, join the [LFEnergy Slack](https://lfenergy.slack.com/) if not already, and put your topics in the #compas channel. You can just do this by writing a message like "I want to add something to the refinement this monday, namely..." or add a comment to the already prepared topics if available (see [Prepared topics](#prepared-topics)). |
| 76 | + |
| 77 | +### Reporting Bugs and Suggesting Enhancements |
| 78 | + |
| 79 | +Bugs and enhancement suggestions are tracked as [GitHub issues](https://guides.github.com/features/issues/). Create an issue in the repository where it belongs (an issue about the CIM to IEC 61850 mapping belongs in the [CIM Mapping repository](https://github.com/com-pas/compas-cim-mapping) for example) and provide the following information by filling in the template, which is either an issue or a bug. |
| 80 | + |
| 81 | +When an issue is created, it is automatically being added to the `To do` column of the specific repository. This means it's added, but not yet refined. Every monday at 10AM CET, there is a Community Refinement (see our mailing list [calendar](https://lists.lfenergy.org/g/CoMPAS/calendar), everybody can join) where issues are being discussed that are not refined yet. Your issue is one of them. |
| 82 | +Once it's accepted and refined, it goes to the `Ready for development` column and it's ready to be implemented/fixed. |
| 83 | + |
| 84 | +Before creating bug reports or suggesting enhancement, please **perform a [cursory search](https://github.com/search?q=+is%3Aissue+user%3Acom-pas)** |
| 85 | +to see if the problem has already been reported. You can add a search term to the upper left search bar. If it has **and the issue is still open**, add a comment to the existing issue instead of opening a new one. |
| 86 | + |
| 87 | +When in doubt, ask your question on our [LFEnergy slack ](https://lfenergy.slack.com/) in the `#compas` channel. Or you can contact the team directly to talk about your ideas at [[email protected]](mailto:[email protected]). |
| 88 | + |
| 89 | +> **Note:** If you find a **Closed** issue that seems like it is the same thing that you're experiencing, open a new issue and include a link to the original issue in the body of your new one. |
| 90 | +
|
| 91 | +### Contributing Code |
| 92 | + |
| 93 | +Code Contribution is tracked as [GitHub Pull Requests](https://help.github.com/en/articles/about-pull-requests). |
| 94 | +Crafting a good pull request takes time and energy, but we will help as much as we can, but be prepared to follow our iterative process. |
| 95 | +The iterative process has several goals: |
| 96 | + |
| 97 | +- maintain the software quality, |
| 98 | +- fix problems that are important to users, |
| 99 | +- engage the community in working toward the best possible software features, |
| 100 | +- enable a sustainable system for maintainers to review contributions. |
| 101 | + |
| 102 | +Please follow these steps to have your contribution considered by the maintainers: |
| 103 | + |
| 104 | +1. Follow all instructions in the [pull requests section](https://com-pas.github.io/contributing/PULL_REQUESTS.html) |
| 105 | +2. Follow the [styleguides](https://com-pas.github.io/contributing/STYLEGUIDE.html) |
| 106 | +3. After you submit your pull request, verify that all [status checks](https://help.github.com/articles/about-status-checks/) are passing. |
| 107 | +5. Request a GitHub review by one of the projects' Committers |
| 108 | +6. Follow their instructions or discuss the requested changes. Please don't take criticism personally, it is normal to iterate on this step several times. |
| 109 | +7. Repeat step 6 until the pull request is merged! |
| 110 | + |
| 111 | +Continuous integration is set up to run on all branches automatically and will often report problems, so don't worry about getting everything perfect on the first try |
| 112 | +(SonarCloud Analysis is a notorious problem source). Until you add a reviewer, you can trigger as many builds as you want by amending your commits. The status checks enforce the following: |
| 113 | + |
| 114 | +- All tests in the test suite pass. |
| 115 | +- Checkstyle and SonarCloud report no violations. |
| 116 | +- The code coverage is high enough (currently about 80%). |
| 117 | + |
| 118 | +### Tools to contribute |
| 119 | + |
| 120 | +Continuous integration is setup automatically on all contributions. However, it's faster to iterate locally to fix problems than waiting for the status checks to finish. |
| 121 | +There are many tools that can be used to do the verifications that are enforced by all status checks. The most simple and universal tool is maven, but IDE integrations |
| 122 | +can be used to get more immediate feedback. Most of the team uses IntelliJ IDEA, but others IDEs can be used, for exemple the Eclipse IDE. |
| 123 | + |
| 124 | +### Definition of Done |
| 125 | + |
| 126 | +Before finishing a requirement, you need to check if everything is done for that particular requirement. |
| 127 | +For that, we have a Definition of Done; the DoD decides when a requirement is really done. |
| 128 | + |
| 129 | +Note: A Definition of Done is not a static list. It can be modified any time, if people feel like corrections should be made. |
| 130 | + |
| 131 | +Current Definition of Done: |
| 132 | +- Assumptions of requirements are met. |
| 133 | +- Required documentation is done. |
| 134 | +- (Software) Requirement is accepted and got a thumbs up from the Maintainer via an accepted Pull Request. |
| 135 | +- (Software) The build succeeds without failures. |
| 136 | +- (Software) All tests in the test suite pass. |
| 137 | +- (Software) Code style checks report no violations. |
| 138 | +- (Software) Code coverage is high enough (a minimum of 80% is covered). |
| 139 | +- (Software) If applicable, the added Unit Test is written, executed and passed. |
| 140 | +- (Software) Security analysis (vulnerability detection) doesn't spot unaddressed issues. |
| 141 | + |
| 142 | +### How-to begin |
| 143 | + |
| 144 | +Before you start your coding journey within the CoMPAS project, there are some things we have to talk about. |
| 145 | +Some things that will make your start a little easier! |
| 146 | +On the [developing](https://com-pas.github.io/contributing/DEVELOPING.html) page information about tooling can be found. |
| 147 | + |
| 148 | +#### Open Community Calls |
| 149 | + |
| 150 | +It's good to know that every other monday, we are having a so called Open Community Call. Everyone participating in the CoMPAS project can join |
| 151 | +and talk about and ask question about the CoMPAS project. |
| 152 | + |
| 153 | +When the Open Community Calls are taking place, can be found at the [General CoMPAS mailing list calendar](https://lists.lfenergy.org/g/CoMPAS/calendar). |
| 154 | + |
| 155 | +The agendas can be found at the [LF Energy wiki](https://wiki.lfenergy.org/display/HOME/CoMPAS+Community+Calls). |
| 156 | + |
| 157 | +If you have something to add, please add it to the agenda and notify everyone on Slack! |
| 158 | + |
| 159 | +#### Slack channel |
| 160 | + |
| 161 | +One of the first important things, is to meet the community. Feel free to introduce yourself by joining the channel 'compas' on [LF Energy Slack](https://slack.lfenergy.org/)! |
| 162 | + |
| 163 | +The Slack channel is the first communication platform within the CoMPAS project (besides email and the Github platform), so if you need help for example you can use Slack! |
| 164 | + |
| 165 | +#### Documenting |
| 166 | +A good (open source) project requires documentation. We have two places for our documentation |
| 167 | + |
| 168 | +##### LF Energy Wiki |
| 169 | + |
| 170 | +LF Energy has it's own [CoMPAS specific Wiki](https://wiki.lfenergy.org/display/HOME/CoMPAS). This is the place for documenation |
| 171 | +about CoMPAS in general (like roadmap and the community call agendas). |
| 172 | + |
| 173 | +#### Architecture and technologies |
| 174 | + |
| 175 | +For all architecture and technology choices (for example frameworks, build tools, database choices, etcetera), |
| 176 | +please check the source code (duh!) and our [CoMPAS Architecture Github Pages](https://com-pas.github.io/compas-architecture/). |
| 177 | + |
| 178 | +### Copyright and Licensing |
| 179 | + |
| 180 | +Copyright and license information is done on per-file basis. We use the specification of [REUSE](https://reuse.software/spec/) |
| 181 | +to ensure that copyright information of the project is clear and can be analuzed in an automated fashion. |
| 182 | + |
| 183 | +Every source code repository within CoMPAS has a Github Action for checking against the REUSE specification. |
| 184 | + |
| 185 | +For more information, check the [Copyright Guidelines](https://com-pas.github.io/contributing/STYLEGUIDE.html#copyright-guidelines) section. |
| 186 | + |
| 187 | +### Github Project Boards |
| 188 | + |
| 189 | +For managing the CoMPAS issues created in all the separate repositories, we use the [Projects Board](https://github.com/orgs/com-pas/projects) of Github. |
| 190 | +CoMPAS uses 2 different Project Boards: One for [Pull Requests](https://github.com/orgs/com-pas/projects/2) and one for the [Issues](https://github.com/orgs/com-pas/projects/1). |
| 191 | + |
| 192 | +When creating Pull Requests or Issues, it will automatically create issues or Pull Requests on the Project Boards. |
| 193 | +This is done by the Automate Projects Github Action (take a look at the [action from the Data Service](https://github.com/com-pas/compas-core/blob/master/.github/workflows/automate-projects.yml) for example). |
| 194 | +Changing the status of Issues / Pull Requests is also handled automatically by the Github Action. |
| 195 | + |
| 196 | +Issues and Pull Requests can be moved on both the Project Boards and on the boards of the specific repository itself. It synchronizes automatically. |
| 197 | + |
| 198 | +## Github Pages |
| 199 | + |
| 200 | +This site is provided as a [github pages site](https://com-pas.github.io/contributing/). |
| 201 | +The content is maintained and edited on [Github](https://github.com/com-pas/contributing) in the directory "docs". |
| 202 | +Contributors are only allowed to contribute by editing the content on Github and must do so by presenting their modifications as *pull-request* to the community. |
| 203 | +The diagrams on this page are created using [DrawIO](https://github.com/jgraph/drawio-desktop/releases) |
| 204 | +and follow [Unified Modeling Language (UML)](https://www.omg.org/spec/UML/). |
| 205 | +The drawIO design file is available on this site: [/blob-files/CoMPAS.drawio](blob-files/CoMPAS.drawio). |
| 206 | +Modification made to UML diagrams on this site must be made in this file and the modified file must be part of the pull request. |
0 commit comments