Repository navigation
fix: pre-commit is a development tool, not a runtime dependency - #250
Open
petercorke wants to merge 2 commits into
Open
petercorke wants to merge 2 commits into
petercorke wants to merge 2 commits into
Conversation
pre-commit was added to [project].dependencies in rai-opensource#98 along with the black hook, so every 'pip install spatialmath-python' also installs pre-commit and its dependency tree (virtualenv, identify, cfgv, nodeenv, ...). spatialmath never imports it. This is not just bloat. It makes the install fail anywhere a transitive pin conflicts: virtualenv 21.14.7 requires packaging>=26.3, and Pyodide (JupyterLite, in-browser) ships packaging 24.2, so micropip.install('spatialmath-python') raises ValueError. Downstream JupyterLite notebooks of the Robotics, Machine Vision and bdsim toolboxes are affected. Move it to the dev extra, which the CI workflows already install, and make the README's contributor instructions install it. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…t-a-runtime-dependency # Conflicts: # pyproject.toml
4 tasks
This branch has not been deployed
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.
pre-commitwas added to[project].dependenciesin #98, alongside the black hook. Nothing in spatialmath imports it, but everypip install spatialmath-pythonhas installed it, and its dependency tree (virtualenv, identify, cfgv, nodeenv, ...), ever since. The hook config was later removed (#153) and restored, but the runtime dependency stayed.Why it matters beyond bloat: it makes the install fail wherever a transitive pin conflicts.
virtualenv21.14.7 now requirespackaging>=26.3, and Pyodide shipspackaging24.2, so in JupyterLite / in-browser notebooksmicropip.install("spatialmath-python")raisesValueError: Requested 'packaging>=26.3', but packaging==24.2 is already installed. That breaks the in-browser demos of the Robotics, Machine Vision and bdsim toolboxes, and it will break again whenever any dev tool in that tree raises a floor.Change: move
pre-committo thedevextra (CI already installs.[dev]) and make the README's contributor instructions install it.Verified: built the wheel and installed it with
micropip.installin Pyodide 0.27.6. Dependencies resolve, andimport spatialmathandSE3.Rx(...)work. Before the change the same install fails with the error above.🤖 Generated with Claude Code