quality-graph-python 0.1.1__tar.gz → 0.1.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/.gitignore +1 -0
- quality_graph_python-0.1.4/PKG-INFO +96 -0
- quality_graph_python-0.1.4/README.md +87 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/pyproject.toml +1 -1
- quality_graph_python-0.1.1/PKG-INFO +0 -12
- quality_graph_python-0.1.1/README.md +0 -3
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/__init__.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/diff.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/flaky.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/no_comments.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/object_annotations.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/py.typed +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/report.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/suppressions.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/time_bombs.py +0 -0
- {quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/triple_quotes.py +0 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: quality-graph-python
|
|
3
|
+
Version: 0.1.4
|
|
4
|
+
Summary: Reusable Python quality gates for Quality Graph
|
|
5
|
+
License-Expression: MIT
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
|
+
Requires-Dist: anyio>=4.11.0
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# Quality Graph Python Gates
|
|
11
|
+
|
|
12
|
+
Provider-independent source and diff quality gates for Python repositories. The package does not
|
|
13
|
+
depend on the GitHub provider and every command can run locally, in Quality Graph, or in another
|
|
14
|
+
CI system.
|
|
15
|
+
|
|
16
|
+
## Installation
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
uv add --dev quality-graph-python==0.1.2
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Diff-based commands compare committed repository content with `origin/main` by default. CI must
|
|
23
|
+
fetch the base history. Pass `--base` when the default branch or comparison point differs.
|
|
24
|
+
|
|
25
|
+
## Commands
|
|
26
|
+
|
|
27
|
+
| Command | Scope | What fails |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `qg-python-suppressions --base origin/main` | Added lines in Python and common config files | New `noqa`, `nosec`, type ignores, coverage pragmas, or ignore/exclude configuration |
|
|
30
|
+
| `qg-python-object-annotations --base origin/main` | Added Python annotation lines | Direct, qualified, or forward `object` annotations |
|
|
31
|
+
| `qg-python-triple-quotes --base origin/main` | Added Python string delimiters | One-line triple-quoted strings or multiline delimiters sharing a line with content; real docstrings are excluded |
|
|
32
|
+
| `qg-python-time-bombs --base origin/main` | Added Python and shell lines | Integer literals that plausibly encode Unix timestamps in seconds through nanoseconds |
|
|
33
|
+
| `qg-python-no-comments packages apps scripts` | Every Python file below the selected roots | Code comments other than shebangs and narrowly recognized tool directives |
|
|
34
|
+
| `qg-python-flaky --base origin/main --attempts 3` | Changed Python test files | Consistent failures or mixed pass/fail outcomes across repeated pytest runs |
|
|
35
|
+
|
|
36
|
+
Diagnostics use `path:line:column: message` and commands return non-zero when findings exist.
|
|
37
|
+
|
|
38
|
+
## Make integration
|
|
39
|
+
|
|
40
|
+
Keep graph nodes semantic by routing commands through repository Make targets:
|
|
41
|
+
|
|
42
|
+
```makefile
|
|
43
|
+
BASE ?= origin/main
|
|
44
|
+
|
|
45
|
+
.PHONY: python-suppressions python-object-annotations python-triple-quotes \
|
|
46
|
+
python-time-bombs python-no-comments flaky-python
|
|
47
|
+
|
|
48
|
+
python-suppressions:
|
|
49
|
+
uv run qg-python-suppressions --base "$(BASE)"
|
|
50
|
+
|
|
51
|
+
python-object-annotations:
|
|
52
|
+
uv run qg-python-object-annotations --base "$(BASE)"
|
|
53
|
+
|
|
54
|
+
python-triple-quotes:
|
|
55
|
+
uv run qg-python-triple-quotes --base "$(BASE)"
|
|
56
|
+
|
|
57
|
+
python-time-bombs:
|
|
58
|
+
uv run qg-python-time-bombs --base "$(BASE)"
|
|
59
|
+
|
|
60
|
+
python-no-comments:
|
|
61
|
+
uv run qg-python-no-comments packages apps scripts
|
|
62
|
+
|
|
63
|
+
flaky-python:
|
|
64
|
+
uv run qg-python-flaky --base "$(BASE)" --attempts 3
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
The no-comments gate intentionally scans complete roots. The other source gates are incremental
|
|
68
|
+
and reject newly introduced debt without forcing an immediate cleanup of unchanged legacy code.
|
|
69
|
+
|
|
70
|
+
## Graph integration
|
|
71
|
+
|
|
72
|
+
```yaml
|
|
73
|
+
profiles:
|
|
74
|
+
python:
|
|
75
|
+
extends: default
|
|
76
|
+
setup:
|
|
77
|
+
- uses: astral-sh/setup-uv@v7
|
|
78
|
+
- run: uv sync --locked
|
|
79
|
+
|
|
80
|
+
nodes:
|
|
81
|
+
suppressions:
|
|
82
|
+
profile: python
|
|
83
|
+
run: make python-suppressions
|
|
84
|
+
|
|
85
|
+
type:
|
|
86
|
+
profile: python
|
|
87
|
+
needs: [suppressions]
|
|
88
|
+
run: make type
|
|
89
|
+
|
|
90
|
+
flaky:
|
|
91
|
+
profile: python
|
|
92
|
+
needs: [type]
|
|
93
|
+
run: make flaky-python
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
Use `fetch-depth: "0"` on the checkout setup step when any node compares against a Git base.
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Quality Graph Python Gates
|
|
2
|
+
|
|
3
|
+
Provider-independent source and diff quality gates for Python repositories. The package does not
|
|
4
|
+
depend on the GitHub provider and every command can run locally, in Quality Graph, or in another
|
|
5
|
+
CI system.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
uv add --dev quality-graph-python==0.1.2
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Diff-based commands compare committed repository content with `origin/main` by default. CI must
|
|
14
|
+
fetch the base history. Pass `--base` when the default branch or comparison point differs.
|
|
15
|
+
|
|
16
|
+
## Commands
|
|
17
|
+
|
|
18
|
+
| Command | Scope | What fails |
|
|
19
|
+
| --- | --- | --- |
|
|
20
|
+
| `qg-python-suppressions --base origin/main` | Added lines in Python and common config files | New `noqa`, `nosec`, type ignores, coverage pragmas, or ignore/exclude configuration |
|
|
21
|
+
| `qg-python-object-annotations --base origin/main` | Added Python annotation lines | Direct, qualified, or forward `object` annotations |
|
|
22
|
+
| `qg-python-triple-quotes --base origin/main` | Added Python string delimiters | One-line triple-quoted strings or multiline delimiters sharing a line with content; real docstrings are excluded |
|
|
23
|
+
| `qg-python-time-bombs --base origin/main` | Added Python and shell lines | Integer literals that plausibly encode Unix timestamps in seconds through nanoseconds |
|
|
24
|
+
| `qg-python-no-comments packages apps scripts` | Every Python file below the selected roots | Code comments other than shebangs and narrowly recognized tool directives |
|
|
25
|
+
| `qg-python-flaky --base origin/main --attempts 3` | Changed Python test files | Consistent failures or mixed pass/fail outcomes across repeated pytest runs |
|
|
26
|
+
|
|
27
|
+
Diagnostics use `path:line:column: message` and commands return non-zero when findings exist.
|
|
28
|
+
|
|
29
|
+
## Make integration
|
|
30
|
+
|
|
31
|
+
Keep graph nodes semantic by routing commands through repository Make targets:
|
|
32
|
+
|
|
33
|
+
```makefile
|
|
34
|
+
BASE ?= origin/main
|
|
35
|
+
|
|
36
|
+
.PHONY: python-suppressions python-object-annotations python-triple-quotes \
|
|
37
|
+
python-time-bombs python-no-comments flaky-python
|
|
38
|
+
|
|
39
|
+
python-suppressions:
|
|
40
|
+
uv run qg-python-suppressions --base "$(BASE)"
|
|
41
|
+
|
|
42
|
+
python-object-annotations:
|
|
43
|
+
uv run qg-python-object-annotations --base "$(BASE)"
|
|
44
|
+
|
|
45
|
+
python-triple-quotes:
|
|
46
|
+
uv run qg-python-triple-quotes --base "$(BASE)"
|
|
47
|
+
|
|
48
|
+
python-time-bombs:
|
|
49
|
+
uv run qg-python-time-bombs --base "$(BASE)"
|
|
50
|
+
|
|
51
|
+
python-no-comments:
|
|
52
|
+
uv run qg-python-no-comments packages apps scripts
|
|
53
|
+
|
|
54
|
+
flaky-python:
|
|
55
|
+
uv run qg-python-flaky --base "$(BASE)" --attempts 3
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The no-comments gate intentionally scans complete roots. The other source gates are incremental
|
|
59
|
+
and reject newly introduced debt without forcing an immediate cleanup of unchanged legacy code.
|
|
60
|
+
|
|
61
|
+
## Graph integration
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
profiles:
|
|
65
|
+
python:
|
|
66
|
+
extends: default
|
|
67
|
+
setup:
|
|
68
|
+
- uses: astral-sh/setup-uv@v7
|
|
69
|
+
- run: uv sync --locked
|
|
70
|
+
|
|
71
|
+
nodes:
|
|
72
|
+
suppressions:
|
|
73
|
+
profile: python
|
|
74
|
+
run: make python-suppressions
|
|
75
|
+
|
|
76
|
+
type:
|
|
77
|
+
profile: python
|
|
78
|
+
needs: [suppressions]
|
|
79
|
+
run: make type
|
|
80
|
+
|
|
81
|
+
flaky:
|
|
82
|
+
profile: python
|
|
83
|
+
needs: [type]
|
|
84
|
+
run: make flaky-python
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Use `fetch-depth: "0"` on the checkout setup step when any node compares against a Git base.
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: quality-graph-python
|
|
3
|
-
Version: 0.1.1
|
|
4
|
-
Summary: Reusable Python quality gates for Quality Graph
|
|
5
|
-
License-Expression: MIT
|
|
6
|
-
Requires-Python: >=3.12
|
|
7
|
-
Requires-Dist: anyio>=4.11.0
|
|
8
|
-
Description-Content-Type: text/markdown
|
|
9
|
-
|
|
10
|
-
# Quality Graph Python Gates
|
|
11
|
-
|
|
12
|
-
Provider-independent source and diff quality gates for Python repositories.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{quality_graph_python-0.1.1 → quality_graph_python-0.1.4}/src/qg_python/object_annotations.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|