Repository navigation
chore(deps): drop the unused plot extra - #373
Merged
Merged
Conversation
`plot = ["matplotlib>=3.8", "plotly>=5.22"]` dated to the initial commit and was never used. Nothing in the codebase imports either package — `fiberpath plot` renders through Pillow in `fiberpath/visualization/plotter.py` — and there are no dynamic imports that could hide a lazy use. The extra was never advertised either: the README documents `[cli]`, `[api]` and `[dev]`, and contributing.md installs `.[dev,cli,api]`. It was not reserved for planned work. The only related item in feature-backlog.md is "3D Streaming Visualization", explicitly a backlog concept, and it proposes Three.js in the GUI — a different technology in a different stack. Meanwhile it cost real advisory surface: dependency-audit.yml audits `uv export --all-extras`, so these two packages plus 8 transitives were scanned on every run, 10 of 73 packages. Today's lock-file-maintenance carried plotly 6.9.0 -> 7.0.0, a major bump of a package the project does not use. Removing it takes the audited set from 73 packages to 63. Verified after removal that plotly is genuinely absent (ModuleNotFoundError) and `fiberpath plot` still writes its PNG. Closes #369.
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.
Closes #369.
Why
plot = ["matplotlib>=3.8", "plotly>=5.22"]dated to the initial commit and was never used.git grep -nIE 'plotly|matplotlib|pyplot'across tracked source returns only thepyproject.tomldeclaration itself. There are no dynamic imports anywhere (import_module/__import__return zero hits), so nothing could be hiding a lazy use.fiberpath plotdoesn't need them. It renders through Pillow infiberpath/visualization/plotter.py.[cli],[api]and[dev];contributing.mdinstalls.[dev,cli,api].What it cost
dependency-audit.ymlauditsuv export --all-extras, so the extra's whole subtree was scanned on every run:The 10 removed:
matplotlib,plotly,contourpy,cycler,fonttools,kiwisolver,narwhals,pyparsing,python-dateutil,six.That is live advisory surface for zero functionality — and it generates churn: today's lock-file maintenance (#363) carried plotly 6.9.0 → 7.0.0, a major bump of a package the project does not use. That major is what surfaced this.
Verification
After removing the extra and re-syncing:
So the command that sounds like it depends on the extra demonstrably does not.
Gate:
ruff check/ruff format --check(148 files) /mypy(51 files) / 332 pytest passed /uv buildproduces the 0.11.0 wheel + sdist.Risk
pip install fiberpath[plot]would stop resolving that extra. Given it is undocumented, unused, and unreferenced anywhere outside its own declaration, that is acceptable.