Skip to content

TST: cover geospatial extent conversions - #1158

Merged
Gui-FernandesBR merged 1 commit into
RocketPy-Team:developfrom
ting-hong-shieh:codex/test-tools-geodesy-coverage
Aug 14, 2026
Merged

TST: cover geospatial extent conversions#1158
Gui-FernandesBR merged 1 commit into
RocketPy-Team:developfrom
ting-hong-shieh:codex/test-tools-geodesy-coverage

Conversation

@ting-hong-shieh

Copy link
Copy Markdown

Summary

This adds unit coverage for the three geospatial extent helpers in rocketpy.tools:

  • known spherical Mercator coordinates for mercator_to_wgs84;
  • a local → WGS84 → Mercator → local round trip; and
  • southwest and northeast extents that verify coordinate ordering and offset signs.

The change is test-only and follows the small, deterministic coverage slices discussed in #709.

Coverage

The base and head measurements used the same command and inputs.

rocketpy/tools.py Base Head
Statements 313 313
Covered 121 149
Missed 192 164
Coverage 39% 48%
tests/unit/test_tools.py results 23 passed 28 passed

Merge base: 2f9a44b92e5288145ba0c1e93f88aef57590437c
Head: 58f9981f314f74e207a1523f652e57d70b778cc3

Validation

.venv/bin/python -m coverage run --source=rocketpy -m pytest tests/unit/test_tools.py -q
.venv/bin/python -m coverage report -m rocketpy/tools.py
.venv/bin/ruff check tests/unit/test_tools.py
.venv/bin/ruff format --check tests/unit/test_tools.py

Head results: 28 passed with five pre-existing warnings; Ruff passed and the file was already formatted.

The round-trip assertion allows an absolute error of 0.2 m. The fixtures exercise the spherical Mercator equations with an explicit radius of 6,378,137 m; they do not add ellipsoidal-Earth or projection-domain behavior.

Environment

Component Version
Python 3.12.6
RocketPy 1.13.0 (develop checkout)
NumPy 2.5.2
SciPy 1.18.0
pytest 9.1.1
OS macOS 26.5.2
Architecture arm64

Closes no issue; contributes to #709.

@codecov

codecov Bot commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.51%. Comparing base (e0ff281) to head (58f9981).
⚠️ Report is 60 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1158      +/-   ##
===========================================
+ Coverage    82.18%   83.51%   +1.33%     
===========================================
  Files          122      130       +8     
  Lines        16355    17082     +727     
===========================================
+ Hits         13441    14266     +825     
+ Misses        2914     2816      -98     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ting-hong-shieh
ting-hong-shieh marked this pull request as ready for review August 14, 2026 13:46
@ting-hong-shieh
ting-hong-shieh requested a review from a team as a code owner August 14, 2026 13:46
@Gui-FernandesBR Gui-FernandesBR linked an issue Aug 14, 2026 that may be closed by this pull request
@Gui-FernandesBR
Gui-FernandesBR merged commit 1d04bcc into RocketPy-Team:develop Aug 14, 2026
17 checks passed
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.

TST: Increase code coverage to 90%

2 participants