ruff/scripts/benchmarks
Henry Asa 97acf1d59b
ENH: Bump ruff dependency versions to support the latest release of v0.4.0 and Python 3.12 (#11025)
## Summary

With the release of
[`v0.4.0`](https://github.com/astral-sh/ruff/releases/tag/v0.4.0) of
`ruff`, I noticed that some of `ruff`'s dependencies were not updated to
their latest versions. The
[`ruff-pre-commit`](https://github.com/astral-sh/ruff-pre-commit)
package released
[`v0.4.0`](https://github.com/astral-sh/ruff-pre-commit/releases/tag/v0.4.0)
at the same time `ruff` was updated, but `ruff` still referenced
`v0.3.7` of the package, not the newly updated version. I updated the
`ruff-pre-commit` reference to be `v0.4.0`.

In a similar light, I noticed that the version of the
[`dill`](https://github.com/uqfoundation/dill) package being used was
not the latest version. I bumped `dill` from version `0.3.7` to `0.3.8`,
which now [fully supports Python
3.12](https://github.com/uqfoundation/dill/releases/tag/0.3.8).

## Related Issues

Resolves #11024
2024-04-19 03:37:54 +00:00
..
dark.svg Re-run benchmark and update documentation (#1907) 2023-01-16 01:38:58 -05:00
graph-spec.json Re-run benchmark and update documentation (#1907) 2023-01-16 01:38:58 -05:00
light.svg Re-run benchmark and update documentation (#1907) 2023-01-16 01:38:58 -05:00
poetry.lock ENH: Bump ruff dependency versions to support the latest release of v0.4.0 and Python 3.12 (#11025) 2024-04-19 03:37:54 +00:00
pyproject.toml Bump version to 0.4.0 (#11011) 2024-04-18 19:10:28 +00:00
README.md markdownlint: enforce 100 char max length (#4698) 2023-05-28 22:45:56 -04:00
run.sh Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
run_all.sh Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
run_comparisons.sh Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
run_formatter.sh Update versions in format benchmark script (#8110) 2023-10-21 18:39:31 +00:00
run_plugins.sh Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
run_silent.sh Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00
setup.sh Rename ruff crate to ruff_linter (#7529) 2023-09-20 08:38:27 +02:00

benchmarks

Utilities for benchmarking Ruff.

Getting Started

Run ./scripts/benchmarks/run.sh to clone the benchmarking target (CPython).

If you're looking to benchmark Ruff against other tools, you'll also need to run poetry install to create a virtual environment with the required dependencies.

Running Benchmarks

Run ./scripts/benchmarks/run.sh to run Ruff over the target repo (CPython). The ./scripts/benchmarks folder contains a few other benchmarks (e.g., scripts/benchmarks/run_comparisons.sh compares Ruff to a variety of other tools).

Generating Plots

The Vega specification for the benchmark plot depicted in the root README can be found at scripts/benchmarks/graph-spec.json. You can render this JSON spec in the Vega Editor.

The images seen in the README are generated by exporting the rendered Vega spec as SVG (at around 688px wide) and manually bolding the Ruff title and benchmark time. The dark mode variant is generated by changing the fill from fill="#333333" to fill="#C9D1D9".