Skip to content

chore(deps): drop the unused plot extra - #373

Merged
CameronBrooks11 merged 1 commit into
mainfrom
chore/drop-dead-plot-extra
Sep 10, 2026
Merged

CameronBrooks11 merged 1 commit into
mainfrom
chore/drop-dead-plot-extra

Conversation

@CameronBrooks11

Copy link
Copy Markdown
Member

Closes #369.

Why

plot = ["matplotlib>=3.8", "plotly>=5.22"] dated to the initial commit and was never used.

  • Nothing imports either package. git grep -nIE 'plotly|matplotlib|pyplot' across tracked source returns only the pyproject.toml declaration itself. There are no dynamic imports anywhere (import_module / __import__ return zero hits), so nothing could be hiding a lazy use.
  • fiberpath plot doesn't need them. It renders through Pillow in fiberpath/visualization/plotter.py.
  • It was never advertised. The README documents [cli], [api] and [dev]; contributing.md installs .[dev,cli,api].
  • It wasn't reserved for planned work. The only related backlog item is "3D Streaming Visualization", explicitly "Backlog Concept, Not Shipped" — and it proposes Three.js in the GUI, a different technology in a different stack.

What it cost

dependency-audit.yml audits uv export --all-extras, so the extra's whole subtree was scanned on every run:

packages in the audited set
before 73
after 63

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:

$ uv run python -c "import plotly"
ModuleNotFoundError: No module named 'plotly'

$ uv run fiberpath plot p.gcode --output p.png
…/p.png (500.0 mm × 7.0 mm tow)
  PNG written: 1471 bytes

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 build produces 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.

`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.
@CameronBrooks11
CameronBrooks11 merged commit fd16c2b into main Sep 10, 2026
12 checks passed
@CameronBrooks11
CameronBrooks11 deleted the chore/drop-dead-plot-extra branch September 10, 2026 02:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The plot extra declares matplotlib and plotly, but nothing imports them

1 participant