From aaa1f716a1aed1c91432c9955c825d8dc35c515a Mon Sep 17 00:00:00 2001 From: Martin Packman Date: Sun, 14 Oct 2018 14:45:02 +0100 Subject: [PATCH] Update CONTRIBUTING.md for DCO, test, and lint Mention the DCO signing requirement and link wiki page with details. Add section on testing requirements and tools. Add section on code style and lint details. Signed-off-by: Martin Packman --- CONTRIBUTING.md | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 3bbe74bc..0db5b9a2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,7 +6,37 @@ Prometheus uses GitHub to manage reviews of pull requests. addressing (with `@...`) the maintainer of this repository (see [MAINTAINERS.md](MAINTAINERS.md)) in the description of the pull request. -* If you plan to do something more involved, first discuss your ideas - on our [mailing list](https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers). - This will avoid unnecessary work and surely give you and us a good deal - of inspiration. +* If you plan to do something more involved, first discuss your ideas on + [our mailing list]. This will avoid unnecessary work and surely give you and + us a good deal of inspiration. + +* Before your contributions can be landed, they must be signed off under the + [Developer Certificate of Origin] which asserts you own and have the right to + submit the change under the open source licence used by the project. + +## Testing + +Submitted changes should pass the current tests, and be covered by new test +cases when adding functionality. + +* Run the tests locally using [tox] which executes the full suite on all + supported Python versions installed. + +* Each pull request is gated using [Travis CI] with the results linked on the + github page. This must pass before the change can land, note pushing a new + change will trigger a retest. + +## Style + +* Code style should follow [PEP 8] generally, and can be checked by running: + ``tox -e flake8``. + +* Import statements can be automatically formatted using [isort]. + + +[our mailing list]: https://groups.google.com/forum/?fromgroups#!forum/prometheus-developers +[Developer Certificate of Origin]: https://github.com/prometheus/prometheus/wiki/DCO-signing +[isort]: https://pypi.org/project/isort/ +[PEP 8]: https://www.python.org/dev/peps/pep-0008/ +[tox]: https://tox.readthedocs.io/en/latest/ +[Travis CI]: https://docs.travis-ci.com/