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

mozilla / relman-auto-nag / #5325

06 Nov 2024 10:53AM CUT coverage: 21.411% (-0.1%) from 21.516%
#5325

push

coveralls-python

jgraham
Add a rule to sync [webcompat:sightline] whiteboard entry

This should be set on all bugs that are part of the webcompat metrics
set, and by no bugs that aren't.

This initial approach just gets all the bugs that are either in that
set or have the whiteboard entry, and implements the logic to update
them in the client. Given that we expect initially to have ~700 bugs
in that set, this means we need to set the maximum number of bugs to
update to something rather high.

426 of 2902 branches covered (14.68%)

0 of 49 new or added lines in 3 files covered. (0.0%)

1 existing line in 1 file now uncovered.

1942 of 9070 relevant lines covered (21.41%)

0.21 hits per line

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

0.0
/bugbot/gcp.py
NEW
1
from typing import Iterable, Optional
×
2

NEW
3
from google.cloud import bigquery
×
NEW
4
from google.oauth2 import service_account
×
5

NEW
6
from bugbot import utils
×
7

NEW
8
SCOPES = {
×
9
    "cloud-platform": "https://www.googleapis.com/auth/cloud-platform",
10
    "drive": "https://www.googleapis.com/auth/drive",
11
}
12

13

NEW
14
def get_bigquery_client(
×
15
    project: str, scopes: Optional[Iterable[str]] = None
16
) -> bigquery.Client:
17
    """Get a bigquery.Client for a given project
18

19
    Args:
20
        project: Name of the project.
21
        scopes: Optional iterable containing the scopes the client should have.
22
                By default this will be the cloud-platform scopes required to
23
                run queries.
24
    Returns:
25
        bigquery.Client
26
    """
NEW
27
    scope_urls = (
×
28
        [SCOPES["cloud-platform"]]
29
        if scopes is None
30
        else [SCOPES.get(item, item) for item in scopes]
31
    )
32

NEW
33
    credentials = service_account.Credentials.from_service_account_info(
×
34
        utils.get_gcp_service_account_info()
35
    ).with_scopes(scope_urls)
36

NEW
37
    return bigquery.Client(project=project, credentials=credentials)
×
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