Improvements to unit tests & docstrings#6
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates test coverage and documentation, and also adjusts a few core math utilities (refraction handling and FRD velocity projection) to improve backend compatibility and reduce warnings.
Changes:
- Added/expanded unit tests (including new ray refraction tests) and improved JAX/backend handling in rotation tests.
- Updated refraction behavior and
Ray.correct_refraction()API to support direction modes. - Adjusted
project_velocity_to_az_el()to return az/el/range rates and updated its docstring accordingly; added global pytest warning filters.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/core/test_ray.py | Adds a new unit test covering Ray.correct_refraction() modes and invalid mode handling. |
| tests/core/test_functs.py | Removes the JAX skip by converting rotations to the active backend; expands coverage for refraction and velocity-rate projection. |
| src/astrix/spatial/ray.py | Extends Ray.correct_refraction() with a mode parameter and adjusts correction application logic. |
| src/astrix/spatial/location.py | Docstring wording updates to better reflect Point usage patterns. |
| src/astrix/plots/plot3d.py | Tweaks legend font size for better readability. |
| src/astrix/functs.py | Alters pyproj input parsing to avoid warnings; updates NED rotation docs; clips refraction elevation inputs; changes velocity-rate projection outputs/shape. |
| pyproject.toml | Adds pytest filterwarnings configuration to suppress “Force converting …” warnings. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Primarily just improvements to tests (suppressing warnings, removing needless Jax skip) and updating docs & docstrings to match source code.
Small change to pyproj input parsing to remove numpy deprecation warning. No change to functionality.