From abc159b7b95380d0da6f9bc7cef427a31f3139e6 Mon Sep 17 00:00:00 2001 From: Filip Kucharczyk Date: Thu, 5 Dec 2019 01:10:54 +0100 Subject: [PATCH] Update Contributing, changelog --- CONTRIBUTING.rst | 24 ++++++++++++++++++++++-- docs/changelog.rst | 2 ++ requirements-dev.txt | 1 + 3 files changed, 25 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 56bae31f..b571acf1 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -31,8 +31,28 @@ build. You should ensure that your code is properly converted by Style Guide ----------- -MongoEngine uses `black `_ for code -formatting. +MongoEngine uses various tools to maintain a common coding style. + +To install all development tools, simply run the following commands: + +.. code-block:: console + + $ python -m pip install -r requirements-dev.txt + + +You can install `pre-commit `_ into your git hooks, +to automatically check and fix any formatting issue before creating a +git commit. + +Simply run the following command: + +.. code-block:: console + + $ pre-commit install + +See the ``.pre-commit-config.yaml`` configuration file for more information +on how it works. + Testing ------- diff --git a/docs/changelog.rst b/docs/changelog.rst index 99081957..933d0231 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -25,6 +25,8 @@ Development - In bulk write insert, the detailed error message would raise in exception. - Added ability to compare Q and Q operations #2204 - Added ability to use a db alias on query_counter #2194 +- Added pre-commit +- Renamed requirements-lint.txt to requirements-dev.txt Changes in 0.18.2 ================= diff --git a/requirements-dev.txt b/requirements-dev.txt index e57131c5..ee788e7a 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -5,3 +5,4 @@ pre-commit pytest ipdb ipython +tox