Standardize formatting for the coder guide
[mudpy.git] / doc / source / coder.rst
1 =============
2  coder guide
3 =============
4
5 .. Copyright (c) 2004-2018 Jeremy Stanley <fungi@yuggoth.org>.
6    Permission to use, copy, modify, and distribute this software is
7    granted under terms provided in the LICENSE file distributed with
8    this software.
9
10 This guide attempts to embody a rudimentary set of rules for developer
11 submissions of source code and documentation targeted for inclusion
12 within the mudpy project, as well as pointers to useful resources for
13 those attempting to obtain a greater understanding of the software.
14
15 source
16 ------
17
18 As with any project, the mudpy source code could always be better
19 documented, and contributions to that end are heartily welcomed.
20
21 version control system
22 ~~~~~~~~~~~~~~~~~~~~~~
23
24 Git_ is used for version control on the project, and the archive can be
25 cloned anonymously from http://mudpy.org/git/mudpy if desired. For now,
26 detailed commits can be E-mailed to fungi@yuggoth.org, but there will
27 most likely be a developer mailing list for more open presentation and
28 discussion of patches soon.
29
30 A Gitweb_ interface is available, to make the change history easier to
31 browse. This is found at http://mudpy.org/gitweb/mudpy/ and should be
32 fairly self-explanatory.
33
34 A ChangeLog file is generated automatically from repository commit
35 logs, and is included automatically in all sdist_ tarballs. It can
36 be regenerated easily by running `tox -e venv python setup.py sdist`
37 from the top level directory of the Git repository in a working
38 `developer environment`_.
39
40 .. _Git: http://git-scm.com/
41 .. _Gitweb: http://git.wiki.kernel.org/index.php/Gitweb
42 .. _sdist: https://packaging.python.org/glossary
43            /#term-source-distribution-or-sdist
44
45 developer environment
46 ~~~~~~~~~~~~~~~~~~~~~
47
48 Basic developer requirements are a POSIX Unix derivative (such as
49 Linux), a modern Python 3 interpreter (any of the minor revisions
50 mentioned in the ``metadata.classifier`` section of setup.cfg_) and
51 a recent release of the tox_ utility (at least the
52 ``tox.minversion`` mentioned in tox.ini_).
53
54 .. _setup.cfg: http://mudpy.org/gitweb?p=mudpy.git;a=blob;f=setup.cfg
55 .. _tox.ini: http://mudpy.org/gitweb?p=mudpy.git;a=blob;f=tox.ini
56
57 application program interface
58 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59
60 API documentation is maintained within docstrings in the mudpy source
61 code.
62
63 regression testing
64 ~~~~~~~~~~~~~~~~~~
65
66 All new commits are tested using a selftest script in the
67 ``mudpy/tests`` directory of the source archive, to help ensure the
68 software is continually usable. Any new features should be
69 accompanied by suitable regression tests so that their functionality
70 can be maintained properly through future releases. The selftest can
71 be invoked with ``tox -e selftest`` after starting the daemon with
72 the test configuration provided in the ``mudpy/tests/fixtures``
73 directory.
74
75 style
76 -----
77
78 This project follows Guido van Rossum and Barry Warsaw's `Style Guide`_
79 for Python Code (a.k.a. "PEP-8"). When in need of sample code or other
80 examples, any common source code file or text document file distributed
81 as part of mudpy should serve as a suitable reference. Testing of all
82 new patches with the flake8_ utility should be performed with ``tox
83 -e flake8`` to ensure adherence to preferred style conventions.
84
85 .. _Style Guide: http://www.python.org/dev/peps/pep-0008/
86 .. _flake8: https://pypi.python.org/pypi/flake8