Skip to content

Commit e8c630c

Browse files
roli-lpciclaude
andcommitted
Fix PyPI readiness issues from final review
- Replace Mermaid diagram with ASCII art (PyPI doesn't render Mermaid) - Convert relative links to absolute GitHub URLs in README - Remove dead --deterministic-only CLI flag and its test - Add missing classifiers (OS Independent, Python 3 :: Only) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent f55ddf8 commit e8c630c

File tree

4 files changed

+20
-35
lines changed

4 files changed

+20
-35
lines changed

README.md

Lines changed: 18 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# PyGate
22

3-
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE)
3+
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/roli-lpci/pygate/blob/main/LICENSE)
44
[![Python](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://python.org)
55
[![CI](https://github.com/roli-lpci/pygate/actions/workflows/ci.yml/badge.svg)](https://github.com/roli-lpci/pygate/actions/workflows/ci.yml)
66

@@ -41,6 +41,8 @@ pygate summarize --input .pygate/failures.json
4141
pygate repair --input .pygate/failures.json --max-attempts 3
4242
```
4343

44+
> **Note:** The PyPI package is `pygate-ci` but the CLI command is `pygate`.
45+
4446
## What It Does
4547

4648
PyGate runs deterministic quality gates on your Python project and produces structured, machine-readable artifacts designed for both humans and AI agents.
@@ -55,15 +57,18 @@ PyGate runs deterministic quality gates on your Python project and produces stru
5557

5658
### How It Works
5759

58-
```mermaid
59-
flowchart LR
60-
A[Changed Files] --> B[Run Gates]
61-
B --> C{Findings?}
62-
C -- No --> D[Pass ✓]
63-
C -- Yes --> E[Repair Loop]
64-
E --> F{Improved?}
65-
F -- Fixed --> D
66-
F -- No --> G[Escalate with Evidence]
60+
```
61+
Changed Files ──> Run Gates ──> Findings? ──No──> Pass
62+
|
63+
Yes
64+
|
65+
v
66+
Repair Loop ──> Improved? ──Fixed──> Pass
67+
|
68+
No
69+
|
70+
v
71+
Escalate with Evidence
6772
```
6873

6974
1. You tell PyGate which files changed (from your CI diff, PR, etc.)
@@ -82,8 +87,6 @@ pygate repair --input .pygate/failures.json [--max-attempts N]
8287

8388
**Exit codes:** `0` = pass, `1` = fail (`run`), `2` = escalated (`repair`)
8489

85-
> **Note:** The PyPI package is `pygate-ci` but the CLI command is `pygate`.
86-
8790
## Artifacts
8891

8992
All artifacts are written to `.pygate/`:
@@ -97,7 +100,7 @@ All artifacts are written to `.pygate/`:
97100
| `repair-report.json` | Repair attempt history (on success) |
98101
| `escalation.json` | Escalation reason and evidence (on failure) |
99102

100-
JSON Schema files for all artifact types are available in [`schemas/`](schemas/) for downstream validation and code generation. See [`demo/artifacts/`](demo/artifacts/) for sample output.
103+
JSON Schema files for all artifact types are available in [`schemas/`](https://github.com/roli-lpci/pygate/tree/main/schemas) for downstream validation and code generation. See [`demo/artifacts/`](https://github.com/roli-lpci/pygate/tree/main/demo/artifacts) for sample output.
101104

102105
## Repair Loop
103106

@@ -197,8 +200,8 @@ The action detects changed files from the PR, runs gates, optionally repairs, an
197200

198201
## Contributing
199202

200-
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
203+
See [CONTRIBUTING.md](https://github.com/roli-lpci/pygate/blob/main/CONTRIBUTING.md) for development setup and guidelines.
201204

202205
## License
203206

204-
[Apache 2.0](LICENSE)
207+
[Apache 2.0](https://github.com/roli-lpci/pygate/blob/main/LICENSE)

pyproject.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@ classifiers = [
2121
"Environment :: Console",
2222
"Intended Audience :: Developers",
2323
"License :: OSI Approved :: Apache Software License",
24+
"Operating System :: OS Independent",
2425
"Programming Language :: Python :: 3",
26+
"Programming Language :: Python :: 3 :: Only",
2527
"Programming Language :: Python :: 3.10",
2628
"Programming Language :: Python :: 3.11",
2729
"Programming Language :: Python :: 3.12",

src/pygate/cli.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,6 @@ def _build_parser() -> argparse.ArgumentParser:
3636
rep_p = sub.add_parser("repair", help="Run bounded repair loop")
3737
rep_p.add_argument("--input", required=True, help="Path to failures.json")
3838
rep_p.add_argument("--max-attempts", type=int, default=None, help="Maximum repair attempts")
39-
rep_p.add_argument(
40-
"--deterministic-only",
41-
action="store_true",
42-
default=False,
43-
help="Only apply deterministic fixes (skip model-assisted repair)",
44-
)
4539

4640
return parser
4741

tests/test_edge_cases.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -206,20 +206,6 @@ def test_repair_with_max_attempts_flag(self, mock_repair, tmp_path: Path):
206206
assert exc.value.code == 0
207207
assert mock_repair.call_args.kwargs["max_attempts"] == 5
208208

209-
@patch("pygate.cli.execute_repair")
210-
def test_repair_deterministic_only_flag_accepted(self, mock_repair, tmp_path: Path):
211-
mock_repair.return_value = {"status": "pass", "attempts": []}
212-
with pytest.raises(SystemExit) as exc:
213-
main(
214-
[
215-
"repair",
216-
"--input",
217-
str(tmp_path / "f.json"),
218-
"--deterministic-only",
219-
]
220-
)
221-
assert exc.value.code == 0
222-
223209
def test_invalid_mode_rejected(self):
224210
with pytest.raises(SystemExit) as exc:
225211
main(["run", "--mode", "invalid", "--changed-files", "f.txt"])

0 commit comments

Comments
 (0)