python-harness 0.0.1__tar.gz → 0.0.3__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.
- {python_harness-0.0.1/python_harness.egg-info → python_harness-0.0.3}/PKG-INFO +2 -2
- {python_harness-0.0.1 → python_harness-0.0.3}/pyproject.toml +4 -4
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness/cli.py +17 -2
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness/hard_evaluator.py +3 -1
- {python_harness-0.0.1 → python_harness-0.0.3/python_harness.egg-info}/PKG-INFO +2 -2
- {python_harness-0.0.1 → python_harness-0.0.3}/LICENSE +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/README.md +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness/__init__.py +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness/evaluator.py +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness/qc_evaluator.py +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness/soft_evaluator.py +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness.egg-info/SOURCES.txt +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness.egg-info/dependency_links.txt +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness.egg-info/entry_points.txt +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness.egg-info/requires.txt +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/python_harness.egg-info/top_level.txt +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/setup.cfg +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/tests/test_cli.py +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/tests/test_evaluator.py +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/tests/test_hard_evaluator.py +0 -0
- {python_harness-0.0.1 → python_harness-0.0.3}/tests/test_soft_evaluator.py +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-harness
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: An agentic codebase evaluation and evolution tool for Python projects.
|
|
5
5
|
Author-email: Mingli Yuan <mingli.yuan@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
|
-
Requires-Python: >=3.
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Requires-Dist: typer>=0.9.0
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "python-harness"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.3"
|
|
4
4
|
description = "An agentic codebase evaluation and evolution tool for Python projects."
|
|
5
|
-
requires-python = ">=3.
|
|
5
|
+
requires-python = ">=3.10"
|
|
6
6
|
readme = "README.md"
|
|
7
7
|
authors = [
|
|
8
8
|
{name = "Mingli Yuan", email = "mingli.yuan@gmail.com"}
|
|
@@ -41,14 +41,14 @@ harness = "python_harness.cli:app"
|
|
|
41
41
|
|
|
42
42
|
[tool.ruff]
|
|
43
43
|
line-length = 88
|
|
44
|
-
target-version = "
|
|
44
|
+
target-version = "py310"
|
|
45
45
|
|
|
46
46
|
[tool.ruff.lint]
|
|
47
47
|
select = ["E", "F", "I", "UP", "B", "SIM"]
|
|
48
48
|
ignore = []
|
|
49
49
|
|
|
50
50
|
[tool.mypy]
|
|
51
|
-
python_version = "3.
|
|
51
|
+
python_version = "3.10"
|
|
52
52
|
strict = true
|
|
53
53
|
warn_return_any = true
|
|
54
54
|
warn_unused_configs = true
|
|
@@ -94,13 +94,28 @@ def measure(path: str = typer.Argument(".", help="The path to evaluate")) -> Non
|
|
|
94
94
|
if not hard_results["all_passed"]:
|
|
95
95
|
console.print("[bold red]Hard Evaluation Failed! Exiting.[/bold red]")
|
|
96
96
|
if hard_results["ruff"]["status"] != "success":
|
|
97
|
-
console.print("[red]Ruff issues found
|
|
97
|
+
console.print("[red]Ruff issues found:[/red]")
|
|
98
|
+
# Assuming ruff output is JSON as configured in HardEvaluator
|
|
99
|
+
for issue in hard_results["ruff"].get("issues", []):
|
|
100
|
+
file = issue.get("filename", "unknown")
|
|
101
|
+
line = issue.get("location", {}).get("row", "?")
|
|
102
|
+
msg = issue.get("message", "unknown issue")
|
|
103
|
+
console.print(f" - {file}:{line} {msg}")
|
|
98
104
|
if hard_results["mypy"]["status"] != "success":
|
|
99
105
|
output = hard_results["mypy"].get("output", "")
|
|
100
106
|
console.print(f"[red]Mypy issues found:[/red]\n{output}")
|
|
101
107
|
if hard_results["ty"]["status"] != "success":
|
|
102
108
|
output = hard_results["ty"].get("output", "")
|
|
103
|
-
|
|
109
|
+
# ty might print to stderr instead of stdout, or it might be missing
|
|
110
|
+
error_msg = hard_results["ty"].get("error_message", "")
|
|
111
|
+
if output:
|
|
112
|
+
console.print(f"[red]Ty issues found:[/red]\n{output}")
|
|
113
|
+
elif error_msg:
|
|
114
|
+
console.print(f"[red]Ty error:[/red]\n{error_msg}")
|
|
115
|
+
else:
|
|
116
|
+
console.print(
|
|
117
|
+
"[red]Ty failed, but no standard output was captured.[/red]"
|
|
118
|
+
)
|
|
104
119
|
if hard_results["radon_cc"]["status"] != "success":
|
|
105
120
|
issues = hard_results["radon_cc"].get("issues", [])
|
|
106
121
|
console.print(
|
|
@@ -72,9 +72,11 @@ class HardEvaluator:
|
|
|
72
72
|
check=False
|
|
73
73
|
)
|
|
74
74
|
status = "success" if result.returncode == 0 else "failed"
|
|
75
|
+
# ty might print to stderr
|
|
76
|
+
output = result.stdout if result.stdout else result.stderr
|
|
75
77
|
return {
|
|
76
78
|
"status": status,
|
|
77
|
-
"output":
|
|
79
|
+
"output": output,
|
|
78
80
|
"return_code": result.returncode,
|
|
79
81
|
}
|
|
80
82
|
except Exception as e:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: python-harness
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.3
|
|
4
4
|
Summary: An agentic codebase evaluation and evolution tool for Python projects.
|
|
5
5
|
Author-email: Mingli Yuan <mingli.yuan@gmail.com>
|
|
6
6
|
License: MIT
|
|
7
|
-
Requires-Python: >=3.
|
|
7
|
+
Requires-Python: >=3.10
|
|
8
8
|
Description-Content-Type: text/markdown
|
|
9
9
|
License-File: LICENSE
|
|
10
10
|
Requires-Dist: typer>=0.9.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|