Includes: - Odoo 19 framework (odoo/) - 27 custom EnCoach addons (new_project/custom_addons/) - encoach_core, encoach_api, encoach_lms_api, encoach_adaptive_api - encoach_exam, encoach_taxonomy, encoach_adaptive, encoach_assignment - encoach_ai, encoach_ai_grading, encoach_ai_generation, encoach_ai_media - encoach_courseware, encoach_communication, encoach_subscription - encoach_notification, encoach_approval, encoach_branding - encoach_classroom, encoach_registration, encoach_stats - encoach_faq, encoach_ticket, encoach_training, encoach_resources - encoach_adaptive_ai, encoach_sis - 21 OpenEduCat Enterprise modules (new_project/enterprise-19/) - 14 OpenEduCat Community modules (new_project/openeducat_erp-19.0/) - Configuration: odoo.conf, requirements.txt, scripts - 200+ REST API endpoints with JWT authentication - SRS and test documentation Made-with: Cursor
60 lines
1.5 KiB
Python
Executable File
60 lines
1.5 KiB
Python
Executable File
#!/usr/bin/python
|
|
#
|
|
# Runme From the repo toplevel directory
|
|
#
|
|
from __future__ import print_function
|
|
import subprocess
|
|
import glob
|
|
import re
|
|
import pprint
|
|
|
|
|
|
cla_glob = "doc/cla/*/*.md"
|
|
cla = ''.join(open(f).read() for f in glob.glob(cla_glob))
|
|
cla = cla.lower()
|
|
|
|
def cla_signed(email):
|
|
if re.match('.*(odoo|openerp|tinyerp).com$',email):
|
|
return True
|
|
if cla.find(email) != -1:
|
|
return True
|
|
return False
|
|
|
|
def blamestat(ext='py'):
|
|
r = {}
|
|
ok = 0
|
|
okl = []
|
|
ko = 0
|
|
kol = []
|
|
p = subprocess.Popen("git ls-tree -r -z --name-only HEAD | grep -z '.%s$' | xargs -0 -n1 git blame --line-porcelain HEAD |grep '^author-mail ' |sort |uniq -c|sort -nr" % ext, shell=True, stdout = subprocess.PIPE)
|
|
for i in p.stdout.read().split('\n'):
|
|
mo = re.search(r'(\d+) author-mail <([^ @<]+@[^ @<]+)>',i)
|
|
if mo:
|
|
lines = int(mo.group(1))
|
|
email = mo.group(2)
|
|
if cla_signed(email):
|
|
ok += lines
|
|
okl.append(i)
|
|
else:
|
|
ko += lines
|
|
kol.append(i)
|
|
print('-'*60)
|
|
print('Stats for ', ext)
|
|
print('-'*60)
|
|
print("\nCLA SIGNED %s/%s (%.0f%%)" % (ok, ok+ko, ok*100.0/(ok+ko)))
|
|
for i in okl:
|
|
print(i)
|
|
|
|
print("\nCLA MISSING %s/%s (%.0f%%)\n" % (ko, ok+ko, ko*100.0/(ok+ko)))
|
|
for i in kol:
|
|
print(i)
|
|
print()
|
|
print()
|
|
|
|
blamestat('md')
|
|
blamestat('rst')
|
|
blamestat('py')
|
|
blamestat('js')
|
|
blamestat('xml')
|
|
blamestat('csv')
|