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

Firestore database usage #1249

Closed wtgee closed 2 months ago

wtgee commented 2 months ago

This changes the behavior so that if the config item panoptes_network.use_firestore is set, then firestore will be used as the main database for long term storage and a local json file will not be written. The "current" document (e.g. ~/json_store/panoptes/current_weather.json) will still be written.

This also changes the metadata firestore key to be /metadata/{collection}/records/, with an auto generated id. Each record has a unit reference, a received_time, and collection: {collection}`.

codecov[bot] commented 2 months ago

Codecov Report

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

Project coverage is 71.97%. Comparing base (2a0dbaf) to head (2b323f6).

Files Patch % Lines
src/panoptes/pocs/utils/database.py 60.00% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1249 +/- ## =========================================== + Coverage 71.87% 71.97% +0.09% =========================================== Files 101 101 Lines 8399 8389 -10 Branches 1163 1162 -1 =========================================== + Hits 6037 6038 +1 + Misses 2207 2198 -9 + Partials 155 153 -2 ```

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

wtgee commented 2 months ago

This is going to be pulled from the normal POCS operations and instead act on the files itself in a separate process.