panoptes / POCS

An Observatory Control System for the PANOPTES citizen-science project designed to help find transiting exoplanets! :telescope: :stars:
https://pocs.readthedocs.io/en/latest/
MIT License
77 stars 49 forks source link

Fastapi deprecation 1208 #1276

Closed wtgee closed 1 month ago

wtgee commented 1 month ago

Update the services using FastAPI (power, weather) to properly use lifespan events instead of the deprecated startup/shutdown events. This was originally in #1208 but got clobbered.

This also adds host info to the weather cli for remote weather reading.

Tested on PAN015

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 17.46032% with 52 lines in your changes are missing coverage. Please review.

Project coverage is 71.05%. Comparing base (9a0dadc) to head (d49e0fc).

:exclamation: Current head d49e0fc differs from pull request most recent head 1148d1d

Please upload reports for the commit 1148d1d to get more accurate results.

Files Patch % Lines
src/panoptes/pocs/utils/service/weather.py 0.00% 32 Missing :warning:
src/panoptes/pocs/utils/service/power.py 33.33% 12 Missing :warning:
src/panoptes/pocs/sensor/power.py 38.46% 8 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1276 +/- ## =========================================== - Coverage 71.31% 71.05% -0.26% =========================================== Files 100 100 Lines 8439 8468 +29 Branches 1174 1173 -1 =========================================== - Hits 6018 6017 -1 - Misses 2270 2300 +30 Partials 151 151 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.