Modularize `noxfile.py`
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 711
- Forks
- 375
- Avg merge
- 3h 2m
- Merged PRs (30d)
- 8
Description
Description of improvement
We should consider extracting complicated sessions from noxfile.py and putting them into standalone scripts in tools/. This would best be done for sessions that are not used in CI, and thus exclude sessions like tests, docs, etc.
Motivation
Extracting scripts would have a few benefits:
- Decouple these tasks from Nox, in case we switch to a different task runner in the future.
- Make
noxfile.pyeasier to navigate. - Improve cohesion for each of the files.
Implementation strategy
The best place for the scripts would probably be tools/.
We should embed metadata in them (as per PEP 723) so that we can run them with uv run.
The sessions could still be kept in noxfile.py to make it easier to use a matrix setup for GitHub workflows, while also making them easier to find (with nox -l) and run (with nox -s '<session_name>'). The new sessions could be something like session.run("uv", "run", "scriptname.py").
Additional context
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading noxfile.py and identifying complicated sessions that are not used in CI, while excluding sessions such as tests and docs. Review the tools/ location and the referenced GitHub workflow setup. Done means selected sessions are represented by standalone scripts with PEP 723 metadata, while noxfile.py retains sessions that invoke them through uv run.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- build-system, tooling
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100