• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / relman-auto-nag / #4834

01 Dec 2023 12:53PM CUT coverage: 21.889% (-0.05%) from 21.938%
#4834

push

coveralls-python

sylvestre
Bugs with a lot of see also

716 of 3590 branches covered (0.0%)

0 of 20 new or added lines in 1 file covered. (0.0%)

1924 of 8790 relevant lines covered (21.89%)

0.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/bugbot/rules/lot_of_see_also.py
1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
# You can obtain one at http://mozilla.org/MPL/2.0/.
4

NEW
5
from bugbot import utils
×
NEW
6
from bugbot.bzcleaner import BzCleaner
×
7

8

NEW
9
class SeveralSeeAlso(BzCleaner):
×
NEW
10
    def __init__(self, nweeks: int = 52, see_also: int = 5):
×
11
        """Constructor
12

13
        Args:
14
            nweeks: the maximum number of weeks from the submission date
15
            see_also: the number of 'see also' in the bug
16
        """
NEW
17
        super().__init__()
×
NEW
18
        self.nweeks = nweeks
×
NEW
19
        self.see_also = see_also
×
20

NEW
21
    def description(self):
×
NEW
22
        return "Bugs with several see_also for the last {} weeks".format(self.nweeks)
×
23

NEW
24
    def columns(self):
×
NEW
25
        return ["id", "summary", "creation", "last_change", "see_also_count"]
×
26

NEW
27
    def handle_bug(self, bug, data):
×
NEW
28
        bugid = str(bug["id"])
×
NEW
29
        see_also_count = bug["see_also_count"]
×
30

NEW
31
        data[bugid] = {
×
32
            "creation": utils.get_human_lag(bug["creation_time"]),
33
            "last_change": utils.get_human_lag(bug["last_change_time"]),
34
            "see_also_count": see_also_count,
35
        }
NEW
36
        return bug
×
37

NEW
38
    def get_bz_params(self, date):
×
NEW
39
        return {
×
40
            "include_fields": ["creation_time", "last_change_time", "see_also_count"],
41
            "resolution": "---",
42
            "f1": "days_elapsed",
43
            "o1": "lessthan",
44
            "v1": self.nweeks * 7,
45
            "f2": "see_also_count",
46
            "o2": "greaterthaneq",
47
            "v2": self.see_also,
48
            "f3": "keywords",
49
            "o3": "nowords",
50
            "v3": ["meta", "intermittent"],
51
        }
52

53

NEW
54
if __name__ == "__main__":
×
NEW
55
    SeveralSeeAlso().run()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc