iausathub / satchecker

IAU CPS SatHub tool for satellite position prediction
BSD 3-Clause "New" or "Revised" License
7 stars 1 forks source link

Refactor to repository pattern; increase testing code coverage; fix is_illuminated #92

Closed mdadighat closed 1 month ago

mdadighat commented 1 month ago

Description:

Refactor all the current functionality into services/repositories and more testable utility classes. Rewrote most of the automated tests to reflect the new structure, get rid of mocks, and increase test coverage.

Fix the check for whether the satellite is illuminated, plus add the data source to the endpoint to retrieve TLE data to better distinguish between similar data points.

github-actions[bot] commented 1 month ago

Coverage

Coverage Report
FileStmtsMissCoverMissing
src/api
   satchecker.py110%1
src/api/adapters/repositories
   satellite_repository.py54493%29, 33, 37, 41
   tle_repository.py80594%66, 72, 81, 90, 94
src/api/domain/models
   tle.py19195%52
src/api/entrypoints
   extensions.py10190%32
src/api/entrypoints/v1/routes
   routes.py371073%22, 63, 92, 114–126
   tools_routes.py49688%49–51, 86–88
src/api/services
   validation_service.py112199%139
src/api/services/tasks
   ephemeris_tasks.py40782%55, 73, 117, 121, 148, 169–172
src/api/utils
   coordinate_systems.py138199%458
   propagation_strategies.py65198%123
TOTAL8873896% 

Tests Skipped Failures Errors Time
97 0 :zzz: 0 :x: 0 :fire: 16.157s :stopwatch: