Guten Tag,
Time flow, and I forgot to reply to that email :-\
On 13/05/2019 23:11, Daniel Kinzler wrote:
Hey Antoine!
Am 13.05.19 um 20:59 schrieb Antoine Musso:
Hello,
A few months ago, the code health group enquired about the Php metrics static
analysis tool [1] and it has been rather straightforward to run it automatically
and publish its report:
https://doc.wikimedia.org/mediawiki-core/master/phpmetrics/
The report has a list of potential coupling and also show relation between
objects. That might be a complement.
Yea, that's what I used for my initial analysis for the session on decoupling at
TechConf in Portland :)
phpmetrics and similar tools are useful, but they do not analyze the transitive
dependencies (at least not sufficiently, for my use case). That is, they can't
tell me whether two classes are coupled, but they can't tell me which classes to
decouple to resolve clusters of tightly coupled code. And they can't measure how
"tangled" the codebase is overall, just how "good" or "bad"
a given class is (or
all classes are, on average).
Oh so yeah that is going way deeper in the graph analysis. I would guess
someone with a background in graph theory would be able to help on that
front. I love the topic, but not enough to actually learn it :-\
As for your
tool, I am pretty sure we can easily run it automatically and
publish it next to the PHP Metrics report? The addition to CI has been rather
straightforward:
A container:
https://gerrit.wikimedia.org/r/#/c/integration/config/+/469689/
The Jenkins job:
https://gerrit.wikimedia.org/r/#/c/integration/config/+/469690/
Ruprecht comes with a few dependencies that may make containerization less
straight forward. Not terribly hard, but somewhat annoying. E.g. it needs python
1 *and* 3, it needs graph-tool which has to be installed as a debian package
from a non-standard repo, etc.
If you feel like looking into that, I'd of course be happy, of course ;)
There is no python 1? I am assuming you are referring to python2.7.
They can be coinstalled in the same Debian based container, they simply
are different binaries: /usr/bin/python2 /usr/bin/python3. Should be easy.
Depends on what a non standard repo is? The CI images are build with the
non-standard repository
apt.wikimedia.org, we have some PHP packages
from
sury.org (the person who also package PHP for Debian) and others.
It is super easy, has long as the packages are signed with a gpg key.
If you could please fill a task against #continuous-integration-config
in Phabricator with a rough breakdown of how to setup the stack. I am
sure it can be done rather quickly.
--
Antoine "hashar" Musso