gsoc stats 2017 pigrated to python3 PEP 8 compliance

This commit is contained in:
bt0dotninja 2020-03-04 09:10:38 -06:00
commit 4d11d43e9a
4 changed files with 15 additions and 25 deletions

View file

@ -1,19 +1,14 @@
#!/usr/bin/env python3
# A class to get fedora community data from fas interfaces and Datagreapper
# S
# Alberto Rodriguez Sanchez bt0dotninja@fedoraproject.org
# Renato Silva resilva87@fedoraproject.org
from fedora.client.fas2 import AccountSystem
from fedora.client import AuthError
from collections import Counter
from datetime import datetime
import sys
import numpy as np
import pandas as pd
import json
import requests
import configparser
from termcolor import colored
from six.moves import input
import os
@ -167,4 +162,3 @@ def main():
if __name__ == '__main__':
main()

View file

@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import print_function
from datetime import date, timedelta
import fedmsg.meta
import fedmsg
@ -144,11 +142,11 @@ def save_text_log(unicode_json):
category.capitalize() +
" **\n")
flag = False
try:
fout.write("* " + fedmsg.meta.msg2subtitle(activity).encode(
'utf-8') + "\n")
except AttributeError:
pass
try:
fout.write("* " + fedmsg.meta.msg2subtitle(activity).encode(
'utf-8') + "\n")
except AttributeError:
pass
fout.write("\nTotal Entries in category : " + str(actcount) + "\n")
fout.write("\nPercentage participation in category : " +
str(round(100 * actcount /
@ -209,11 +207,11 @@ def save_markdown(unicode_json):
category.capitalize() +
"\n")
flag = False
try:
fout.write("* " + fedmsg.meta.msg2subtitle(activity).encode(
'utf-8', errors='ignore') + "\n")
except AttributeError:
pass
try:
fout.write("* " + fedmsg.meta.msg2subtitle(activity).encode(
'utf-8', errors='ignore') + "\n")
except AttributeError:
pass
fout.write("\n* **Total Entries in category :** " +
str(actcount) + "\n")
fout.write("\n* **Percentage participation in category :** " +

View file

@ -1,4 +1,4 @@
import ConfigParser
import configparser
import os.path
from fedora.client import AccountSystem, AuthError
@ -9,7 +9,7 @@ class GroupParser:
self.password = None
self.config = ConfigParser.RawConfigParser()
try:
self.config.read('fas_credentials.cfg')
self.config.read('config.cfg')
self.username = self.config.get('fas', 'username').strip('\'')
self.password = self.config.get('fas', 'password').strip('\'')
self.check_config()

View file

@ -1,5 +1,3 @@
from __future__ import absolute_import
from __future__ import print_function
import fedmsg
import fedmsg.meta
import calendar