PlasmaPy / PlasmaPy/PlasmaPy

Modularize `noxfile.py`

Open
#3,128 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

nox
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.py easier 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.