♻️ refactor: adapt tests#525
Merged
Merged
Conversation
…anifold API Update strategy tests and chart/vector/distance tests to reflect the current API conventions introduced by the metric refactor.
Replace float literals (1.0, 2.0, etc.) with integer literals where values are whole numbers, and normalize rtol=0.0 to rtol=0 in assert_allclose calls.
…ity_matrix tests Replace float literals like 1.0, 2.0 with int equivalents where the values are whole numbers. Preserve floats where needed for JAX grad/jvp tests, dtype-sensitive operations, and mixed-unit conversion tests that produce float results.
…egies and ptmap Replace float literals like 8.0, -8.0, -3.0, 3.0, -5.0, 5.0, 10.0, -10.0 with int equivalents where the values are whole numbers and dtype safety permits. Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Replace float literals like 1.0, 2.0 with int equivalents where the values are whole numbers and dtype safety permits. Keep float inputs to grad_f and fixture matrices that drive JIT dtype traces.
Replace float literals like 1.0, 2.0 with int equivalents where the values are whole numbers and dtype safety permits.
Replace float literals like 1.0, 2.0 with int equivalents where the values are whole numbers and dtype safety permits.
Replace float literals like 1.0, 2.0 with int equivalents where the values are whole numbers and dtype safety permits.
Replace float literals like 1.0, 2.0 with int equivalents where the values are whole numbers and dtype safety permits.
Remove magic trailing commas from expressions that fit within the 88-char line limit, allowing ruff-format to collapse them to a single line. Also fix DenseMetric fixture to use float array to avoid JIT MLIR dtype mismatch. Signed-off-by: nstarman <nstarman@users.noreply.github.com>
Remove magic trailing commas from expressions that fit within the 88-char line limit, allowing ruff-format to collapse them to a single line.
Remove magic trailing commas from conftest.py, noxfile.py, and scripts/validate_tag.py.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #525 +/- ##
=======================================
Coverage 92.91% 92.91%
=======================================
Files 249 249
Lines 7877 7881 +4
=======================================
+ Hits 7319 7323 +4
Misses 558 558 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
There was a problem hiding this comment.
Pull request overview
This PR primarily adapts and reformats tests across the coordinax workspace, with a small internal dtype-inference change for the custom QMatrix determinant primitive.
Changes:
- Normalizes many test literals and formatting in core, astro, curveframes, and hypothesis test suites.
- Updates selected representation strategy tests to use canonical singleton representation kinds.
- Adjusts custom determinant abstract evaluation to promote integer input dtypes to inexact output dtypes.
Reviewed changes
Copilot reviewed 64 out of 64 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/coordinax/_src/internal/quantity_matrix/_det.py |
Updates determinant abstract dtype inference. |
src/coordinax/_src/internal/quantity_matrix.py |
Formatting-only QMatrix primitive code change. |
src/coordinax/_src/internal/quantity_matrix/_register_primitives.py |
Formatting-only matrix contraction change. |
src/coordinax/_src/minkowski/register_metric.py |
Formatting-only Minkowski metric construction change. |
src/coordinax/_src/embedded/chart.py |
Formatting-only embedded manifold construction change. |
src/coordinax/transforms/_src/groups.py |
Formatting-only group declaration change. |
src/coordinax/vectors/__init__.py |
Formatting-only import consolidation. |
src/coordinax/vectors/_src/bundle.py |
Formatting-only coordinate helper/cconvert changes. |
src/coordinax/vectors/_src/register_quax.py |
Formatting-only Quax vector primitive changes. |
packages/coordinax.astro/src/coordinax/astro/_src/galactocentric.py |
Formatting-only field definitions. |
packages/coordinax.curveframes/src/coordinax/curveframes/_src/bishop.py |
Formatting-only Bishop frame construction call. |
packages/coordinax.curveframes/src/coordinax/curveframes/_src/frenetserret.py |
Formatting-only constructor signature change. |
packages/coordinax.hypothesis/src/coordinax/hypothesis/distances/_src/dist.py |
Formatting-only distance strategy construction. |
packages/coordinax.hypothesis/src/coordinax/hypothesis/manifolds/_src/atlas.py |
Formatting-only atlas strategy changes. |
packages/coordinax.hypothesis/src/coordinax/hypothesis/manifolds/_src/charts.py |
Formatting-only embedded chart strategy change. |
packages/coordinax.hypothesis/src/coordinax/hypothesis/manifolds/_src/manifold.py |
Formatting-only manifold strategy dispatch. |
packages/coordinax.hypothesis/src/coordinax/hypothesis/representations/_src/reps.py |
Formatting-only representation validation change. |
tests/unit/internal/test_quantity_matrix.py |
Formatting-only QMatrix test updates. |
tests/unit/angles/test_angle.py |
Formatting-only angle strategy/test updates. |
tests/unit/charts/test_checks.py |
Formatting-only chart check test update. |
tests/unit/distances/test_distance.py |
Formatting-only distance tests. |
tests/unit/manifolds/test_angle_between_dispatch.py |
Normalizes numeric literals in angle-between tests. |
tests/unit/manifolds/test_custom.py |
Normalizes formatting/literals in custom manifold tests. |
tests/unit/manifolds/test_metric_field.py |
Normalizes literals in metric field tests. |
tests/unit/manifolds/test_metric_matrix_dispatch.py |
Normalizes literals in metric matrix dispatch tests. |
tests/unit/manifolds/test_metric_matrix_types.py |
Normalizes literals in metric matrix type tests. |
tests/unit/manifolds/test_metric_pullback_consistency.py |
Normalizes literals in pullback metric tests. |
tests/unit/manifolds/test_metrics.py |
Normalizes literals/formatting in metric tests. |
tests/unit/manifolds/test_scale_factors_dispatch.py |
Normalizes literals in scale factor tests. |
tests/unit/representations/test_cconvert_tangent.py |
Normalizes literals in tangent conversion tests. |
tests/unit/representations/test_change_basis.py |
Normalizes literals/formatting in basis-change tests. |
tests/unit/representations/test_guess_basis_kind.py |
Normalizes quantity literals in basis inference tests. |
tests/unit/representations/test_guess_semantic_kind.py |
Normalizes quantity literals in semantic/geometry inference tests. |
tests/unit/representations/test_tangent_map.py |
Normalizes literals in tangent-map tests. |
tests/unit/representations/test_tangent_map_properties.py |
Normalizes literals/formatting in tangent-map property tests. |
tests/unit/transforms/conftest.py |
Formatting-only transform fixture update. |
tests/unit/transforms/test_act.py |
Formatting/literal normalization in transform action tests. |
tests/unit/transforms/test_active_semantics.py |
Normalizes literals/formatting in active semantics tests. |
tests/unit/transforms/test_groups.py |
Normalizes literals/formatting in transform group tests. |
tests/unit/transforms/test_reflect.py |
Normalizes literals in reflection tests. |
tests/unit/transforms/test_spatial_linear_transforms.py |
Normalizes literals in scale/shear tests. |
tests/unit/transforms/test_translate.py |
Normalizes literals in translation tests. |
tests/unit/vectors/test_arithmetic.py |
Normalizes literals in vector arithmetic tests. |
tests/unit/vectors/test_coordinate.py |
Normalizes literals/formatting in coordinate tests. |
tests/unit/vectors/test_tangent.py |
Normalizes literals and updates one tangent construction to composite rep usage. |
tests/usage/charts/test_jacobian.py |
Normalizes literals/formatting in Jacobian usage tests. |
tests/usage/frames/test_act_usage.py |
Formatting-only frame action usage tests. |
tests/integration/charts/test_jax.py |
Formatting-only JAX chart integration test. |
packages/coordinax.astro/tests/unit/test_frame_transforms.py |
Formatting/literal normalization in astro frame transform tests. |
packages/coordinax.curveframes/tests/test_bishop.py |
Formatting-only Bishop roundtrip tests. |
packages/coordinax.curveframes/tests/test_bishop_frame.py |
Renames local test helper and updates formatting. |
packages/coordinax.hypothesis/tests/benchmark/test_benchmark_strategies.py |
Formatting-only benchmark test updates. |
packages/coordinax.hypothesis/tests/unit/charts/test_cdicts.py |
Formatting-only CDict strategy test update. |
packages/coordinax.hypothesis/tests/unit/charts/test_chart_classes.py |
Formatting-only chart class strategy tests. |
packages/coordinax.hypothesis/tests/unit/charts/test_product_charts.py |
Updates fixed product chart factor names and formatting. |
packages/coordinax.hypothesis/tests/unit/manifolds/test_manifolds.py |
Formatting-only manifold strategy tests. |
packages/coordinax.hypothesis/tests/unit/representations/test_representations.py |
Updates representation strategy tests to use singleton kinds. |
packages/coordinax.hypothesis/tests/unit/utils/test_subclasses.py |
Formatting-only subclass utility test. |
packages/coordinax.hypothesis/tests/unit/utils/annotations/test_annotations.py |
Formatting-only annotation strategy tests. |
packages/coordinax.hypothesis/tests/unit/utils/annotations/test_parse_jaxtyping_shape.py |
Import-order adjustment. |
packages/coordinax.hypothesis/tests/unit/utils/annotations/test_strategy_for_annotation.py |
Import-order adjustment. |
scripts/validate_tag.py |
Formatting-only logging setup change. |
noxfile.py |
Formatting-only docs session argument changes. |
conftest.py |
Formatting-only Sybil parser setup change. |
…I equivalent Use jnp.issubdtype + jnp.result_type to replicate to_inexact_dtype, removing the dependency on the private jax._src.dtypes module.
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.
No description provided.