IDEMSInternational / molo-iogt

IoGT Frontend Site for Molo
BSD 2-Clause "Simplified" License
0 stars 0 forks source link

Summary of modifications in the IOGT repository #4

Closed isedwards closed 4 years ago

isedwards commented 4 years ago

Currently there are 1,323 commits on the master branch in the repository.

Is it easy to generate a summary/report from the git history to show which files/directories have been modified the most?

nathanbaleeta commented 4 years ago

I used the command below to view the most changed files:

git log --pretty=format: --name-only | sort | uniq -c | sort -rg | head -30

1355 147 iogt/templates/base.html 112 requirements.txt 104 iogt/static/css/dev/maps/style.css.map 102 iogt/static/css/prd/style.css 102 iogt/static/css/dev/style.css 100 iogt/settings/base.py 66 iogt/templates/core/tags/section_listing_homepage.html 64 iogt/static/css/state/_state.scss 63 iogt/static/css/dev/maps/state_320.css.map 56 iogt/templates/core/section_page.html 56 iogt/static/css/prd/state_320.css 56 iogt/static/css/dev/state_320.css 53 iogt/static/css/_base.scss 47 iogt/static/css/modules/_modules.scss 39 iogt/templates/core/article_page.html 34 iogt/static/css/modules/_m-article.scss 32 iogt/static/css/modules/_m-languages.scss 32 iogt/static/css/modules/_m-heading.scss 31 iogt/templates/search/search_results.html 31 iogt/static/css/state/_s-section.scss 31 iogt/static/css/modules/_m-section.scss 30 iogt/static/css/modules/_m-article-list.scss 28 iogt/static/css/modules/_m-profiles.scss 27 iogt/templates/core/tags/latest_listing_homepage.html 26 iogt/urls.py 23 iogt/static/css/variables/_variables.scss 22 iogt/static/css/style-rtl.scss 22 iogt/static/css/modules/_m-search.scss 21 locale/en/LC_MESSAGES/django.po

isedwards commented 4 years ago

Thank you @nathanbaleeta

Any chance we could get a summary of total changes for each directory?

... and, if it's fairly straight forward, can we see total changes by file extension?

nathanbaleeta commented 4 years ago

Does this give us a better idea?

git diff --dirstat=files,0 HEAD~1 55.5% iogt/migrations/ 11.1% iogt/tests/ 33.3% iogt/

OR

git diff --dirstat HEAD~100..HEAD 7.6% iogt/static/css/dev/maps/ 11.6% iogt/static/css/dev/ 11.6% iogt/static/css/prd/ 3.3% iogt/static/google/ 4.4% iogt/static/img/ 5.0% iogt/ 48.2% locale/

isedwards commented 4 years ago

@nathanbaleeta - I've installed git-extras which includes the git-effort tool. Here are some of the results (I've shown only files/directories that have changed more than once):

git-effort *


path                                                                    commits    active days

iogt................................................................... 893 192 requirements.txt....................................................... 112 82 locale................................................................. 45 27 gulpfile.js............................................................ 18 11 Dockerfile............................................................. 13 8 README.rst............................................................. 10 3 package.json........................................................... 8 6 setup.py............................................................... 6 3 setup.cfg.............................................................. 6 6 requirements-dev.txt................................................... 6 6 FED.md................................................................. 4 4 test_settings.py....................................................... 3 3


The majority of changes have been to the main `iogt` code directory and then to the translation files in `locale`.

Within the main `iogt` directory:

> git-effort iogt/*

path commits active days

iogt/static............................................................ 529 115 iogt/templates......................................................... 458 147 iogt/settings.......................................................... 103 65 iogt/styles............................................................ 45 23 iogt/urls.py........................................................... 22 17 iogt/tests............................................................. 22 15 iogt/middleware.py..................................................... 14 8 iogt/migrations........................................................ 10 7 iogt/views.py.......................................................... 5 5 iogt/processors.py..................................................... 3 2 iogt/celery.py......................................................... 2 1 iogt/admin.py.......................................................... 2 1

The vast majority of changes have not been to Python code, but rather to `static` content (css stylesheets and images), html `templates` and `styles`.  With notable changes to the `settings`, `urls.py`, `tests` and `middleware.py`.  Of these, only [`middleware.py`](https://github.com/IDEMSInternational/molo-iogt/blob/d9598ec759454dd49f859290bf5b7f3442059b70/iogt/middleware.py) could really be considered custom code.

We can also get an idea of how much work has been put into keeping the translated content up-to-date:

> git-effort locale/*

path commits active days

locale/en.............................................................. 21 16 locale/sw.............................................................. 16 9 locale/pt.............................................................. 15 11 locale/my.............................................................. 15 10 locale/ky.............................................................. 15 11 locale/ku.............................................................. 15 11 locale/fr.............................................................. 15 10 locale/rw.............................................................. 14 10 locale/es.............................................................. 14 9 locale/ru.............................................................. 13 9 locale/rn.............................................................. 13 8 locale/ne.............................................................. 13 9 locale/id.............................................................. 12 8 locale/tg.............................................................. 11 7 locale/qu.............................................................. 10 6 locale/ay.............................................................. 10 6 locale/ts.............................................................. 8 6 locale/ar.............................................................. 8 5 locale/pt_MZ........................................................... 6 4 locale/pt_BR........................................................... 6 4 locale/ur.............................................................. 5 3 locale/th.............................................................. 5 3 locale/km.............................................................. 5 3

nathanbaleeta commented 4 years ago

Thanks @isedwards git effort works like a charm, tested it as well.