Skip to content

How We Work

JieFu Zhu edited this page Jan 10, 2023 · 1 revision

Definition of Done(temporary)

Iteration DoD

  • 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, seeTODO
  • All new code is manually reviewed;
  • Test cases are executed;

Version DoD

  • New functionality documented;
  • The function has been accepted by the original requirement submitter;

GitHub Process

  • 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:
  1. before you merge feature branch into main, it has to be reviewed by at least two people
  2. before you merge code fix branch into main, it has to be reviewed by at least one people

Code-Style

Python

Google Python Style Guide

Java

Google Java Style Guide

PlaceholderFrontendLanguage

...

Documentation

  • 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
"""

How to customize the docstring

You can change default docstring format in PyCharm (JetBrains): Settings --> Tools --> Python Integrated Tools --> Docstring format.

Converting/Generating

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.