make scipy optional, decouple pure-numpy metrics from _topology#298
Open
kmarchais wants to merge 2 commits into
Open
make scipy optional, decouple pure-numpy metrics from _topology#298kmarchais wants to merge 2 commits into
kmarchais wants to merge 2 commits into
Conversation
Contributor
|
📖 Docs preview: https://kmarchais.github.io/mmgpy/pr-298/ |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #298 +/- ##
=======================================
Coverage 86.18% 86.18%
=======================================
Files 29 29
Lines 3865 3865
Branches 684 684
=======================================
Hits 3331 3331
Misses 330 330
Partials 204 204 ☔ View full report in Codecov by Sentry. |
Contributor
Benchmark Results Summary
Total: 18 benchmarks Benchmark Comparison ResultsStatus: ✅ PASS 18 benchmarks passed
|
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
scipyfrom[project.dependencies]. No[scipy]extras group; users wanting scipy-coupled features (lagrangian,transfer_fields,repair,ValidationReportfamily,reorder_cuthill_mckee,metrics.compute_hessian) install scipy themselves.mmgpy._topologyimport inmetrics.pyso the pure-numpy helpers (create_isotropic_metric,create_anisotropic_metric, tensor conversions, validate, eigenpairs, intersect) work on the slim install. Onlycompute_hessianreaches_topologyand therefore scipy.pyvistaandscipyare both out of the published wheel'sRequires-Dist, simplify the Blender extension's METADATA strip:STRIP_DEPS = {"rich", "patchelf"}and the verify-step forbidden list collapses to the same two names.Changes
pyproject.toml: removescipyfromdependencies; add it to theuiextra and thedevgroup directly.src/mmgpy/metrics.py: movefrom mmgpy._topology import ...insidecompute_hessian(one# noqa: PLC0415).README.md: new "Features that need SciPy" section listing the scipy-coupled names..github/scripts/strip_blender_wheel_metadata.py:STRIP_DEPSreduced to{rich, patchelf}; docstring updated..github/workflows/build-blender-extension.yml: verify-step forbidden list reduced torich patchelf; surrounding comment refreshed.tests/headless_subset_test.py: docstring note that scipy is opt-in too (no functional change).Notes
tests/headless_subset_test.py(scipy still lazy-loads after touching scipy-coupled attrs in the dev env).[fem]extra unchanged;fedoobrings scipy transitively.pip install mmgpywho relied on scipy-coupled features without realizing scipy was pulled transitively; README calls this out.