From b06867dc5dbfae13e839f8356ebd5f7b5a87aa6b Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 11 Mar 2021 01:50:04 +0100 Subject: [PATCH] Added CONTRIBUTING file --- CONTRIBUTING.md | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000000..efb2813a84 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,36 @@ +Thanks for considering contributing your work to make Platypush a better product! + +Contributions are more than welcome, and the follow the standard Gitlab procedure: + +- [Fork the repo](https://git.platypush.tech/platypush/platypush). +- Prepare your changes. +- [Submit a merge request](https://git.platypush.tech/platypush/platypush/-/merge_requests). + +Guidelines: + +- The code should ideally have no LINT warnings/issues. + +- Project conventions: + - 4 spaces to indent + - RST format for classes and methods documentation + - Run `generate_missing_docs.sh` if you are adding new plugins/backends to automatically + generate the doc templates + - Naming conventions: plugin classes are named `Plugin` and backend classes are + named `Backend`, with `` being the (camel-case) representation of the + Python module of the plugin without the prefix - for example, the plugin under + `platypush.plugins.light.hue` must be named `LightHuePlugin`. + +- If possible, [add a test](https://git.platypush.tech/platypush/platypush/-/tree/master/tests) + for the new functionality. If you have built a new functionality that works with some specific + device or service then it's not required to write a test that mocks the whole service, but if + you are changing some of the core entities (e.g. requests, events, procedures, hooks, crons + or the bus) then make sure to add tests and not to break the existing tests. + +- If the feature requires an optional dependency then make sure to document it: + + - In the class docstring (see other plugins and backends for examples) + - In [`setup.py`](https://git.platypush.tech/platypush/platypush/-/blob/master/setup.py#L72) as + an `extras_require` entry + - In [`requirements.txt`](https://git.platypush.tech/platypush/platypush/-/blob/master/requirements.txt) - + if the feature is optional then leave it commented and add a one-line comment to explain which + plugin or backend requires it.