From 615f62403f8042bf74060a52ca1e44053618ae39 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 09:22:12 +0000 Subject: [PATCH 1/5] Initial plan From 3cf6eb3e70d69b749a7f9a3af067822612caae1e Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 09:27:21 +0000 Subject: [PATCH 2/5] Convert compare_runs.py to uvx-compatible tool - Add build system configuration with hatchling - Add project.scripts entry point for locust-compare command - Add package metadata (authors, license, classifiers) - Configure hatch build to include compare_runs.py - Update README with uvx, pip, and direct execution instructions - All existing tests still pass Co-authored-by: dev-ankit <1901680+dev-ankit@users.noreply.github.com> --- README.md | 45 +++++++++++++++++++++++++++++++++++++-------- pyproject.toml | 27 +++++++++++++++++++++++++++ 2 files changed, 64 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index de25609..0e113b0 100644 --- a/README.md +++ b/README.md @@ -13,30 +13,59 @@ Compare performance results between two Locust runs and show changes relative to - Python 3.8+ (no third-party dependencies). -## Quick Start +## Installation -- Compare two run directories (each containing a `report.csv` and HTML files): +### With uvx (recommended) + +Run directly without installation: + +```bash +uvx locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 +``` +Or install from a local directory: + +```bash +uvx --from /path/to/locust-compare locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 ``` + +### With pip + +```bash +pip install . +locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 +``` + +### Direct execution + +```bash python3 compare_runs.py test_runs/HTML-Report-292 test_runs/HTML-Report-294 ``` -- Compare two specific CSV files: +## Quick Start + +- Compare two run directories (each containing a `report.csv` and HTML files): +```bash +locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 ``` -python3 compare_runs.py test_runs/HTML-Report-292/report.csv test_runs/HTML-Report-294/report.csv + +- Compare two specific CSV files: + +```bash +locust-compare test_runs/HTML-Report-292/report.csv test_runs/HTML-Report-294/report.csv ``` - JSON output for scripting: -``` -python3 compare_runs.py test_runs/HTML-Report-292 test_runs/HTML-Report-294 --json +```bash +locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 --json ``` - Colorize output and show verdicts (green=better, red=worse): -``` -python3 compare_runs.py test_runs/HTML-Report-292 test_runs/HTML-Report-294 --color +```bash +locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 --color ``` Exit code is `0` on success and `1` on error. diff --git a/pyproject.toml b/pyproject.toml index 9c7a3bc..665b5aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,8 +1,31 @@ +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + [project] name = "locust-compare" version = "0.1.0" description = "Compare Locust performance metrics between runs" +readme = "README.md" requires-python = ">=3.8" +license = {text = "MIT"} +authors = [ + {name = "Ankit", email = "dev@ankit.dev"}, +] +classifiers = [ + "Development Status :: 4 - Beta", + "Intended Audience :: Developers", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", + "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", +] + +[project.scripts] +locust-compare = "compare_runs:main" [project.optional-dependencies] dev = [ @@ -25,3 +48,7 @@ exclude_lines = [ "pragma: no cover", "if __name__ == .__main__.:", ] + +[tool.hatch.build.targets.wheel] +packages = ["."] +only-include = ["compare_runs.py"] From be0f270b4b87e1f40558f569c7a379a3205a19d5 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 09:29:03 +0000 Subject: [PATCH 3/5] Fix hatch configuration and update README examples - Remove incorrect 'packages' setting from hatch build config - Update README to show correct local uvx usage first - Add note about PyPI publication for simplified uvx usage - All tests continue to pass Co-authored-by: dev-ankit <1901680+dev-ankit@users.noreply.github.com> --- README.md | 16 ++++++++++++---- pyproject.toml | 1 - 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 0e113b0..faf2faf 100644 --- a/README.md +++ b/README.md @@ -17,16 +17,24 @@ Compare performance results between two Locust runs and show changes relative to ### With uvx (recommended) -Run directly without installation: +Run directly from a local directory: ```bash -uvx locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 +uvx --from . locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 +``` + +Or from a cloned repository: + +```bash +git clone https://github.com/dev-ankit/locust-compare.git +cd locust-compare +uvx --from . locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 ``` -Or install from a local directory: +Once published to PyPI, you can run without cloning: ```bash -uvx --from /path/to/locust-compare locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 +uvx locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 ``` ### With pip diff --git a/pyproject.toml b/pyproject.toml index 665b5aa..db1f7b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,5 +50,4 @@ exclude_lines = [ ] [tool.hatch.build.targets.wheel] -packages = ["."] only-include = ["compare_runs.py"] From e1720f02ba8cb73bea3f0f40b7784c01cf5f40c8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 09:31:31 +0000 Subject: [PATCH 4/5] Add MIT LICENSE file and update pyproject.toml - Add MIT LICENSE file with standard license text - Update pyproject.toml to reference LICENSE file - LICENSE is now properly included in built wheels - All tests continue to pass Co-authored-by: dev-ankit <1901680+dev-ankit@users.noreply.github.com> --- LICENSE | 21 +++++++++++++++++++++ pyproject.toml | 2 +- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..49cbebf --- /dev/null +++ b/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2024 Ankit + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/pyproject.toml b/pyproject.toml index db1f7b6..5431346 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,7 +8,7 @@ version = "0.1.0" description = "Compare Locust performance metrics between runs" readme = "README.md" requires-python = ">=3.8" -license = {text = "MIT"} +license = {file = "LICENSE"} authors = [ {name = "Ankit", email = "dev@ankit.dev"}, ] From 8a603150f2aeaa8ceaff9f08e36c96bccd7733a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 8 Jan 2026 09:36:41 +0000 Subject: [PATCH 5/5] Add uvx usage with GitHub URL to README - Add instruction to run directly from GitHub without cloning - Reorganize uvx examples with GitHub URL first - Update wording for PyPI example Co-authored-by: dev-ankit <1901680+dev-ankit@users.noreply.github.com> --- README.md | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index faf2faf..2c09dad 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,13 @@ Compare performance results between two Locust runs and show changes relative to ### With uvx (recommended) -Run directly from a local directory: +Run directly from GitHub without cloning: + +```bash +uvx --from git+https://github.com/dev-ankit/locust-compare.git locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 +``` + +Or from a local directory: ```bash uvx --from . locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 @@ -31,7 +37,7 @@ cd locust-compare uvx --from . locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294 ``` -Once published to PyPI, you can run without cloning: +Once published to PyPI, you can run without any prefix: ```bash uvx locust-compare test_runs/HTML-Report-292 test_runs/HTML-Report-294