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

Qiskit / ecosystem / 31185009981

07 Aug 2026 01:55PM UTC coverage: 80.224% (-0.05%) from 80.276%
31185009981

push

github

web-flow
Add GaugeModelSimulation (#1283)

Co-authored-by: qiskit-bot <qiskit-bot@users.noreply.github.com>
Co-authored-by: danielecuomo <danielecuomo@users.noreply.github.com>
Co-authored-by: Luciano Bello <766693+1ucian0@users.noreply.github.com>
Co-authored-by: Luciano Bello <bel@zurich.ibm.com>

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

2503 of 3120 relevant lines covered (80.22%)

0.8 hits per line

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

24.56
/ecosystem/validation/test_github.py
1
# This code is part of Qiskit.
2
#
3
# (C) Copyright IBM 2023.
4
#
5
# This code is licensed under the Apache License, Version 2.0. You may
6
# obtain a copy of this license in the LICENSE.txt file in the root directory
7
# of this source tree or at https://www.apache.org/licenses/LICENSE-2.0.
8
#
9
# Any modifications or derivative works of this code must retain this
10
# copyright notice, and modified files need to carry a notice indicating
11
# that they have been altered from the originals.
12

13
"""Validations involving section member.github"""
1✔
14

15
# pylint: disable=invalid-name,missing-function-docstring
16

17
from datetime import date
1✔
18
from dateutil.relativedelta import relativedelta
1✔
19

20
import pytest
1✔
21

22
from . import ibm_controlled_gh_org
1✔
23

24

25
@pytest.fixture(autouse=True)
1✔
26
def skip_github(member):
1✔
27
    """Skip if no github section"""
28
    if member.github is None:
×
29
        pytest.skip("No github section")
×
30
    yield member
×
31

32

33
def test_G05(member):
1✔
34
    """GitHub repository is archived?"""
35
    if hasattr(member, "maturity") and member.maturity == "as-is":
×
36
        pytest.skip("`as-is` projects are exempt from activity checks")
×
37
    else:
38
        assert not (
×
39
            hasattr(member.github, "archived") and member.github.archived
40
        ), "GitHub repository archived"
41

42

43
def test_G06(member):
1✔
44
    """Have maintainer activity within the last 6 months"""
45
    if member.maturity == "as-is":
×
46
        pytest.skip("`as-is` projects are exempt from activity checks")
×
47

48
    last_activity = member.github.last_activity
×
49
    if last_activity is None:
×
50
        pytest.skip("No member.github.last_activity date")
×
51

52
    relative = relativedelta(date.today(), last_activity)
×
53
    months_difference = (relative.years * 12) + relative.months
×
54

55
    assert months_difference <= 6, (
×
56
        f"Last activity was {months_difference} months ago, which probably means that the project "
57
        "is not actively maintained and/or used. Maybe `member.maturity` should be set as `as-is`?"
58
    )
59

60

61
def test_G07(member):
1✔
62
    """Have last commit within the last 18 months"""
63
    if member.maturity == "as-is":
×
64
        pytest.skip("`as-is` projects are exempt from activity checks")
×
65

NEW
66
    if not hasattr(member.github, "last_commit"):
×
NEW
67
        pytest.skip("No member.github.last_commit date")
×
68

69
    last_commit = member.github.last_commit
×
70
    if last_commit is None:
×
71
        pytest.skip("No member.github.last_commit date")
×
72

73
    relative = relativedelta(date.today(), last_commit)
×
74
    months_difference = (relative.years * 12) + relative.months
×
75

76
    assert months_difference <= 18, (
×
77
        f"Last commit was {months_difference} months ago, which is more "
78
        "than 18 months ago. Please update the GitHub repository or set "
79
        "member.maturity to `as-is`."
80
    )
81

82

83
def test_G08(member):
1✔
84
    """Unmaintaned projects should archive their GitHub repository"""
85
    if member.maturity in ["deprecated", "unmaintaned"]:
×
86
        assert (
×
87
            member.github.archived
88
        ), "unsupported project should have an archived GitHub org"
89

90

91
def test_G09(member):
1✔
92
    assert hasattr(member.github, "license"), "member.github.license does not exist"
×
93

94
    if member.github.license and str(member.github.license) in ["None", "Other"]:
×
95
        assert (
×
96
            member.github.license.license_name is not None
97
        ), "member.github.license not detected"
98
        assert (
×
99
            member.github.license.license_name != "Other"
100
        ), "member.github.license not detected"
101

102

103
def test_G10(member):
1✔
104
    if hasattr(member.github, "license"):
×
105
        if str(member.github.license) in ["None", "Other"]:
×
106
            pytest.skip("No member.github.license, already covered by [G09]")
×
107
        assert (
×
108
            member.github.license.is_osi_approved()
109
        ), "member.github.license is not OSI-approved"
110

111

112
def test_G11(member):
1✔
113
    """
114
    Unmaintaned projects should be archived when the repo is on an IBM-controlled organization"
115
    """
116
    if not hasattr(member, "github"):
×
117
        pytest.skip("member.github does not exist")
×
118
    if member.github.owner.lower() not in ibm_controlled_gh_org:
×
119
        pytest.skip("repository is on an IBM-controlled organization")
×
120
    archived = member.github.archived if hasattr(member.github, "archived") else False
×
121
    if archived:
×
122
        pytest.skip("project repository is already archived")
×
123
    if member.maturity in ["deprecated", "unmaintaned", "as-is"]:
×
124
        assert archived, (
×
125
            f"Unsupported project (`member.maturity == {member.maturity}`"
126
            "should have an archived GitHub repository"
127
        )
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc