Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2722519

Browse files
committed
Doc: add developers
1 parent e8917f7 commit 2722519

File tree

2 files changed

+108
-0
lines changed

2 files changed

+108
-0
lines changed

docs/source/developers.rst

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
==========
2+
Developers
3+
==========
4+
5+
Setup
6+
=====
7+
8+
1. You need to fork the `GitHub repository <https://github.com/BoboTiG/python-mss>`_.
9+
10+
**Note :** always work on a **specific branch**, based on the *dev* one, dedicated to your patch.
11+
12+
2. Be sure to add/update tests and documentation within your patch.
13+
14+
15+
Testing
16+
=======
17+
18+
As he module is Python 2 and 3 compliant, do no forgot to test for both. If you cannot, just say it when sending the patch, someone else will validate for you.
19+
20+
21+
Dependency
22+
----------
23+
24+
You will need `pytest <https://pypi.python.org/pypi/pytest>`_::
25+
26+
pip install pytest
27+
28+
29+
How to test?
30+
------------
31+
32+
Enable the developer mode::
33+
34+
sudo python setup.py develop
35+
36+
Lauch the test suit::
37+
38+
py.test
39+
40+
41+
Validating the code
42+
===================
43+
44+
It is important to keep a clean base code. Use tools like `flake8 <https://pypi.python.org/pypi/flake8>`_ and `Pylint <https://pypi.python.org/pypi/pylint>`_.
45+
46+
47+
Dependencies
48+
------------
49+
50+
Install required packages::
51+
52+
pip install flake8 pylint
53+
54+
55+
How to validate?
56+
----------------
57+
58+
::
59+
60+
flake8
61+
pylint mss
62+
63+
If there is no output, you are good ;)
64+
65+
66+
Static type checking
67+
====================
68+
69+
`mypy <http://mypy-lang.org/>`_ is a compile-time static type checker for Python, allowing optional, gradual typing of Python code.
70+
MSS is using special files syntax for type annotations, which means that type annotations are written inside **pyi** files.
71+
72+
73+
Dependencies
74+
------------
75+
76+
Install required packages::
77+
78+
pip install mypy-lang
79+
80+
81+
Running mypy
82+
------------
83+
84+
::
85+
86+
mypy --check-untyped-defs --warn-incomplete-stub -m mss
87+
mypy --check-untyped-defs --warn-incomplete-stub mss
88+
89+
90+
Documentation
91+
=============
92+
93+
Dependencies
94+
------------
95+
96+
You will need `Sphinx <http://sphinx-doc.org/>`_::
97+
98+
pip install sphinx
99+
100+
101+
How to build?
102+
-------------
103+
104+
::
105+
106+
cd docs
107+
make clean html

docs/source/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ An ultra fast cross-platform multiple screenshots module in pure python using ct
2323
| examples |
2424
| support |
2525
| api |
26+
| developers |
2627
| where |
2728
+-------------------------+
2829

0 commit comments

Comments
 (0)