From 59997938fb9a7e92d5dc4fff3253a155439711d5 Mon Sep 17 00:00:00 2001 From: daniel Date: Tue, 4 Apr 2023 14:50:40 +0200 Subject: [PATCH] docs: Improve and update of contributions documentation. --- CONTRIBUTING.md | 44 +++++++++++++++++++++++++++----------------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 0072e635..edcff505 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,7 +4,7 @@ Thank you for your interest in contributing to PowerAPI! There are multiple ways # Ways to contribute -We actively welcome any kind of contributions! Whether this contribution is: +We actively welcome any kind of contributions! Whether this contribution is: - Bug report - Documentation writing @@ -14,7 +14,7 @@ We actively welcome any kind of contributions! Whether this contribution is: - Fix for an existing issue - ... -Feel free to propose your contribution! +Feel free to propose your contribution! # Licensing @@ -22,19 +22,28 @@ All contributions should be under the same [BSD 3](https://choosealicense.com/li # Contribution workflow -We use pull requests to manage any change to the codebase. Please try to make your pull request as "atomic" as possible (related to one issue). +We use pull requests to manage any change to the codebase. Please try to make your pull request as "atomic" as possible (related to one issue/feature). If you want to contribute to several issues or propose several distinct contributions, please create several pull requests to ease the review process. -If you want to propose a codebase modification, you should: - -1. Fork the repository and create your branch from the pre-release branch -2. Write new tests if your modifications are not covered by existing tests and should be tested. In particular, if your contribution is a bug fix that have not been detected by existing tests, -add a test to ensure that this issue will not reappear later. -3. If you've modified the API or made any structural change in the architecture, update the documentation -4. Ensure that tests passes and your code lint (using pylint and flake8) -5. Issue a pull requests on the pre-release branch. This way your modifications will be included in the next stable release (available on master). - -Each pull request have to be reviewed before beeing accepted. Some modifications can be -asked by the projet's maintainers. +If you want to propose a codebase modification, you have to: + +1. Create a GitHub issue related to your issue/feature +2. Fork the repository and create your branch from the `master` branch. Your branch have to follow the convention: `//`. Eg. `feature/issue10/support-influxdb-2`. Some categories are `feature` and `fix`. +3. Write new tests if your modifications are not covered by existing tests and have to be tested. In particular, if your contribution is a bug fix that have not been detected by existing tests, add a test to ensure that this issue will not reappear later. +4. If you've modified the API or made any structural change in the architecture, update the documentation. Please notice that this kind of contribution will require the approval of Sponsors. +5. Ensure that your code lint (using `pylint`, `flake8`, and `CodeQL`) and tests passes. +6. Issue a pull requests on the `master` branch. This way your modifications will be included in the next stable release. + +Please notice that each **pull request have to be reviewed** before beeing accepted. **Some modifications can be asked by the projet's maintainers**. +Commits' messages have to use [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/#summary). Below we provide the list of messages types used for generating the release report: +- `fix` +- `perf` +- `refactor` +- `style` +- `docs` +- `test` +- `build` +- `ci` +- `chore` ## Bug report @@ -43,7 +52,7 @@ You are welcome to submit an issue. This issue should describe the bug and it co small test or a code snippet that reproduce the issue. Great, easy to understand, bug reports often include: -- A quick summary of the issue +- A quick summary of the issue - What was expected and what happened - Step to reproduce - Details on your execution environment: @@ -62,10 +71,11 @@ Please submit one pull request for each bug fix. # PowerAPI codebase -## Coding style +## Coding style and Quality We use `pylint` and `flake8` as linter to enforce rules on the coding style. Please validate your contributions using those tools to ease the validation process. +We also use `CodeQL` to detect bugs and security problems. ## Testing -We use `pytest` to test that PowerAPI works as expected and to avoid regressions. Feel free to add new tests to improve code coverage! +We use `pytest-cov` to test that PowerAPI works as expected and to avoid regressions. Feel free to add new tests to improve code coverage!