From 2c45c2d3c053b7c0040882e1aac58df496d19c2c Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Fri, 14 Apr 2017 14:35:28 -0500 Subject: [PATCH 1/2] Add new contributing rules --- CONTRIBUTING.md | 62 ++++++++++++++++++++++++++++++++++++++ docs/sanic/contributing.md | 33 ++++++++++++++++++-- 2 files changed, 93 insertions(+), 2 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..95922693 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,62 @@ +# Contributing + +Thank you for your interest! Sanic is always looking for contributors. If you +don't feel comfortable contributing code, adding docstrings to the source files +is very appreciated. + +## Installation + +To develop on sanic (and mainly to just run the tests) it is highly recommend to +install from sources. + +So assume you have already cloned the repo and are in the working directory with +a virtual environment already set up, then run: + +```bash +python setup.py develop && pip install -r requirements-dev.txt +``` + +## Running tests + +To run the tests for sanic it is recommended to use tox like so: + +```bash +tox +``` + +See it's that simple! + +## Pull requests! + +So the pull request approval rules are pretty simple: +1. All pull requests must pass unit tests +* All pull requests must be reviewed and approved by at least +one current collaborator on the project +* All pull requests must pass flake8 checks +* If you decide to remove/change anything from any common interface +a deprecation message should accompany it. +* If you implement a new feature you should have at least one unit +test to accompany it. + +## Documentation + +Sanic's documentation is built +using [sphinx](http://www.sphinx-doc.org/en/1.5.1/). Guides are written in +Markdown and can be found in the `docs` folder, while the module reference is +automatically generated using `sphinx-apidoc`. + +To generate the documentation from scratch: + +```bash +sphinx-apidoc -fo docs/_api/ sanic +sphinx-build -b html docs docs/_build +``` + +The HTML documentation will be created in the `docs/_build` folder. + +## Warning + +One of the main goals of Sanic is speed. Code that lowers the performance of +Sanic without significant gains in usability, security, or features may not be +merged. Please don't let this intimidate you! If you have any concerns about an +idea, open an issue for discussion and help. diff --git a/docs/sanic/contributing.md b/docs/sanic/contributing.md index dbc64a02..95922693 100644 --- a/docs/sanic/contributing.md +++ b/docs/sanic/contributing.md @@ -4,10 +4,39 @@ Thank you for your interest! Sanic is always looking for contributors. If you don't feel comfortable contributing code, adding docstrings to the source files is very appreciated. +## Installation + +To develop on sanic (and mainly to just run the tests) it is highly recommend to +install from sources. + +So assume you have already cloned the repo and are in the working directory with +a virtual environment already set up, then run: + +```bash +python setup.py develop && pip install -r requirements-dev.txt +``` + ## Running tests -* `python -m pip install pytest` -* `python -m pytest tests` +To run the tests for sanic it is recommended to use tox like so: + +```bash +tox +``` + +See it's that simple! + +## Pull requests! + +So the pull request approval rules are pretty simple: +1. All pull requests must pass unit tests +* All pull requests must be reviewed and approved by at least +one current collaborator on the project +* All pull requests must pass flake8 checks +* If you decide to remove/change anything from any common interface +a deprecation message should accompany it. +* If you implement a new feature you should have at least one unit +test to accompany it. ## Documentation From 20d9ec1fd2e2266786efc0d30bc387dc012cc7c3 Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Fri, 14 Apr 2017 14:38:45 -0500 Subject: [PATCH 2/2] Fix the numbered list --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 95922693..367956b6 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -30,12 +30,12 @@ See it's that simple! So the pull request approval rules are pretty simple: 1. All pull requests must pass unit tests -* All pull requests must be reviewed and approved by at least +2. All pull requests must be reviewed and approved by at least one current collaborator on the project -* All pull requests must pass flake8 checks -* If you decide to remove/change anything from any common interface +3. All pull requests must pass flake8 checks +4. If you decide to remove/change anything from any common interface a deprecation message should accompany it. -* If you implement a new feature you should have at least one unit +5. If you implement a new feature you should have at least one unit test to accompany it. ## Documentation