Migrate development workflow to uv and Ruff - #88
Merged
Conversation
Took 8 minutes Took 12 minutes
The docs jobs on GitHub and GitLab were green but built with 236 Sphinx warnings, and the Read the Docs config had never been migrated off Poetry. Repair notebooks/fuzenet_phd.ipynb, which has been invalid JSON since f4cdf22 ("Broke up the fuzenet_phd notebook into three notebooks"). That commit moved two sections into straight_field_lines.ipynb but left their code behind without the surrounding cell boundaries, merging cells and dropping commas. nbformat could not parse the result, so nbsphinx fell back to rendering the raw JSON as reST -- 225 of the 236 warnings, and no document title. Both orphan blocks are dead code: psi_onq no longer had a definition, and the code now lives in straight_field_lines.ipynb. With the JSON valid, the notebook's existing "Common PLEQUE tasks" heading is picked up again and the examples toctree links to it. Fix the remaining docstring warnings in pleque/core/. pol_flux and tor_flux were non-raw docstrings containing \rho and \frac, so Python substituted a literal carriage return and form feed into the .. math:: blocks and the formulas rendered broken; both are now raw strings. Also escape |grad psi|^2 (parsed as a substitution reference) and r_\mathrm{mid} (parsed as a reference to an undefined target), convert lcfs_field_line from numpydoc sections to the :param: style used elsewhere in the file (napoleon is not enabled), and add two missing blank lines. Set SPHINXOPTS = -W so the builds stay warning-free; both CI jobs run make -C docs html, so both are covered. Read the Docs invokes sphinx-build directly and is deliberately left lenient, so a warning cannot silently stale the published site. Point readthedocs.yml at uv instead of Poetry, and install pandoc there for nbsphinx, matching what both CI jobs already do. Drop the duplicated before_script in the GitLab docs job in favour of !reference [default, before_script], and strip 16 nonstandard jetTransient keys from notebooks/pleque_compass.ipynb so every notebook validates. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
kripnerl
marked this pull request as ready for review
August 12, 2026 11:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
uv.lockAGENTS.mdand update contributor, Claude, setup, release, and documentation guidanceWhy
The repository documentation and local environment were moving to uv, but dependency declarations, lockfiles, and CI still depended on Poetry. This aligns all contributor and automation paths around one locked workflow.
Validation
uv lock --checkuv run ruff check pleque/ tests/uv run pytest --junitxml=report.xml --cov=pleque --cov-report=xml:coverage.xml --cov-report=term-missing— 814 passed, 37 skippeduv builduv run make -C docs html— succeeds with existing documentation warningsuv run ty check pleque/— advisory job runs and reports existing legacy diagnostics