singa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Wang Wei <>
Subject Re: [DISCUSS] Improve code quality
Date Sun, 15 Sep 2019 06:33:41 GMT
Hi Moaz,

I agree with you.
We did take some efforts to improve the code quality.
[1] introduces some tools for enforcing the coding style.
[2] introduces some tools for adding documentations.

The current issue is that our contributors may have applied different
coding styles and tools using their different editors.
I suggest to do some tests during the CI process, e.g., running the cpplint
and pylint.
If all tests pass, then we merge the PR.




On Sun, Sep 15, 2019 at 2:36 AM Moaz Reyad <> wrote:

> Dear team,
> Since SINGA is going to graduate soon from the incubator, I propose to use
> some tools to ensure high code quality. These tools check for known
> problems in the code and provide a detailed report for fixing them. May be
> some code came from scientific experimental projects. We need to improve
> this code according to industry standards, so it can be used with more real
> life projects.
> 1. I propose to add the code quality tools (cpplint[1], pylint[2] and
> lgtm[3]) to SINGA contribution guideline[4], so that each developer is
> encouraged to install and run code quality checks in his local repo and fix
> any problems before creating a pull request.
> 1.A CPP Lint: running cpplint in the src directory shows 822 errors, while
> running in the include directory shows 708 errors. The guidelines [4] has
> an outdated information that instructs developers to use an old
> non-existing file tool/
> 1.B Python Lint: running pylint in python/singa shows 5.00/10 rating, while
> running in python/rafiki shows 0.00/10 rating.
> 1.C LGTM :There is a Jira ticket for adding LGTM badges to the README[5],
> so the quality of the code becomes more clear to everyone. LGTM pull
> request automation can't be enabled in Apache repo due to infra
> restrictions[6], but it works on personal forks of the project. Currently
> LGTM rates both C++ and Python code in SINGA as grade D.
> 2. I propose also to give the code quality higher priority in the next
> release since it is probably going to be the first release after
> graduation. The team is invited to fix as much as possible from the current
> code issues and to use tools that check their new code before pushing it to
> SINGA. Let's try to make the lgtm grade and lint rating as high as
> possible.
> Improving code quality is required to attract new users and developers.
> Users will trust more the project with better code and developers will be
> happy to contribute to it. It will also make the code review process easier
> and more productive instead of wasting time in finding and fixing known
> code problems.
> New developers (or old developers who did not contribute for a while and
> would like to warm up) can start working on fixing lgtm and lint issues,
> since they are usually easy and there is a clear explanation of the problem
> and how to solve it.
> What do you think?
> p.s. This discussion is the first topic in a series of proposals to improve
> SINGA as it will be an Apache top level project soon. The next proposal
> will discuss improving the build and test pipeline in a separate thread to
> avoid discussing too many things in one thread.
> best regards,
> Moaz
> [1]
> [2]
> [3]
> [4]
> [5]
> [6]

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message