<commit_before>import tw2.core as twc
import datetime
import urllib

from fedoracommunity.widgets.grid import Grid
from fedoracommunity.connectors.api import get_connector


class BugStatsWidget(twc.Widget):
    template = "mako:fedoracommunity.widgets.package.templates.bugs_stats_widget"
    id = twc.Param(default='bugs_widget')
    kwds = twc.Param(default=None)
    product = twc.Param(default='Fedora')
    version = twc.Param(default='rawhide')
    epel_version = twc.Param(default='el6')
    num_open = twc.Param(default='-')

    bz_prefix = "https://bugzilla.redhat.com/buglist.cgi"
    status_open_string = "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED"
    status_closed_string = "bug_status=CLOSED"

    base_query_string = twc.Variable(default='')

    def prepare(self):
        super(BugStatsWidget, self).prepare()
        self.base_query_string = urllib.urlencode({
            "query_format": "advanced",
            "product": self.product,
            "component": self.package,
        })


class BugsGrid(Grid):
    resource = 'bugzilla'
    resource_path = 'query_bugs'
    release_table = twc.Param()
    template = "mako:fedoracommunity.widgets.package.templates.bugs_table_widget"
<commit_msg>Update default version of EPEL bug<commit_after>import tw2.core as twc
import datetime
import urllib

from fedoracommunity.widgets.grid import Grid
from fedoracommunity.connectors.api import get_connector


class BugStatsWidget(twc.Widget):
    template = "mako:fedoracommunity.widgets.package.templates.bugs_stats_widget"
    id = twc.Param(default='bugs_widget')
    kwds = twc.Param(default=None)
    product = twc.Param(default='Fedora')
    version = twc.Param(default='rawhide')
    epel_version = twc.Param(default='epel7')
    num_open = twc.Param(default='-')

    bz_prefix = "https://bugzilla.redhat.com/buglist.cgi"
    status_open_string = "bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED"
    status_closed_string = "bug_status=CLOSED"

    base_query_string = twc.Variable(default='')

    def prepare(self):
        super(BugStatsWidget, self).prepare()
        self.base_query_string = urllib.urlencode({
            "query_format": "advanced",
            "product": self.product,
            "component": self.package,
        })


class BugsGrid(Grid):
    resource = 'bugzilla'
    resource_path = 'query_bugs'
    release_table = twc.Param()
    template = "mako:fedoracommunity.widgets.package.templates.bugs_table_widget"

{'fraction_non_alphanumeric': 0.11518324607329843, 'fraction_numerical': 0.0016109544905356424, 'mean_word_length': 4.008064516129032, 'pattern_counts': {'":': 6, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2635287', 'n_tokens_mistral': 847, 'n_tokens_neox': 814, 'n_words': 129}