-
Notifications
You must be signed in to change notification settings - Fork 1
How We Work
JieFu Zhu edited this page Jan 10, 2023
·
1 revision
- New code has coverage of at least 60%
- All codes pass static inspection and serious problems have been modified. For the rules of static analysis, see
TODO
- All new code is manually reviewed;
- Test cases are executed;
- New functionality documented;
- The function has been accepted by the original requirement submitter;
- open a ticket for every issue/changes you want to make to the codebase
- the main branch should always be a working version - if a merge broke it: revert that merge and open a new merge request
- branch naming rules:
feature_<description>_<date>
,bugfix_<description>_<date>
- branch protection rules:
- before you merge feature branch into main, it has to be reviewed by at least two people
- before you merge code fix branch into main, it has to be reviewed by at least one people
...
- reST Nowadays, the probably more prevalent format is the reStructuredText (reST) format that is used by Sphinx to generate documentation. Note: it is used by default in JetBrains PyCharm (type triple quotes after defining a method and hit enter). It is also used by default as output format in Pyment.
"""
This is a reST style.
:param param1: this is a first param
:param param2: this is a second param
:returns: this is a description of what is returned
:raises keyError: raises an exception
"""
You can change default docstring format in PyCharm (JetBrains): Settings --> Tools --> Python Integrated Tools --> Docstring format.
It is possible to use a tool like Pyment to automatically generate docstrings to a Python project not yet documented, or to convert existing docstrings (can be mixing several formats) from a format to an other one.