ruff/scripts
Alex Waygood e0f3eaf1dd
Turn the fuzz-parser script into a properly packaged Python project (#14606)
## Summary

This PR gets rid of the `requirements.in` and `requirements.txt` files
in the `scripts/fuzz-parser` directory, and replaces them with
`pyproject.toml` and `uv.lock` files. The script is renamed from
`fuzz-parser` to `py-fuzzer` (since it can now also be used to fuzz
red-knot as well as the parser, following
https://github.com/astral-sh/ruff/pull/14566), and moved from the
`scripts/` directory to the `python/` directory, since it's now a
(uv)-pip-installable project in its own right.

I've been resisting this for a while, because conceptually this script
just doesn't feel "complicated" enough to me for it to be a full-blown
package. However, I think it's time to do this. Making it a proper
package has several advantages:
- It means we can run it from the project root using `uv run` without
having to activate a virtual environment and ensure that all required
dependencies are installed into that environment
- Using a `pyproject.toml` file means that we can express that the
project requires Python 3.12+ to run properly; this wasn't possible
before
- I've been running mypy on the project locally when I've been working
on it or reviewing other people's PRs; now I can put the mypy config for
the project in the `pyproject.toml` file

## Test Plan

I manually tested that all the commands detailed in
`python/py-fuzzer/README.md` work for me locally.

---------

Co-authored-by: David Peter <sharkdp@users.noreply.github.com>
2024-11-27 08:09:04 +00:00
..
benchmarks Ruff 0.8 release (#14486) 2024-11-22 08:45:19 +01:00
knot_benchmark [red-knot] knot benchmark: fix --knot-path arg (#13923) 2024-10-25 11:43:39 +02:00
release Update release script to match uv (#11496) 2024-07-03 07:35:28 -05:00
_mdformat_utils.py Add a formatting step using mdformat as part of generate_mkdocs.py (#10484) 2024-03-21 00:37:40 +00:00
_utils.py Use __future__ imports in scripts (#5301) 2023-06-22 11:40:16 -04:00
add_plugin.py [pydoclint] Implement docstring-missing-exception and docstring-extraneous-exception (DOC501, DOC502) (#11471) 2024-07-20 19:41:51 +00:00
add_rule.py fixes invalid rule from hyphen (#11484) 2024-05-21 23:39:50 -04:00
check_docs_formatted.py Format PYI examples in docs as .pyi-file snippets (#13116) 2024-08-28 13:20:40 +01:00
check_ecosystem.py Remove the deprecated E999 rule code (#14428) 2024-11-20 13:11:51 +01:00
Dockerfile.ecosystem Remove outdated feature flag from Dockerfile.ecosystem (#4620) 2023-05-24 08:19:08 +00:00
ecosystem_all_check.py Update pre-commit dependencies (#10698) 2024-04-06 23:00:41 +00:00
ecosystem_all_check.sh Rename Autofix to Fix (#7657) 2023-09-28 10:53:05 +00:00
ecosystem_all_check_entrypoint.sh Make ecosystem all check more generic (#4629) 2023-05-24 16:26:23 +02:00
formatter_ecosystem_checks.sh Improve the performance of the formatter instability check job (#14471) 2024-11-20 08:55:10 -06:00
generate_builtin_modules.py Add a new script to generate builtin module names (#12696) 2024-08-05 21:33:36 +01:00
generate_known_standard_library.py Add a new script to generate builtin module names (#12696) 2024-08-05 21:33:36 +01:00
generate_mkdocs.py doc(B024): #14455 add annotated but unassgined class variables (#14502) 2024-11-21 09:08:02 -06:00
pyproject.toml Update pre-commit dependencies (#13289) 2024-09-09 11:11:01 +00:00
release.sh Update release script to match uv (#11496) 2024-07-03 07:35:28 -05:00
transform_readme.py Update pre-commit dependencies (#10698) 2024-04-06 23:00:41 +00:00
update_ambiguous_characters.py Update pre-commit dependencies (#10698) 2024-04-06 23:00:41 +00:00
update_schemastore.py Use https by default in schema store update script (#11882) 2024-06-14 17:30:54 -05:00