Skip to content

Commit a07b424

Browse files
committed
Add dev dependencies and pre-commit configuration
1 parent 962d674 commit a07b424

File tree

3 files changed

+45
-0
lines changed

3 files changed

+45
-0
lines changed

.pre-commit-config.yaml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
repos:
2+
- repo: https://github.com/ambv/black
3+
rev: 18.6b4
4+
hooks:
5+
- id: black
6+
args: [--safe, --quiet]
7+
language_version: python3.6
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v1.3.0
10+
hooks:
11+
- id: trailing-whitespace
12+
- id: end-of-file-fixer
13+
- id: flake8
14+
- repo: local
15+
hooks:
16+
- id: rst
17+
name: rst
18+
entry: rst-lint --encoding utf-8
19+
files: ^(CHANGELOG.rst|HOWTORELEASE.rst|README.rst|changelog/.*)$
20+
language: python
21+
additional_dependencies: [pygments, restructuredtext_lint]
22+
python_version: python3.6
23+
- repo: https://github.com/pre-commit/pygrep-hooks
24+
rev: v1.0.0
25+
hooks:
26+
- id: rst-backticks

docs/index.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -846,6 +846,19 @@ projects rely on it. Our Github integrated CI process runs the full
846846
`tox test suite`_ on each commit so be sure your changes can run on
847847
all required `Python interpreters`_ and ``pytest`` versions.
848848

849+
For development, we suggest to create a virtual environment and install ``pluggy`` in
850+
editable mode and ``dev`` dependencies::
851+
852+
$ python3 -m venv .env
853+
$ source .env/bin/activate
854+
$ pip install -e .[dev]
855+
856+
To make sure you follow the code style used in the project, install ``pre-commit`` which
857+
will run style checks before each commit::
858+
859+
$ pre-commit install
860+
861+
849862
Release Policy
850863
**************
851864
Pluggy uses `Semantic Versioning`_. Breaking changes are only foreseen for

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@ def main():
3737
author_email='[email protected]',
3838
url='https://github.com/pytest-dev/pluggy',
3939
python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*',
40+
extras_require={
41+
"dev": [
42+
"pre-commit",
43+
"tox",
44+
]
45+
},
4046
classifiers=classifiers,
4147
packages=['pluggy'],
4248
)

0 commit comments

Comments
 (0)